-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add support for deprecated-versions #18
Comments
See also #8 |
@angerman advised me yesterday to start looking at this issue. I spent sometimes understanding what this project does, how to use it etc … Thinking a bit about this issue, I could put the deprecated attribute in the Would it make sense that I start by implementing the |
I think they're a pair: they're the same underlying mechanism so we probably actually want to do them together. |
I understand “depreciated” as by extend “all previous versions are depreciated”, should we rather here talk about a “yanked” version as “this particular version couldn't longer be used”? |
Well, I think that's not quite the case, since I think you can override it with sufficiently stringent constraints on the user side. Also I think we want to follow Hackage's naming here to avoid confusion! |
If we where to implement package version deprecation, we need to figure out how to encode this in the input metadata.
|
Brainstorming a bit. At the moment we essentially have a list of events that change the status of the package.
All of these have timestamps because they happen at a particular time (they're events!). The package addition can only happen once and must happen for a package to be included, so we put its metadata in the root. We represent a revision event with a So that suggests to me we want a
i.e. we have a We still need to do the checks that Andrea points out, though. |
Okay, I think there are 2 questions here:
|
The underlying mechanism is just preferred versions. Deprecated versions are implemented by preferring everything else, I believe. The point is that we only want to expose the concept of deprecation to our users. |
So basically, the mechanism implemented will be to construct the And the list could be most likely constructed from a list of timestamped depreciation / undepreciation steps, right? |
A minimal example would be:
Then the computed depreciated version list is
Am I correct? |
@yvan-sraka I think you got it. The file To see how the The logic of computing the preferred versions seems to be here. In particular the
The version handling functions are exported by Cabal-syntax so we can use the same ones. |
Fix #18: add support for deprecated-versions
This is pretty handy, as it's a useful tool in case of the not-so-uncommon problem of "oops, I released something broken".
The text was updated successfully, but these errors were encountered: