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

Haskell version being created when using scala command #295

Closed
HarvMarv opened this issue Sep 13, 2022 · 7 comments
Closed

Haskell version being created when using scala command #295

HarvMarv opened this issue Sep 13, 2022 · 7 comments

Comments

@HarvMarv
Copy link

Hi, I didn't know where else to post this and I'm unsure if this problem is specific to my platform, but I will describe below on the chance this sheds light on any issue.

Problem

When running nix build #.ctfp-scala in terminal, only the haskell pdf is created.

System info:
OS: MacOS Monterey 12.5.1
Hardware: Apple M1 Pro

Additional info:
I have followed the guide in the Readme to the T so I am using Nix.

Other things I've tried:
I have removed the result directory and then ran nix-collect-garbage to try to build cleanly, but still get the same result (haskell version of the book)

Thank you

@drupol
Copy link
Collaborator

drupol commented Sep 13, 2022

Let me get back to you this afternoon about this.

@drupol
Copy link
Collaborator

drupol commented Sep 13, 2022

Could you try nix build .#ctfp-scala -o ctfp-scala.pdf ?

@HarvMarv
Copy link
Author

Apologies for the confusion - I seem to have fixed the issue.

I once again cleaned any residual files by deleting result/ and running nix-collect-garbage.

I then tried to build nix build #.ctfp and subsequently nix build #.ctfp-scala - I guess the base pdf has to be built before building the scala snippets in order for nix to not get confused?

If this is correct, I am happy to open a pull request with a note in the readme detailing this quirk.

@drupol
Copy link
Collaborator

drupol commented Sep 13, 2022

No, the syntax is first the dot, then the hash. You can just build the Scala version with the command I wrote up there.

Can you try and report back?

Tips: There is no need to do nix-collect-garbage -d, just nix build is enough.

@HarvMarv
Copy link
Author

HarvMarv commented Sep 13, 2022

The command you gave me works as expected, thank you. Looking through my command history I see that I was using nix build #.ctfp-scala (hash then dot).

I guess nix took my non-existant flake and disregarded it in order to build the default flake - I didn't notice because nix did not produce any visible errors or warnings regarding this

@drupol
Copy link
Collaborator

drupol commented Sep 13, 2022

Ok cool ! Glad we found out the issue.

Going to close the issue, feel free to re-open if you feel something hasn't been fixed regarding this issue.

@drupol drupol closed this as completed Sep 13, 2022
@HarvMarv
Copy link
Author

Thank you for your help, drupol

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