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

anmonteiro commented Jan 15, 2020

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

This comment has been minimized.

Copy link
@turboMaCk

turboMaCk Jan 15, 2020

Member

isn't BS_RELEASE_BUILD environment variable enough?

This comment has been minimized.

Copy link
@anmonteiro
'';

installPhase = ''
node scripts/install.js

This comment has been minimized.

Copy link
@turboMaCk

turboMaCk Jan 15, 2020

Member

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

This comment has been minimized.

Copy link
@anmonteiro

anmonteiro Jan 15, 2020

Author Member

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

This comment has been minimized.

Copy link
@turboMaCk

turboMaCk Jan 15, 2020

Member

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;

This comment has been minimized.

Copy link
@turboMaCk

turboMaCk Jan 15, 2020

Member

aarch64 is still failing.

This comment has been minimized.

Copy link
@bobzhang

bobzhang Jan 22, 2020

what's the error message this time?

This comment has been minimized.

Copy link
@bobzhang

bobzhang Feb 2, 2020

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;

This comment has been minimized.

Copy link
@turboMaCk

turboMaCk Jan 15, 2020

Member
Suggested change
# badPlatforms = platforms.aarch64;
badPlatforms = platforms.aarch64;
@anmonteiro anmonteiro force-pushed the anmonteiro:anmonteiro/bs-platform-release-mode branch from 8362504 to 856278c Jan 15, 2020
@ofborg ofborg bot requested a review from turboMaCk Jan 15, 2020
@turboMaCk

This comment has been minimized.

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:anmonteiro/bs-platform-release-mode branch from 856278c to d157bf2 Jan 15, 2020
@anmonteiro anmonteiro changed the title bs-platform: build a release binary bs-platform: don't build a development binary Jan 15, 2020
@anmonteiro

This comment has been minimized.

Copy link
Member Author

anmonteiro commented Jan 15, 2020

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

@anmonteiro anmonteiro force-pushed the anmonteiro:anmonteiro/bs-platform-release-mode branch from d157bf2 to 725fd9f Jan 15, 2020
@turboMaCk

This comment has been minimized.

Copy link
Member

turboMaCk commented Jan 16, 2020

@GrahamcOfBorg build bs-platform

Copy link
Member

turboMaCk left a comment

LGTM. thanks @anmonteiro 👍

@dywedir dywedir merged commit 4670bf5 into NixOS:master Jan 17, 2020
15 checks passed
15 checks passed
bs-platform on aarch64-linux No attempt
Details
Evaluation Performance Report Evaluator Performance Report
Details
bs-platform on x86_64-linux Success
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@anmonteiro anmonteiro deleted the anmonteiro:anmonteiro/bs-platform-release-mode branch Jan 22, 2020
@anmonteiro anmonteiro mentioned this pull request Feb 2, 2020
4 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.