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-Helper: Select project context based on available tools #52

Closed
fendor opened this issue Nov 17, 2019 · 2 comments · Fixed by #54
Closed

Cabal-Helper: Select project context based on available tools #52

fendor opened this issue Nov 17, 2019 · 2 comments · Fixed by #54
Assignees

Comments

@fendor
Copy link
Collaborator

fendor commented Nov 17, 2019

Our usage of c-h (cabal-helper) works roughly the following: Find a project context, initialise the context, find cradle for a filepath and load it.
The first step, find a project context, decides the the project context based on the location of a cabal.project, stack.yaml and *.cabal files. If there is a tie, e.g. cabal.project and stack.yaml are found in the same directory, we do not specify whether this a cabal-v2 project or a stack project but rather let the implementation decide. Practically, due to the implementation in c-h, we prefer cabal-v2 over stack.
However, it is possible that users have only one of the two installed, not both, thus, we can specify that if you have no cabal-install, or stack, installed, we never select a cabal-v2 project, or stack project, respectively.

Responsible code is the function:

findCabalHelperEntryPoint :: FilePath -> IO (Maybe (Ex ProjLoc))

@fendor fendor mentioned this issue Nov 17, 2019
26 tasks
@fendor
Copy link
Collaborator Author

fendor commented Nov 17, 2019

@bubba This is what I meant with "Check, if the user has the build-tools on the Path, before selecting a project type" in #48 (comment).
Do you want to tackle this?

@lukel97 lukel97 self-assigned this Nov 18, 2019
@lukel97
Copy link
Collaborator

lukel97 commented Nov 18, 2019

@fendor yup, this makes sense to me

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 a pull request may close this issue.

2 participants