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

nix build fails because TwoSwitchesGate is an lhs file #95

Open
silky opened this issue May 13, 2024 · 2 comments
Open

nix build fails because TwoSwitchesGate is an lhs file #95

silky opened this issue May 13, 2024 · 2 comments

Comments

@silky
Copy link
Contributor

silky commented May 13, 2024

running nix build . i get

       > Error:
       >
       > <no location info>: error:
       >     Could not load module ‘Crem.Example.TwoSwitchesGate’
       >     It is a member of the hidden package ‘crem-0.1.0.0’.
       >     You can run ‘:set -package crem’ to expose it.
       >     (Note: this unloads all the modules in the current scope.)

i think it's because the TwoSwitchesGate module is defined in an lhs file, and perhaps something special has to be done to make nix find that :/

@marcosh
Copy link
Owner

marcosh commented May 13, 2024

Hi Noon, thanks for reporting!

You know Nix much better than me...

I tried to follow the README instructions and using

nix develop

and then

cabal build

inside the shell works like a charm.

So the question is, what's the difference between nix develop and nix build?

@silky
Copy link
Contributor Author

silky commented May 13, 2024

Yeah there's two things at play here:

  1. Your cabal build is actually cheating somehow; when I run cabal build I get:
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
Warning: Requested index-state 2023-03-14T09:58:19Z is newer than
'hackage.haskell.org'! Falling back to older state ().
Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] trying: crem-0.1.0.0 (user goal)
[__1] trying: crem:*test
[__2] next goal: crem:hspec-discover:exe.hspec-discover (dependency of crem
*test)
[__2] rejecting:
crem:hspec-discover:exe.hspec-discover-2.8.5/installed-FTVhaVWjrbjHDYFa4NfYZ8
(does not contain executable 'hspec-discover', which is required by crem
*test)
[__2] fail (backjumping, conflict set: crem,
crem:hspec-discover:exe.hspec-discover, crem:test)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: crem, crem:test,
crem:hspec-discover:exe.hspec-discover, hspec, hspec-discover
Try running with --minimize-conflict-set to improve the error message.
  1. The original issue

So I suppose there's now two things to fix 😀

Unfortunately I had a quick glance and couldn't fix it. I'll try and take a closer look at some point :)

blackheaven added a commit to blackheaven/crem that referenced this issue Oct 1, 2024
blackheaven added a commit to blackheaven/crem that referenced this issue Oct 10, 2024
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

No branches or pull requests

2 participants