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

Local dependency building is broken #5680

Closed
drone29a opened this issue Feb 16, 2022 · 2 comments
Closed

Local dependency building is broken #5680

drone29a opened this issue Feb 16, 2022 · 2 comments

Comments

@drone29a
Copy link

General summary/comments (optional)

There is a bug where a local dependency that has been built from a local consumer project would be installed in the package db for the consumer project but not in the local dependency's own package db. This results in an error where ghc-pkg is unable to find the cached local package in its own package db and the build fails. This can be resolved by running stack clean and then stack build for the local dependency, but then a build for the consumer of the package will fail as it tries to find the local dependency in its own package db. The only fix is then to again run stack clean for the local dependency and then run stack build for the consumer of the dependency.

I have provided a PR with a simple fix (#5613). This fix is extremely simple: remove one line that modifies the setup-config file and causes the trouble. A more satisfying fix for this issue may be to figure out how to adjust the package db search so that cached builds can be used both by the local package and any consumers of the local package.

Steps to reproduce

See description above.

Expected

See description above.

Actual

See description above.

Stack version

2.7.3

Method of installation

  • Official binary, downloaded from stackage.org or fpcomplete's package repository
@ysangkok
Copy link

ysangkok commented Mar 7, 2022

Should this be closed? It was mentioned in the 2.7.5 release notes: https://github.com/commercialhaskell/stack/releases/tag/v2.7.5

@drone29a
Copy link
Author

drone29a commented Mar 7, 2022

Yes, this was resolved with @borsboom's #5613.

@drone29a drone29a closed this as completed Mar 7, 2022
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

No branches or pull requests

2 participants