Skip to content

Add shell.allDeps as a fix for #1793 #1794

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 2 commits into from
Dec 1, 2022
Merged

Add shell.allDeps as a fix for #1793 #1794

merged 2 commits into from
Dec 1, 2022

Conversation

hamishmack
Copy link
Collaborator

#1769 added all the tool dependencies of the hsPkgs in a project to the shell. This is great for cabal projects where the set of packages will be limited to those in the plan. It allows these packages to be rebuilt by cabal.

For stack projects however this set is much larger (all of stackage), likely to include unwanted tools and tools that may be broken.

This change adds shell.allDeps and defaults it to false for stack projects.

Fixes #1793

@hamishmack hamishmack changed the title Add shell.allDeps as a fix Add shell.allDeps as a fix for #1793 Nov 29, 2022
#1769 added all the tool dependencies of the hsPkgs in a project to the shell.  This is great for cabal projects where the set of packages will be limited to those in the plan.  It allows these packages to be rebuilt by cabal.

For stack projects however this set is much larger (all of stackage), likely to include unwanted tools and tools that may be broken.

This change adds `shell.allDeps` and defaults it to `false` for stack projects.

Fixes #1793
Copy link
Collaborator

@michaelpj michaelpj left a comment

Choose a reason for hiding this comment

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

I guess this is fine, but it will also mean that if you have a stack project that needs those tools in the shell then it won't work, right?

@hamishmack
Copy link
Collaborator Author

For stack projects if tools are needed in the shell that are not in the selectedComponents there are two options:

  • Set allToolDeps = true and debug all the tool dependencies in the packages in stackage
  • Add the hsPkgs packages we want to build in the shell (that need tools) to the additional selector arg

@hamishmack
Copy link
Collaborator Author

bors try

iohk-bors bot added a commit that referenced this pull request Nov 30, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Nov 30, 2022

try

Timed out.

@michaelpj
Copy link
Collaborator

bors try

iohk-bors bot added a commit that referenced this pull request Nov 30, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Nov 30, 2022

try

Timed out.

@hamishmack
Copy link
Collaborator Author

bors try

iohk-bors bot added a commit that referenced this pull request Dec 1, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Dec 1, 2022

try

Timed out.

@hamishmack hamishmack merged commit b90fbaa into master Dec 1, 2022
@hhefesto
Copy link

hhefesto commented Dec 8, 2022

This fix worked for the small repo I did to reproduce the problem, but sadly it didn't work for my company's repo. I've added more info on the issue I opened, and hopefully you can pick up on something that I haven't been able to see from days of trying : (

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.

happy-plan-to-nix-pkgs fails on hello-world with flake + haskell.nix + stackProject
3 participants