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

Build Issue #699

Closed
4ydx opened this Issue Sep 8, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@4ydx
Contributor

4ydx commented Sep 8, 2017

GopherJS 1.9-1
Golang 1.9

When building on one of my machines (Ubuntu 16.04.3 LTS), the resulting file is named "..js". Any thoughts? Running go build results in a binary that is properly named the parent folder.

I am running build outside the GOPATH. This appears to be the reason for this so I am now using the "-o" flag in order to specify the resulting filename. I don't know if this should be considered a bug or not.

@dmitshur

This comment has been minimized.

Show comment
Hide comment
@dmitshur

dmitshur Sep 9, 2017

Member

If I understand the issue correctly, the problem is that running gopherjs build outside GOPATH produces a suboptimally named "..js" file. Using go build produces a better name, using the parent folder name.

I suspect we can fix this, make gopherjs build behave as go build does.

It would be helpful if you could provide reproducible steps to trigger this.

Member

dmitshur commented Sep 9, 2017

If I understand the issue correctly, the problem is that running gopherjs build outside GOPATH produces a suboptimally named "..js" file. Using go build produces a better name, using the parent folder name.

I suspect we can fix this, make gopherjs build behave as go build does.

It would be helpful if you could provide reproducible steps to trigger this.

@4ydx

This comment has been minimized.

Show comment
Hide comment
@4ydx

4ydx Sep 14, 2017

Contributor

go version go1.9 darwin/amd64
GopherJS 1.9-1

In a folder outside GOPATH build the following using gopherjs.

package main

import (
	"fmt"

	"github.com/gopherjs/gopherjs/js"
)

func main() {
	fmt.Println("Hello, playground")
	js.Global.Call("alert", "Hello, JavaScript")
	println("Hello, JS console")
}
Contributor

4ydx commented Sep 14, 2017

go version go1.9 darwin/amd64
GopherJS 1.9-1

In a folder outside GOPATH build the following using gopherjs.

package main

import (
	"fmt"

	"github.com/gopherjs/gopherjs/js"
)

func main() {
	fmt.Println("Hello, playground")
	js.Global.Call("alert", "Hello, JavaScript")
	println("Hello, JS console")
}

4ydx added a commit to 4ydx/gopherjs that referenced this issue Sep 14, 2017

@dmitshur dmitshur added NeedsFix and removed WaitingForInfo labels Sep 14, 2017

@dmitshur dmitshur closed this in 4152256 Sep 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment