-
Notifications
You must be signed in to change notification settings - Fork 249
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
Use Nix shell in the Makefile for builds #4388
Conversation
Hey @apentori, and thank you so much for making your first pull request in status-go! ❤️ Please help us make your experience better by filling out this brief questionnaire https://goo.gl/forms/uWqNcVpVz7OIopXg2 |
Jenkins BuildsClick to see older builds (123)
|
I would't attempt to remove generated files in this PR. First I would try to get this to work in CI as-is. |
8cb60b5
to
f747e83
Compare
06b0eca
to
a49bb24
Compare
Building with make seems to work make statusgo
Missing TARGET, assuming default target. See nix/README.md for more details.
Configuring Nix shell for target 'default'...
Missing TARGET, assuming default target. See nix/README.md for more details.
Configuring Nix shell for target 'default'...
Missing TARGET, assuming default target. See nix/README.md for more details.
Configuring Nix shell for target 'default'...
go build -mod=vendor -v \
-tags 'gowaku_no_rln' -ldflags=' -X github.com/status-im/status-go/params.Version=0.175.1 -X github.com/status-im/status-go/params.GitCommit=cda4aca61 -X github.com/status-im/status-go/params.IpfsGatewayURL=https://ipfs.status.im/ -X github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/metrics.EnabledStr=true' \
-o ./build/bin/statusd ./cmd/statusd
Missing TARGET, assuming default target. See nix/README.md for more details.
Configuring Nix shell for target 'default'...
google.golang.org/protobuf/internal/flags
google.golang.org/protobuf/internal/set
[...]
github.com/status-im/status-go/cmd/statusd
Missing TARGET, assuming default target. See nix/README.md for more details.
Configuring Nix shell for target 'default'...
Compilation done.
Missing TARGET, assuming default target. See nix/README.md for more details.
Configuring Nix shell for target 'default'...
Run "build/bin/statusd -h" to view available commands.
|
@apentori because in a Lines 132 to 137 in cda4aca
In this case there's 3 lines, go build and two echo lines. Since they are not joined together with a && \ or ; \ they are separate commands that spawn separate shells.
This is one of the main reasons why people use the |
|
I personally disagree with this, but won't complain as I am going to use Nix 😄 As fro the "full control over build tools and dependencies": Again, I'm just posting my thoughts here. It's not a blocker or requirement from me. |
As I mentioned:
|
Why do you use a custom |
I don't do this explicitly myself. This is done my IDE (JetBrains GoLand). Settings |
That's fine, just trying to understand the behavior. |
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.
Thanks for 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.
Have few comments and there are couple unresolved from Jakub.
Great job!
Hmm
perhaps with newer I guess for this PR we could stick with older |
I think we should use the same commit as |
b60d425
to
9dc8c79
Compare
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.
Looks good to me and works well locally as well.
@apentori : when you get a chance do push the modified go.mod
Once this is merged It will make my life easier for the upcoming go upgrade.
Thank you!
5e9f3b3
to
77db6c1
Compare
Signed-off-by: Alexis Pentori <[email protected]>
671b07d
to
f9df853
Compare
Otherwise it fails with: ``` performing a single-user installation of Nix... directory /nix does not exist; creating it by running 'mkdir -m 0755 /nix && chown jenkins /nix' using sudo sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper /tmp/nix-binary-tarball-unpack.roliyEDk9X/unpack/nix-2.19.3-x86_64-linux/install: please manually run 'mkdir -m 0755 /nix && chown jenkins /nix' as root to create /nix ``` Related to: status-im/status-go#4388 Signed-off-by: Jakub Sokołowski <[email protected]>
Otherwise it fails with: ``` performing a single-user installation of Nix... directory /nix does not exist; creating it by running 'mkdir -m 0755 /nix && chown jenkins /nix' using sudo sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper /tmp/nix-binary-tarball-unpack.roliyEDk9X/unpack/nix-2.19.3-x86_64-linux/install: please manually run 'mkdir -m 0755 /nix && chown jenkins /nix' as root to create /nix ``` Related to: status-im/status-go#4388 Signed-off-by: Jakub Sokołowski <[email protected]> Signed-off-by: Alexis Pentori <[email protected]>
Otherwise it fails with: ``` performing a single-user installation of Nix... directory /nix does not exist; creating it by running 'mkdir -m 0755 /nix && chown jenkins /nix' using sudo sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper /tmp/nix-binary-tarball-unpack.roliyEDk9X/unpack/nix-2.19.3-x86_64-linux/install: please manually run 'mkdir -m 0755 /nix && chown jenkins /nix' as root to create /nix ``` Related to: status-im/status-go#4388 Signed-off-by: Alexis Pentori <[email protected]> Signed-off-by: Jakub Sokołowski <[email protected]>
Otherwise it fails with: ``` performing a single-user installation of Nix... directory /nix does not exist; creating it by running 'mkdir -m 0755 /nix && chown jenkins /nix' using sudo sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper /tmp/nix-binary-tarball-unpack.roliyEDk9X/unpack/nix-2.19.3-x86_64-linux/install: please manually run 'mkdir -m 0755 /nix && chown jenkins /nix' as root to create /nix ``` Related to: status-im/status-go#4388 Signed-off-by: Alexis Pentori <[email protected]> Signed-off-by: Jakub Sokołowski <[email protected]>
Otherwise it fails with: ``` performing a single-user installation of Nix... directory /nix does not exist; creating it by running 'mkdir -m 0755 /nix && chown jenkins /nix' using sudo sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper /tmp/nix-binary-tarball-unpack.roliyEDk9X/unpack/nix-2.19.3-x86_64-linux/install: please manually run 'mkdir -m 0755 /nix && chown jenkins /nix' as root to create /nix ``` Related to: status-im/status-go#4388 Signed-off-by: Alexis Pentori <[email protected]> Signed-off-by: Jakub Sokołowski <[email protected]>
For future reference we had to apply some extra fixes for this:
|
Description
Use nix in Makefile and remove generated files from source control
Linked to :
Steps