Uh oh!
There was an error while loading. Please reload this page.
Add unpacking of extra deps - #6175
Conversation
mpilgrem
commented
Jun 24, 2023
@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-repocommit: 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-repocommit: 08c9b4cdf977d5bcd1baba046a007940c1940758( see https://docs.haskellstack.org/en/stable/pantry/#github-archive-files) would be doing something that |
develop7
commented
Jun 29, 2023
@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 |
philderbeast
commented
Jun 29, 2023
For my testing, I added it |
philderbeast
commented
Jun 29, 2023
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
cbdad84Compare@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: |
develop7
commented
Jun 30, 2023
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 |
develop7
commented
Jul 1, 2023
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? |
mpilgrem
commented
Aug 15, 2023
@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. |
philderbeast
commented
Aug 19, 2023
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 |
mpilgrem
commented
Oct 13, 2023
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-depsin 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.