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

flake: remove the 'follows' directive #2218

Merged
merged 2 commits into from Sep 23, 2021
Merged

Conversation

teto
Copy link
Contributor

@teto teto commented Sep 20, 2021

nixFlake suffers from a bug when using "follows" keyword:
NixOS/nix#3602

I think the (possibly) extra-downloads is worth having the peace of mind that it always works.

nixFlake suffers from a bug when using "follows" keyword:
NixOS/nix#3602
Copy link
Collaborator

@berberman berberman left a comment

Choose a reason for hiding this comment

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

We have to make sure that formatters in pre-commit hooks are consistent (#1408), so I think the follow of nixpkgs is required. For flake-utils, I agree with removing that follow.

@teto
Copy link
Contributor Author

teto commented Sep 20, 2021

the "follow" is broken in nix which means I can't use the flake without a fork.

Alternatively, could we :

  • fork pre-commit-hook so that we can manually make sure they use the same nixpkgs version as hls ?
  • override stylish-haskell in the pre-commit flake with the one from hls' overlay ?

@berberman
Copy link
Collaborator

fork pre-commit-hook so that we can manually make sure they use the same nixpkgs version as hls

I don't think that's a good idea, since it causes extra maintenance

override stylish-haskell in the pre-commit flake with the one from hls' overlay

Actually we already do this:

stylish-haskell.entry = pkgs.lib.mkForce "${hpkgs.stylish-haskell}/bin/stylish-haskell --inplace";

So maybe we don't need "follow" nixpkgs at all, and this PR may work. Could you try executing the pre-commit hook?

@teto
Copy link
Contributor Author

teto commented Sep 22, 2021

stylish-haskell --version gives me stylish-haskell 0.12.2.0.
If I trigger the hook. It works correctly but not sure how to check it uses the same version.

Copy link
Collaborator

@berberman berberman left a comment

Choose a reason for hiding this comment

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

Thanks for confirming, then we are good to go

@jneira jneira added the merge me Label to trigger pull request merge label Sep 23, 2021
@mergify mergify bot merged commit 64374ec into haskell:master Sep 23, 2021
@teto teto deleted the flake-no-follow branch September 23, 2021 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants