-
Notifications
You must be signed in to change notification settings - Fork 8
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
Revert to passing BinOutputPath
as standalone field in go build
#385
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @masihyeganeh, @miladz68, and @wojtek-coreum)
build/golang/go.go
line 99 at r1 (raw file):
cmd := exec.Command(tools.Path("bin/go", tools.TargetPlatformLocal), args...) cmd.Dir = config.PackagePath
this doesn't work properly, that is why I changed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @masihyeganeh, @miladz68, and @wojtek-coreum)
build/golang/go.go
line 99 at r1 (raw file):
Previously, ysv (Yaroslav Savchuk) wrote…
this doesn't work properly, that is why I changed it
why do we need this ?
What are the benefits of this approach ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @masihyeganeh, @miladz68, and @ysv)
build/golang/go.go
line 99 at r1 (raw file):
this doesn't work properly, that is why I changed it
What didn't work?
What are the benefits of this approach ?
This is how go build
works. To use the correct go.mod
you need to be in the right directory.
Try to run bin/bdjuno-builder build/me
in the bdjuno repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @masihyeganeh, @miladz68, and @wojtek-coreum)
build/golang/go.go
line 99 at r1 (raw file):
What didn't work?
Test it in coreum repo with native build & in docker.
As far as I remember when building in docker it didn't work properly. Since it changes directory, so resulting binary was mounted to build/cmd/bin/.cache/cored/docker.linux.arm64/bin/cored
instead of bin/.cache/cored/docker.linux.arm64/bin/cored
. Smth like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @masihyeganeh, @miladz68, and @ysv)
build/golang/go.go
line 99 at r1 (raw file):
Previously, ysv (Yaroslav Savchuk) wrote…
What didn't work?
Test it in coreum repo with native build & in docker.
As far as I remember when building in docker it didn't work properly. Since it changes directory, so resulting binary was mounted tobuild/cmd/bin/.cache/cored/docker.linux.arm64/bin/cored
instead ofbin/.cache/cored/docker.linux.arm64/bin/cored
. Smth like this
I see path is correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @masihyeganeh, and @ysv)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh and @ysv)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh and @wojtek-coreum)
build/golang/go.go
line 99 at r1 (raw file):
Previously, wojtek-coreum (Wojtek) wrote…
I see path is correct
workDir = "/build/cmd"
-o = "bin/.cache/..."
check:
go build -o="bin/.cache"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @masihyeganeh and @wojtek-coreum)
build/golang/go.go
line 99 at r1 (raw file):
Previously, ysv (Yaroslav Savchuk) wrote…
workDir = "/build/cmd"
-o = "bin/.cache/..."
check:
go build -o="bin/.cache"
Discussed issue on call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @masihyeganeh, @miladz68, and @ysv)
build/golang/go.go
line 99 at r1 (raw file):
Previously, ysv (Yaroslav Savchuk) wrote…
Discussed issue on call
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @masihyeganeh, @miladz68, and @ysv)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @masihyeganeh and @miladz68)
cmd.Dir
in go commandsBinOutputPath
as standalone field in go build
Description
The original way was there for purpose. If
cmd.Dir
is not set,go.mod
for the main module is used by thebuild
command instead of the one defined in the submodule.Reviewers checklist:
Authors checklist
This change is