Docs: Recommend that packages using non-public Base functionality specify a tilde or equals compat entry for Julia #59764
+3
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a follow-up to #35715.
Motivation
As I see it, my reasoning here is similar to our reasoning for requiring upper-bounded
[compat]
entries for packages registered in General. We don't let people register a package with a[compat]
entry of the formMyDep = ">= 1.1.1"
, because there's no way for the package author to know or guarantee that MyDep v2 won't break their package.Similarly, if a package author is using non-public Base functionality, then I don't think they should have a
[compat]
entry of the formjulia = "1.12"
(orjulia = "^1.12"
), because there's no way for the package author to know whether or not Julia 1.13 will break (or remove) the non-public functionality. It's thus safer for the package author to dojulia = "~1.12"
, which will prevent users of Julia 1.13 from installing a broken version of the package.A very risk-averse package author would do
julia = "=1.12.0, =1.12.1, =1.12.2, ..."
, in case the functionality they rely on changes in a patch version. I don't think we need to recommend that level of strictness.Arguments against tilde (or equals)
[compat]
specifiersBreaks PkgEval
One argument against
julia = "~1.12"
is that it renders the package untestable in the PkgEval for therelease-1.13
branch, because the Julia version on therelease-1.13
branch is of the form1.13.0-DEV...
, which is incompatible withjulia = "~1.12"
. So PkgEval wouldn't be able to test any packages with tilde (or equals) Julia[compat]
entries. This is a problem, because the same package that uses non-Base public functionality is probably using some public Base functionality, and we want to run PkgEval to make sure we don't break the public Base functionality in that package.I think we can work around this by having some special logic in PkgEval that rewrites tilde/equals compat entries to caret compat entries, thus allowing us to test these packages in PkgEval.