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
cabal build
does not rebuild source-repository
deps that changed upstream
#8129
Comments
Does it mean the semantics is "take the specified tag; if not specified, take the last used commit hash; if not present, set the last used commit hash to the master branch HEAD hash at this very moment"? And you'd prefer to cut out the middle part and have "if not specified, behave as if it's the first use"? That seems simpler, so perhaps there are use cases when it's convenient to stick to the last used tag, even if not specified? Should we have an option that picks on of the two behaviours? |
Yes, exactly. I observed that going from no tag to |
I think it's better to keep the already fetched commit by default, or no-op I'm not sure adding support for "dynamic tags" is a good idea since they are vcs-specific |
Maybe then there should be command (in analogy to |
I think the best way is to just use the commit sha, so it's also reproducible |
Well this is what you want in some use cases. But this would be the analogue of "freeze", pinning your dependencies to an exact version ( In other cases you might want to follow the upstream developments. If I omit the tag or set it to |
hmm, sure you all know but for completeness, |
no new commands please, we should removing them instead adding them :-P |
Maybe a flag to cabal build? Cabal update is about the package repo, is it? |
yeah, a build (and other commands?) flag would be better |
If I remember correctly, this was not enough to trigger a rebuild. Cabal still used its build artefacts that were no longer in sync with the HEAD of the repo. |
I observed the following:
cabal.project
, depend on an upstream git repo, withtag
omitted (so, depend on themaster
branch).cabal build
. I my case this failed because an upstream type error.master
(that fixes the type error).cabal build
again. It fails with the same error.So, it seems that cabal's caching logic does not take upstream changes into account if the
tag
didn't change.Modifying the
cabal.project
file with putting intag: <commithash>
then triggered the rebuild (and succeeded).The text was updated successfully, but these errors were encountered: