Skip to content

[feat] bump nixpkgs - allow cabal-install 3.12#4183

Merged
MangoIV merged 8 commits intodevelopfrom
mangoiv/nixpkgs-bump
Aug 7, 2024
Merged

[feat] bump nixpkgs - allow cabal-install 3.12#4183
MangoIV merged 8 commits intodevelopfrom
mangoiv/nixpkgs-bump

Conversation

@MangoIV
Copy link
Contributor

@MangoIV MangoIV commented Aug 5, 2024

Checklist

  • n/a Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Aug 5, 2024
@MangoIV MangoIV force-pushed the mangoiv/nixpkgs-bump branch 5 times, most recently from b0ede9b to 192e5d6 Compare August 5, 2024 12:53
@MangoIV MangoIV force-pushed the mangoiv/nixpkgs-bump branch from 192e5d6 to 5a73cb3 Compare August 5, 2024 13:22
setup-depends:
, base
, Cabal
, Cabal >=3.12
Copy link
Member

Choose a reason for hiding this comment

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

Why is this constraint needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because otherwise cabal multi-repl doesn't work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should I put a note there?

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 there only one version of Cabal available in the nix env? The project as is doesn't depend on cabal multi-repl right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in theory yes, in practice no, Cabal is a boot library and hence belongs to the GHC, hence nixpkgs installs two versions, 3.12 and 3.10 (which comes with GHC and cannot be removed), that then leads to proto-lens tool to select the wrong (old) version because it is actually constrained to Cabal <3.12 for no particular reason. It's all a bit messed up, if we had purely nixpkgs deps, then this wouldn't cause any issues because cabal doesn't actually care about how these deps have been installed...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the reason why cabal multi-repl is not enabled by default in HLS. By fixing this for us though, it removes the bug wrt duplicate constraints and it also improves HLS because of multi-repl. I think adding this constraint (which is provisioned by the nix env anyway) is worth this improvement.

@MangoIV MangoIV force-pushed the mangoiv/nixpkgs-bump branch from 82bd268 to e9e5d20 Compare August 6, 2024 10:21
@MangoIV MangoIV marked this pull request as ready for review August 6, 2024 12:14
@MangoIV
Copy link
Contributor Author

MangoIV commented Aug 6, 2024

I think this is ready! <3

@MangoIV MangoIV requested a review from akshaymankar August 6, 2024 12:39
@MangoIV MangoIV force-pushed the mangoiv/nixpkgs-bump branch from 2e3db35 to 88fdf5a Compare August 6, 2024 15:18

.PHONY: treefmt
treefmt:
treefmt
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is because treefmt was very chatty about files it's not allowed to format

docsPkgs = [
pkgs.plantuml
pkgs.texlive.combined.scheme-full
(pkgs.python3.withPackages
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is because nixpkgs not too long ago bumped the default python version and now many python packages are broken

@MangoIV MangoIV requested a review from akshaymankar August 6, 2024 15:26
@MangoIV MangoIV merged commit 4f828c8 into develop Aug 7, 2024
@MangoIV MangoIV deleted the mangoiv/nixpkgs-bump branch August 7, 2024 07:01
@echoes-hq echoes-hq bot added the echoes: technical-roadmap/throughput More specific category, to highlight task aiming at improving the development velocity and effici... label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

echoes: technical-roadmap/throughput More specific category, to highlight task aiming at improving the development velocity and effici... ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants