Skip to content

Clarify difference between lsp and hie-bios configuration - #92

Merged
lukel97 merged 3 commits into
mpickering:hie-biosfrom
haskell:project-config-readme
Dec 20, 2019
Merged

lukel97 merged 3 commits into
mpickering:hie-biosfrom
haskell:project-config-readme

Conversation

@lukel97

@lukel97 lukel97 commented Dec 20, 2019

Copy link
Copy Markdown
Collaborator

Do this by renaming explicit configuration to project configuration

Do this by renaming explicit configuration to project configuration
@lukel97
lukel97 requested a review from fendor December 20, 2019 01:57

@fendor fendor left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we also explain that we prefer cabal projects over stack projects at the moment? Or should we rather not?

@lukel97

lukel97 commented Dec 20, 2019

Copy link
Copy Markdown
Collaborator Author

@fendor in what ways do we we prefer cabal projects?

@fendor

fendor commented Dec 20, 2019

Copy link
Copy Markdown
Collaborator

if there is a cabal.project and a stack.yaml we select a cabal project.

@jneira

jneira commented Dec 20, 2019

Copy link
Copy Markdown

if there is a cabal.project and a stack.yaml we select a cabal project.

for completeness, if cabal is available

i think hie-bios would choose plain ghc under some conditions, right?

@lukel97

lukel97 commented Dec 20, 2019

Copy link
Copy Markdown
Collaborator Author

@fendor but if there is no cabal.project and a stack.yaml, then cabal-helper selects a stack project! And a cabal.project is not necessary for cabal v2 builds. I'll add a table documenting this

@jneira

i think hie-bios would choose plain ghc under some conditions, right?
If neither cabal nor stack is on the path I presume

@lukel97
lukel97 requested a review from fendor December 20, 2019 13:00
@fendor

fendor commented Dec 20, 2019

Copy link
Copy Markdown
Collaborator

@jneira no, hie-bios only chooses the cradle based on hie.yaml, we are not using the implicit configuration and c-h only chooses between cabal and stack.

@bubba I think with neither *.cabal file nor stack.yaml, we do not find a project context and we are selecting a none-cradle.

Comment thread README.md Resolved
@alanz

alanz commented Dec 20, 2019

Copy link
Copy Markdown

The old behaviour if there was both a stack.yaml and cabal.project was to look for dist or .stack-work, and choose based on that if there was only one. Fallback to whatever.

@fendor

fendor commented Dec 20, 2019

Copy link
Copy Markdown
Collaborator

We should add that back, but currently we are definitely using the cabal v2-cradle if there is both.

@alanz

alanz commented Dec 20, 2019

Copy link
Copy Markdown

I think the break decision where both are present is arbitrary, there is a hie-bios config file after all, but when it is not present falling back to what the user has at that time does make sense.

@fendor

fendor commented Dec 20, 2019 •

Copy link
Copy Markdown
Collaborator

Should we add this feature after merge or in a consecutive pr?
I think a subsequent pr would be fine.

@alanz

alanz commented Dec 20, 2019

Copy link
Copy Markdown

After merge is fine

@fendor
fendor self-requested a review December 20, 2019 20:23
@lukel97
lukel97 merged commit bfedd03 into mpickering:hie-bios Dec 20, 2019
@lukel97

lukel97 commented Dec 20, 2019

Copy link
Copy Markdown
Collaborator Author

@fendor would it be worthwhile to (sometime after the merge) select the direct cradle in these cases?

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