Closed
Description
Hi,
When a main package imports another package the main package is not rebuilt as it should when using install (only the dependent package is being rebuilt). This is not how the "normal" go tool behaves.
Test for example:
$ cat a/a.go
package a
var F = 33
var D = map[string]string{
"hej": "AAAAsadf",
}
$ cat b/main.go
package main
import (
"a"
"github.com/gopherjs/gopherjs/js"
)
func main() {
js.Global.Set("sdf", a.D)
}
$ gopherjs -m -v install b
a
b
$ ls -lah ../bin/ | grep b.js
-rw-rw-r-- 1 vron vron 51K apr 24 19:04 b.js
-rw-rw-r-- 1 vron vron 680 apr 24 19:04 b.js.map
$ sed -i s/AAAA/BBBB/g a/a.go
$ gopherjs -m -v install b
a <-- Note that only package a is being rebuilt
$ ls -lah ../bin/ | grep b.js
-rw-rw-r-- 1 vron vron 51K apr 24 19:04 b.js
-rw-rw-r-- 1 vron vron 680 apr 24 19:04 b.js.map
Note that the file (b.js) is not updated