-
Notifications
You must be signed in to change notification settings - Fork 841
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
Add unpacking of extra deps #6175
base: master
Are you sure you want to change the base?
Add unpacking of extra deps #6175
Conversation
@philderbeast, what is meant by a 'source repository package'? Do you mean that |
I use the term source repository package (borrowed from cabal-speak) to mean things like: extra-deps:
- git: https://github.com/example-user/my-repo
commit: 08c9b4cdf977d5bcd1baba046a007940c1940758 |
For cloning a Git repository and setting it to a specific commit, is that not somewhat duplicative of what the EDIT: In contrast, the equivalent of: extra-deps:
- github: https://github.com/example-user/my-repo
commit: 08c9b4cdf977d5bcd1baba046a007940c1940758 ( see https://docs.haskellstack.org/en/stable/pantry/#github-archive-files) would be doing something that |
@philderbeast so it doesn't actually unpack dependencies mentioned in |
Another more usual motivation: if I'm having trouble with a dependency, I can unpack it, add it as a local package and add tracing to see what's up with it. We have this for packages on stackage and for |
For my testing, I added it |
This is a lower ceremony way of debugging a dependency than |
The CI is failing because something in MSYS2 now changes the way that |
cc70193
to
cbdad84
Compare
@philderbeast, I still do not follow what you are proposing for the
or (making use of the GitHub
or (effectively cloning a Git repository and setting it to a specific commit)
or are you suggesting a new flag like
EDIT: If the latter, why restrict it to extra deps? Why not extend the concept to the project's 'dependencies' (its snapshot as extended by extra deps and truncated by drop-packages)? So, you would have something like:
|
For some reason I've always thought |
@develop7, I could be convinced that Currently, if you use (say) If Stack was to rely on dependencies, it would - instead - (outside of a project directory) look up the project-level YAML configuration in the 'global project'. Given the quite different behaviour, I think you would need a flag. You might also need another flag to opt between putting what is fetched info directory EDIT: There is also the question of what should happen if a package is not a dependency. For example (assuming that
Should that report that |
It's kind of the way I expected it should work, you know? We've got the project, the project depends on libraries of certain versions, hence it makes perfect sense
In order to improve backward compatibility I'd make
uh-huh, something along the lines of
Print a warning, and fallback to the @philderbeast what do you think BTW? |
@philderbeast, do you have a view on the UI discussion above? I am thinking of releasing a new version of Stack soon. Letting you know in case you want to see some version of this idea reflected in it. |
Thanks for the alert. I've settled on using make and downloading a tar archive from hackage for the package containing the tooling I want to bring into a project. This feels better than adding a dependency to a project that is only a build tool, something like a project-level @mpilgrem and @develop7 thanks for the discussion so far. @mpilgrem please go ahead with the next stack release without this half-baked feature. I need to review how stack and cabal currently handle unpacking. They both preserve the |
I have converted the status of this pull request to 'draft', given the above. |
I haven't added any tests. I tested by adding to
extra-deps
in the stack project itself and then running:I have a tool that I'd like to distribute as a package (rather than as a git submodule) and this would allow me to do that as the tool needs to be located in its own folder in the root of a project.