Reviews are an important part of the Swift evolution process. All review feedback should be either on this forum thread or, if you would like to keep your feedback private, directly to me as the review manager by email or DM. When contacting the review manager directly, please put "SE-0565" in the subject line.
What goes into a review?
The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:
What is your evaluation of the proposal?
Is the problem being addressed significant enough to warrant a change to Swift?
Does this proposal fit well with the feel and direction of Swift?
If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
More information about the Swift evolution process is available at:
+1 - it does add complexity, but I think it's warranted to me as a pathway for the better long term success and evolution of Swift packages in the ecosystem, as well as (the potential for) improved feedback from tooling (such as swift build) to help navigate those changes.
I'm in support of addressing this gap today, and I welcome the proposal. Broadly I agree with the solution, with a few smaller comments about the exact API shape.
.library(
// ...
deprecated: .unsupported(...),
)
This sequence of words doesn't read great: "a library is deprecated, unsupported". The other parameters under .library are nouns, this is an adjective ("the library is deprecated") or a verb ("the library was deprecated").
If we were to follow the other parameters (nouns), I'd suggest something closer to:
"status" is a noun, matching the other parameters of the .library(...) call.
"The status is deprecated" reads more naturally. Note that we'd probably need to also have a second case "active" or "maintained", which would be the default value for all existing authors who don't want to mark their package as deprecated.
This allows us to add more statuses, for example, .lookingForMaintainers in the future, .lookingForFunding, and so on. A fair discussion would be how much these statuses are mutually exclusive, and how much it should really be a set of statuses.
The replacement package string is a full identity or a URL, in the current proposal it says only .renamed("paper-tool", package: "paper-tools"), but "paper-tools" only works if it's a dependency of this package, but I assume that usually a package being obsoleted wouldn't directly depend on the package that's obsoleting it. So we need a full identity that future tooling could deterministically turn into a HTML URL to either a package registry or a git host URL.
Moving on to the CLI part of the proposal.
When --allow-deprecations is passed, the exit status is 0 on any successful run regardless of whether deprecated products were found. Load failures still exit non-zero. This mode is intended for humans running the command interactively who do not want a failing shell prompt.
I'm not convinced by this justification, seems like extra complexity for relatively little benefit. If anything, I'd prefer for the exit status code signalling that a deprecated dependency was found to be documented here (e.g. 1), saying any other code than 0 and 1 means an internal error. That way, scripts can be written with this in mind, and we don't need an extra option to essentially disable the exit code accuracy.
And in Future directions, I'm happy to read about "Reporting available-but-unresolved newer package versions", will be a welcome addition later.