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

update resolver, package with nix #31

Merged
merged 9 commits into from
Aug 7, 2024
Merged

update resolver, package with nix #31

merged 9 commits into from
Aug 7, 2024

Conversation

chris-martin
Copy link
Contributor

@chris-martin chris-martin commented Jul 30, 2024

If you want to try out the Nix package, you can run:

nix shell \
  'github:freckle/stack-lint-extra-deps?ref=chris/pkg' \
  --command stack-lint-extra-deps --help

It should just download the pre-built binary the Freckle public cache (if the github actions for your platform have finished running).

This is my first time trying out stacklock2nix; it seems pretty okay.

Tagging Pat plus anyone Nix-using or Nix-curious.

@chris-martin
Copy link
Contributor Author

chris-martin commented Jul 30, 2024

Not sure why the macos check is failing. It doesn't seem related to the change.

  • First run - I see one similar report but no conclusive answer. The failure seems to be ephemeral.
  • Third run - Wonder if it has something to do with github's runners switching architecture on macos-latest. Yep... Holding the runner back to macos-12 seems to fix it.

flake.nix Show resolved Hide resolved
flake.nix Show resolved Hide resolved
flake.nix Show resolved Hide resolved
@chris-martin
Copy link
Contributor Author

Bizarre, Linux and MacOS are getting different hashes for the all-cabal-hashes input.

@cdepillabout
Copy link

Bizarre, Linux and MacOS are getting different hashes for the all-cabal-hashes input.

I vaguely remember seeing this before, due to how all-cabal-hashes has multiple files with names that differ only by case. If you try to unpack this file on a filesystem that doesn't allow the same file name with multiple casings, Nix gives you a different hash.

I forget off the top of my head what the workaround for this is, but you could try pulling all-cabal-hashes down as a tarball. I believe that might get rid of this error:

https://github.com/cdepillabout/stacklock2nix/blob/22676dfc45fa1c33899ba1da1a23665172a18ba7/CHANGELOG.md?plain=1#L188-L218

The example in this link is showing how to add all-cabal-hashes as a directory, which will likely(?) give the hash error you were seeing.

Instead, you might be able to add all-cabal-hashes as a tarball. This should give the same hash on both Linux and OSX:

https://github.com/cdepillabout/stacklock2nix/blob/22676dfc45fa1c33899ba1da1a23665172a18ba7/test/test-new-package-set.nix#L33-L41

It looks like you might be using flake inputs though, so you'll have to adapt this a little.

Copy link
Member

@pbrisbin pbrisbin left a comment

Choose a reason for hiding this comment

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

Sounds cool, but I know absolutely nothing in this space, so I'll defer review to others.

@StevenXL
Copy link

StevenXL commented Aug 1, 2024

@chris-martin I don't have the required knowledge to give you a review. I'll defer to others, but that leaves @cdepillabout.

P.S. Hi Dennis!!!

Copy link

@jason-lieb jason-lieb left a comment

Choose a reason for hiding this comment

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

Also deferring

@chris-martin
Copy link
Contributor Author

Checks pass! @cdepillabout thanks a million for the tool and the advice, wouldn't have gotten there without you.

@chris-martin
Copy link
Contributor Author

Looks like nobody wants to review; I'm going to go ahead since we've also talked about this in Slack, and there's nothing here that can't be undone.

@chris-martin chris-martin enabled auto-merge (squash) August 7, 2024 18:15
@chris-martin chris-martin disabled auto-merge August 7, 2024 18:15
@chris-martin chris-martin merged commit dd99989 into main Aug 7, 2024
7 checks passed
@chris-martin chris-martin deleted the chris/pkg branch August 7, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants