Skip to content

Not rebuilding main package #443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vron opened this issue Apr 24, 2016 · 3 comments
Closed

Not rebuilding main package #443

vron opened this issue Apr 24, 2016 · 3 comments
Labels
gopherjs-tool Related to the gopherjs tool or its build system (but not the compiler itself).

Comments

@vron
Copy link

vron commented Apr 24, 2016

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

@dmitshur dmitshur added the gopherjs-tool Related to the gopherjs tool or its build system (but not the compiler itself). label Apr 24, 2016
@dmitshur
Copy link
Member

This looks like another issue that will be fixed once #388 is done.

@dmitshur
Copy link
Member

I can confirm this issue appears to be resolved on my WIP implementation of #388.

@nevkontakte
Copy link
Member

This doesn't seem to be a problem in GopherJS 1.17, so I'm going to close this issue.

If you think this is a mistake, please let us know, and we can reopen it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopherjs-tool Related to the gopherjs tool or its build system (but not the compiler itself).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants