Navigation Menu

Skip to content
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

bs-platform: don't build a development binary #77726

Merged

Conversation

anmonteiro
Copy link
Member

Motivation for this change

It was pointed out in the upstream issue that @turboMaCk opened wrt aarch64 that we are building in devmode (link)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@@ -35,11 +35,12 @@ stdenv.mkDerivation {
'';

buildPhase = ''
node scripts/ninja.js build
# This is an unfortunate name, but it's actually how to build a release
# binary for BuckleScript
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't BS_RELEASE_BUILD environment variable enough?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'';

installPhase = ''
node scripts/install.js
Copy link
Member

@turboMaCk turboMaCk Jan 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah I see so scripts/install.js scripts/ninja.js build is esentially not needed for production build.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scripts/ninja.js build is not needed for a production build. scripts/install.js is

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes that's what I meant, sorry for confusion. I should stop doing review early in the morning :D

@@ -23,6 +23,6 @@ in
platforms = platforms.all;
# Currently there is an issue with aarch build in hydra
# https://github.com/BuckleScript/bucklescript/issues/4091
badPlatforms = platforms.aarch64;
# badPlatforms = platforms.aarch64;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aarch64 is still failing.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the error message this time?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit lost, by reading the logs, it still seems to be a dev build, since cppo is running, in release build, cppo is not needed

@@ -23,6 +23,6 @@ in
platforms = platforms.all;
# Currently there is an issue with aarch build in hydra
# https://github.com/BuckleScript/bucklescript/issues/4091
badPlatforms = platforms.aarch64;
# badPlatforms = platforms.aarch64;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# badPlatforms = platforms.aarch64;
badPlatforms = platforms.aarch64;

@anmonteiro anmonteiro force-pushed the anmonteiro/bs-platform-release-mode branch from 8362504 to 856278c Compare January 15, 2020 22:23
@ofborg ofborg bot requested a review from turboMaCk January 15, 2020 22:44
@turboMaCk
Copy link
Member

turboMaCk commented Jan 15, 2020

LGTM now. BTW @anmonteiro I would just change the commit message (and PR name) because we in fact did build the release binary even before, we just build development version first it seems.

@anmonteiro anmonteiro force-pushed the anmonteiro/bs-platform-release-mode branch from 856278c to d157bf2 Compare January 15, 2020 22:46
@anmonteiro anmonteiro changed the title bs-platform: build a release binary bs-platform: don't build a development binary Jan 15, 2020
@anmonteiro
Copy link
Member Author

@turboMaCk thanks, just changed the commit message and the PR title.

@anmonteiro anmonteiro force-pushed the anmonteiro/bs-platform-release-mode branch from d157bf2 to 725fd9f Compare January 15, 2020 22:48
@turboMaCk
Copy link
Member

@GrahamcOfBorg build bs-platform

Copy link
Member

@turboMaCk turboMaCk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. thanks @anmonteiro 👍

@dywedir dywedir merged commit 4670bf5 into NixOS:master Jan 17, 2020
@anmonteiro anmonteiro deleted the anmonteiro/bs-platform-release-mode branch January 22, 2020 01:07
@anmonteiro anmonteiro mentioned this pull request Feb 2, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants