-
Notifications
You must be signed in to change notification settings - Fork 701
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 update
does not bring revisions of metadata into effect.
#9201
Comments
I quickly tried to reproduce this, but it seems I am failing. What am I doing wrong?
|
You did not have a local copy of |
Maybe it can be reproduced by messing with |
I cannot reproduce.
|
What if you try to follow the steps I offered? I tried it out again and I can still reproduce the erratic behaviour.
— Reproduction successful. A tip to speed you up:
— Put this into Perhaps that the failure I described cannot be reproduced by messing with |
@kindaro I tried following your steps and put together this script: https://gist.github.com/andreabedini/283ee0213f304050bcddae830933d0c1 With this script I cannot reproduce the issue. Nevertheless the tip "to speed me up" gives away the issue you must have been facing:
Without Take out the Were you using an internal repository by any chance? |
Please reopen if the problem is not fully resolved. |
Thank you Andrea @andreabedini. This is a beautifully written shell script. I did not run it — I believe you. The cause you pointed out is likely true. I see that the line
Is this the default situation? Perhaps I had commented it out some time ago — I do not remember. If so it was my mistake. Although… The documentation says:
This assertion seems to be false. According to you, the issue can be seen locally exactly when Cabal runs outside of secure mode. According to the documentation I quote, Cabal always runs in secure mode when interacting with If, contrary to the documentation, Cabal runs outside of secure mode by default and without exceptions, it seems there is a dangerous pitfall. Security should be something you must opt out of, not opt in. For example, Elasticsearch recently added security by default even though this change makes it incompatible with some of the installations existing at that time.
I should also say that the implications of secure mode are not clear to me. My Cabal installation does accept the flag I fear the problem is not fully resolved yet… I cannot open this issue again because there is no such button on offer. Perhaps you could check the settings of this repository and allow this action. |
Thank you, it did take a good few hours of my time, I am glad it wasn't time wasted.
Nah, this is the default configuration as initialised by cabal. TBH I have not idea how we write out the default values as commented options 🤷
I agree with your conclusion. One because you can explicitly set Proof:
If I then inspect the resulting project configuration1, I see
where the first comes from the global configuration and the second comes from the project config. Notice that they are indentical in their textual representation. I reckon all this should be revisited (documentation and logic). @gbaz are you aware of this?
I understand but without a reproducible example there is nothing I can do.
You are correct. non secure-secure mode is often referred to as "legacy mode" in the codebase. How different kind of repositories are configured and handled in the codebase is another thing I would like to see refactored but alas all my attempts at wrangling it have failed so far.
I don't have permission to change the settings but I can reopen the issue for you. Footnotes
|
Describe the bug
Take a look at the revision here. Its aim is to make the use of this version impossible, because it is broken: pcapriotti/optparse-applicative#475. However, I can still build stuff that depends on this broken version even after I run
cabal update
. It seems metadata is not updated in my local copy of this package that Cabal downloaded before the revision was made.I do confirm that fetching this version anew with
cabal get
and trying to build that freshly fetched package results in dependency resolution error, as expected.To Reproduce
x
of versionv
to Hackage.y
that depends onx
of versionv
and only of versionv
.y
builds.x
of versionv
on Hackage such that it can never be resolved.cabal update
.y
still builds, even though it now depends on an unresolvable versionv
ofx
.Expected behavior
y
should not build, because the revised metadata of its dependencyx
make it unresolvable.System information
The text was updated successfully, but these errors were encountered: