Skip to content

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

Merged
maralorn merged 1 commit intoNixOS:haskell-updatesfrom
maralorn:hls-abi-wrapper
Sep 28, 2022
Merged

haskell-language-server: Add shell-wrapper which detects ABI incompatibilities#192540
maralorn merged 1 commit intoNixOS:haskell-updatesfrom
maralorn:hls-abi-wrapper

Conversation

@maralorn
Copy link
Copy Markdown
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.

@github-actions github-actions bot added the 6.topic: haskell General-purpose, statically typed, purely functional programming language label Sep 23, 2022
@maralorn
Copy link
Copy Markdown
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?

@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Sep 23, 2022
@maralorn
Copy link
Copy Markdown
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
Copy Markdown
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 <sternenseemann@systemli.org>
@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

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants