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

cabal.project parse error due to leading comment #193

Open
Tracked by #307
peterbecich opened this issue Aug 21, 2023 · 4 comments
Open
Tracked by #307

cabal.project parse error due to leading comment #193

peterbecich opened this issue Aug 21, 2023 · 4 comments
Labels
good first issue Good for newcomers

Comments

@peterbecich
Copy link

May be slightly different error than #186

I believe the leading comment

-- This project config requires cabal 2.4 or later

-- If in doubt, use GHC 8.8 to build hackage-server; see
-- 'tested-with' in 'hackage-server.cabal' for a list of currently
-- CI-validated GHC versions
--
-- with-compiler: ghc-8.8

packages: .

causes an error, in addition to the error on the packages line.

Fails with error:
https://github.com/peterbecich/hackage-server/blob/cabal-project-parsing-error/cabal.project
branch: https://github.com/peterbecich/hackage-server/tree/cabal-project-parsing-error

Succeeds:
https://github.com/haskell/hackage-server/blob/06f831ef7a701967f22128087b3817cdff185cbc/cabal.project
branch: https://github.com/peterbecich/hackage-server/tree/update-flake
PR: haskell/hackage-server#1244

Thanks again

@srid
Copy link
Owner

srid commented Aug 24, 2023

The parser is indeed very primitive accepting only limited possible syntax.

This would be a good-first-contribution to haskell-flake: https://github.com/srid/haskell-flake/tree/master/nix/haskell-parsers

We use https://github.com/kanwren/nix-parsec under the hood.

@srid srid added the good first issue Good for newcomers label Aug 24, 2023
@ParetoOptimalDev
Copy link

ParetoOptimalDev commented Aug 29, 2023

The parser is indeed very primitive accepting only limited possible syntax.

This would be a good-first-contribution to haskell-flake: https://github.com/srid/haskell-flake/tree/master/nix/haskell-parsers

My ideal is using haskell-flake and this parser being very complete, eventually I'd like to contribute to that.

I don't even have all of my work codebases using Nix yet though, so it's a bit of a blocker.

Just now realizing actually I can probably get work codebase working using your advice on specifying manually here.

Then for my other node codebase requiring process ordering similar to docker compose I remember you mentioned:

https://zero-to-flakes.com/process-compose-flake/

Do you also have something for dotenv support that you use similar to: https://github.com/cachix/devenv/blob/main/src/modules/integrations/dotenv.nix (moved question to juspay/flakular.in#14)

For pragmatism I decided for now to use devenv and got stuck on how to use process-compose there:

cachix/devenv#782

I'm now realizing though since I'm the only user I could just as easily use haskell-flake and perhaps any similar project for node if it exists rather than devenv.

Sorry for the off topic, just wanted to express my interest and give you a picture of roadblocks for someone who wants to contribute 😄

@srid
Copy link
Owner

srid commented Aug 29, 2023

@ParetoOptimalDev Could you move the dotenv part of your comment to Discussions? I'll comment there.

EDIT: Or you can post in https://github.com/juspay/zero-to-flakes/discussions

@srid
Copy link
Owner

srid commented Aug 29, 2023

Then for my other node codebase requiring process ordering similar to docker compose I remember you mentioned:

https://zero-to-flakes.com/process-compose-flake/

https://github.com/juspay/services-flake aims to replace docker-compose and devenv services.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants