Skip to content
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

Fix failure to find package when a dependency is shared between projects (#5680) #5682

Merged
merged 3 commits into from
Feb 21, 2022

Conversation

borsboom
Copy link
Contributor

This fixes a regression that was introduced in f641880 (the fix for #5578). Now, a package will be reconfigured if the project it's being built from (and therefore the local package database it gets installed to) changes.

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary. (N/A)

How I tested:

  • A new integration test is added in test/integration/tests/5680-share-package-across-projects

@borsboom
Copy link
Contributor Author

@snoyberg Now, in addition to the file stack-cabal-mod and stack-setup-config-mod files written to the package to track modification times, a new stack-project-root file gets written containing the project root when it was last built. I wonder if it would make sense to consolidate all this information into a single JSON or YAML file rather than writing separate files?

@istathar
Copy link
Contributor

Built and tested locally (with lts-18.25 as it happens) and as far as I can tell the problem we encountered is no longer occurring, at least not using the jumping around that I demonstrated to you. I'll keep using this Stack binary through the next couple days on our main project to see if things stay sane but looking good!

Great work @borsboom and @drone-rites!

@drone29a
Copy link

This is great news, thanks for fixing! I'll also switch to this branch for local use until this fix makes it's way to a release.

@qrilka
Copy link
Contributor

qrilka commented Feb 21, 2022

@borsboom I think single JSON makes sense

Copy link
Contributor

@snoyberg snoyberg left a comment

Choose a reason for hiding this comment

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

Nice work and nice integration test! Sorry for breaking this.

And yes, I think putting everything into a single JSON is cleaner, but it wouldn't be a blocker.

My recommendation would be cutting a release once this is merged and has at least a bit of testing.

@borsboom borsboom merged commit 74d98fd into master Feb 21, 2022
@borsboom borsboom deleted the 5680-share-package-across-projects branch February 21, 2022 22:55
@istathar
Copy link
Contributor

@snoyberg I've been testing this for a week and it's been good; @dmvianna was not using it and just hit the bug, tried building Stack from master and the problem went away. Thank you so much for getting @borsboom to look on this. We'd be keen for a 2.7.4 release whenever you're ready.

@snoyberg
Copy link
Contributor

snoyberg commented Mar 1, 2022

@borsboom is planning on a release later this week. I believe it will be 2.7.5.

@borsboom
Copy link
Contributor Author

borsboom commented Mar 6, 2022

@istathar Now released here: https://github.com/commercialhaskell/stack/releases/tag/v2.7.5

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.

5 participants