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

ghcjs-*: Expose the version of GHC used #47487

Merged
merged 1 commit into from Sep 28, 2018

Conversation

Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Sep 28, 2018

Motivation for this change

This is more meaningful than the GHCJS version for most tasks.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

CC @ElvishJerricco

This is more meaningful than the GHCJS version for most tasks.
@ElvishJerricco
Copy link
Contributor

@Ericson2314 What's the purpose of this? Frankly I kinda wish bootPkgs weren't passed thru, since the boot GHC should be considered irrelevant to the GHCJS.

@ElvishJerricco
Copy link
Contributor

@Ericson2314 if it's supposed to indicate the version of GHC that this GHCJS represents, I think it's a coincidence that this works right now. There's no fundamental reason GHCJS 8.4 can't be built with GHC 8.2, I think it's just some buggy things preventing that from working right now.

@Ericson2314
Copy link
Member Author

@ElvishJerricco so first I was thinking exactly what you are. (Indeed I like the way your ghcjs-ng uses bootPkgs and separates booting from normal cabal2nix derivation a lot better.) But then I remembered that GHCJS is both using that GHC's executable component to build itself, and linking its library component for the early compiler stages. So insofar that it inherits behavior from the GHC library, it's not a coincidence.

Eventually with butter GHCJS (or webasm ;)) we'll be better, but I don't think it's worth messing with the boot process to get separate GHC exe and GHC library derivation dependencies.

@ElvishJerricco
Copy link
Contributor

and linking its library component for the early compiler stages

Huh? Not in 8.2 / 8.4. These versions brought the GHC source in-tree as a submodule and builds the GHC modules it uses itself. I believe you could literally build GHCJS 8.4 with GHC 8.2 right now, if you worked out a couple bugs, and you would get actual GHC 8.4 behavior.

@Ericson2314
Copy link
Member Author

Oh my bad. Well then let's redefine them for the latter two then. I made this for the earlier two since they had very different version numbers, and then coppied it to the latter two without checking so I could always get the version from GHCJS the same way.

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

3 participants