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

haskell-language-server: Add shell-wrapper which detects ABI incompatibilities #192540

Merged
merged 1 commit into from
Sep 28, 2022

Conversation

maralorn
Copy link
Member

Description of changes

This introduces a ghc + boot libraries ABI Hash comparison between compile and runtime to increase the probability that hls works with this setup.

As explained in #175565 I needed a few modifications to the wrapper script, so I don‘t see an alternative to copying it into nixpkgs. (It’s currently not contained in the sdist on hackage anyways.)

The change is that instead of checking that the list of packages is exactly the same we only check that the packages present at compile time are present with the same abi hash at runtime.

Closes: #175565

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@maralorn
Copy link
Member Author

Wow, the editorconfig wants me to update a script which currently differs in three lines from upstream to swap spaces for tabs so it differs in ~100 lines from upstream. Is there a way I can work around this?

@maralorn
Copy link
Member Author

I have created a PR on upstream modifying the wrapper script and adding it to the hackage release. If that get’s accepted we can get away without maintaining our own version of the script.

@maralorn maralorn force-pushed the hls-abi-wrapper branch 2 times, most recently from 8088d85 to 41a84e2 Compare September 25, 2022 05:03
@maralorn maralorn marked this pull request as draft September 26, 2022 20:43
@maralorn
Copy link
Member Author

Drafting this until we have a decision on upstream, it’s not to urgent.

…ibilities

This checks that ghc and its boot libraries have the same ABI at runtime as at compile time.

Co-authored-by: sternenseemann <[email protected]>
@maralorn maralorn marked this pull request as ready for review September 28, 2022 11:34
@maralorn maralorn merged commit 1ed0708 into NixOS:haskell-updates Sep 28, 2022
@maralorn maralorn deleted the hls-abi-wrapper branch September 28, 2022 11:35
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.

3 participants