Skip to content

Show "Add dependency" Code Action only if there is no package.yaml file #4400

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

Closed
fendor opened this issue Sep 12, 2024 · 2 comments
Closed
Labels
component: hls-cabal-plugin Issues related to the hls-cabal-plugin Hackathon This issue is suitable for hackathon sessions level: easy The issue is suited for beginners type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@fendor
Copy link
Collaborator

fendor commented Sep 12, 2024

If the project is a stack project, there might be a package.yaml file. Adding a dependency to the generated .cabal file is a bad idea, as it will lead to annoying behaviour: Stack will no longer re-generate the .cabal file, so changes to package.yaml are not propagated to the .cabal file any more.

solution:

When looking for the .cabal file in the filesystem, check there is no package.yaml file next to it.

@fendor fendor added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. status: needs triage component: hls-cabal-plugin Issues related to the hls-cabal-plugin and removed status: needs triage labels Sep 12, 2024
@fendor fendor added the Hackathon This issue is suitable for hackathon sessions label Oct 2, 2024
@VeryMilkyJoe VeryMilkyJoe added the level: easy The issue is suited for beginners label Oct 10, 2024
@ASnd-dev
Copy link
Contributor

ASnd-dev commented Oct 11, 2024

We (@JMoss-dev and I) are working on this issue.

@fendor
Copy link
Collaborator Author

fendor commented Oct 12, 2024

Closed by #4422

@fendor fendor closed this as completed Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: hls-cabal-plugin Issues related to the hls-cabal-plugin Hackathon This issue is suitable for hackathon sessions level: easy The issue is suited for beginners type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

3 participants