Skip to content

Add haskell-nix.project (and project') #703

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

Merged
merged 9 commits into from
Jun 19, 2020
Merged

Add haskell-nix.project (and project') #703

merged 9 commits into from
Jun 19, 2020

Conversation

hamishmack
Copy link
Collaborator

Generalized version of the cabalProject and stackProject
functions.

Automatically selects the correct project type based on the
projectFileName argument if provided or what files exist in
the src directory if no projectFileName was specified.

If it cannot be determined which it should use the following
error message is given:

error: haskell-nix.project : both `stack.yaml` and `cabal.project`
files exist set `projectFileName = "stack.yaml;"` or
`projectFileName = "cabal.project";`

Generalized version of the `cabalProject` and `stackProject`
functions.

Automatically selects the correct project type based on the
`projectFileName` argument if provided or what files exist in
the `src` directory if no `projectFileName` was specified.

If it cannot be determined which it should use the following
error message is given:

```
error: haskell-nix.project : both `stack.yaml` and `cabal.project` files exist set `projectFileName = "stack.yaml;"` or `projectFileName = "cabal.project";`
```
@hamishmack hamishmack mentioned this pull request Jun 18, 2020
@michaelpj
Copy link
Collaborator

project seems a little generic for me, maybe autoProject?

@angerman
Copy link
Collaborator

project seems a little generic for me, maybe autoProject?

@michaelpj you think? I would assume most people think of their haskell project? autoProject makes me wonder what the auto is all about?

Copy link
Collaborator

@angerman angerman left a comment

Choose a reason for hiding this comment

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

lgtm

@domenkozar
Copy link
Contributor

lgtm

@hamishmack hamishmack merged commit 9e6820c into master Jun 19, 2020
@iohk-bors iohk-bors bot deleted the hkm/project branch June 19, 2020 08:07
@michaelpj
Copy link
Collaborator

I guess I just find project a bit non-descriptive. We have some haskell.nix nomenclature where we refer to a stack/cabal build as a "project", and so "project" makes sense as an abstraction over "cabal project" and "stack project". We're all used to this so it makes sense, but to a newcomer I worry that "project" is a bit too terse. Especially since we live in the Nix world where we have no types! TBH I find cabalProject and friends also too terse - if I had my way I'd probably call this mkPkgSetFromProject or something lengthy.

booniepepper pushed a commit to booniepepper/haskell.nix that referenced this pull request Feb 4, 2022
Generalized version of the `cabalProject` and `stackProject`
functions.

Automatically selects the correct project type based on the
`projectFileName` argument if provided or what files exist in
the `src` directory if no `projectFileName` was specified.

If it cannot be determined which it should use the following
error message is given:

```
error: haskell-nix.project : both `stack.yaml` and `cabal.project` files exist set `projectFileName = "stack.yaml;"` or `projectFileName = "cabal.project";`
```
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.

4 participants