Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Not commiting the flake.lock file makes the nix code virtually unusable #165

Closed
MangoIV opened this issue Mar 19, 2023 · 5 comments
Closed

Comments

@MangoIV
Copy link

MangoIV commented Mar 19, 2023

Hi, I'm having some issues wrt nix:

  • I cannot use any command that cannot write lockfiles (like nix run github:leanprover/lake)
  • reproducibility will be broken
  • I do not understand how it adds maintenance cost to commit the lockfile, from my understanding, it should decrease it because we don't have to change the nix code until we really want; like this it can just break upon getting a new version of nixpkgs or any other input.
@MangoIV
Copy link
Author

MangoIV commented Mar 19, 2023

I have a solution for this, though:

Note
I can do both if wanted

Warning
in case you use the update-flake-lock-action, you will have to add a github token

@MangoIV MangoIV mentioned this issue Mar 19, 2023
3 tasks
@Kha
Copy link
Member

Kha commented Mar 19, 2023

The only correct solution is to keep the locked lean input in sync with lean-toolchain, which would be a hassle to do manually for virtually no users. In any case, when Kha/lean4@25db543 is merged, you can simply use the Lean flake instead. We should probably remove the Nix code from this repo at that point, or right now.

@MangoIV
Copy link
Author

MangoIV commented Mar 19, 2023

@Kha perhaps my PR does what you want (keep it in sync)

I have noticed that the nix code in the lean repo is really weird. E g it doesn’t follow the standard output scheme making it not work with tools like nix flake show, is there a specific reason for it?

@Kha
Copy link
Member

Kha commented Mar 19, 2023

perhaps

How would it do that without even referencing lean-toolchain

making it not work with tools like nix flake show

That doesn't work anyway because of IFD (edit: I see this has been addressed by NixOS/nix#6988)

@MangoIV
Copy link
Author

MangoIV commented Mar 19, 2023

How would it do that without even referencing lean-toolchain

I will have a look what the difference there is, principally though, if we have a flake update action it should not get out of sync and also not break randomly

That doesn't work anyway because of IFD

even without the nix fix, there's a hack fix for this.

nix flake show not working is not the only reason why not following the standard output schema is bad, though...

Kha added a commit to Kha/lean4 that referenced this issue Jul 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants