Skip to content
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

Require [compat] for stdlib dependencies #516

Merged
merged 6 commits into from
Oct 26, 2023
Merged

Conversation

vchuravy
Copy link
Member

@vchuravy vchuravy commented Oct 6, 2023

Fixes #515, by no longer treating stdlibs as special.


(Note: previously, this PR also added the requirement for JLL dependencies. That was removed from this PR.)

@vchuravy
Copy link
Member Author

vchuravy commented Oct 6, 2023

This may be to aggressive, but I do think that we need compat entries at least for every stdlib.

DilumAluthge
DilumAluthge previously approved these changes Oct 6, 2023
Copy link
Member

@DilumAluthge DilumAluthge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM.

Note that the JLL requirement will only apply to non-JLL packages. In other words:

  1. Suppose that Foo.jl depends on Bar.jl and Hello_jll.jl. Foo.jl must have a compat entry for Bar.jl (this was already the case before this PR). Foo.jl must have a compat entry for Hello_jll.jl (this is new, introduced in this PR).
  2. Suppose that Hello_jll.jl depends on World_jll.jl. Hello_jll.jl does NOT need a compat entry for World_jll.jl. This is one of the "special JLL exceptions" that we apply to JLL packages that come from Yggdrasil.

@DilumAluthge
Copy link
Member

cc: @staticfloat @giordano (to take a quick look at the JLL-related changes)

@ericphanson
Copy link
Member

ericphanson commented Oct 6, 2023

This change makes sense to me, but when deployed, this should be accompanied by a discourse post announcing the change and the rationale. (Including what authors should do, e.g. how should they set compat bounds on stdlibs)

@vchuravy
Copy link
Member Author

vchuravy commented Oct 6, 2023

@ericphanson how about the following annoucement

PSA: Compat requirements in the General registry are changing.

Up until now standard libraries (and JLL's) have been excluded from the mandatory
requirement of being listed in [compat]. Since the version of a standard library was
tightly coupled to the version of Julia it was shipped with.

In Julia v1.11 (and to an lesser extend v1.10) we are moving towards upgradeable standard libaries,
this means that Julia will still come with the same selection of standard libraries, but instead of waiting
for a new Julia release, standard libraries will have their own release cycle. So it should be possible in
the future to use Pkg v1.12 on Julia v1.11.

In effect standard libraries are becoming normal Julia packages, with the only difference that a version of
them will be shipped with a default Julia install.

Now this means that version numbers of standard libraries and Julia are no longer coupled and one
must manually declare [compat] requirements for standard libraries as well as Julia in your Project.toml.
We will handle the registry side of things automatically, but developers will have to
manually adjust their Project.toml the next time they release a version to the registry.

So a Project.toml like:

name = "TestStdlibMissingCompat"
uuid = "4a0d4eb6-ee8c-4d0f-9d49-1daa6f6c32cf"
authors = ["Valentin Churavy <v.churavy@gmail.com>"]
version = "0.1.0"

[deps]
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
julia = "1.9"

Would become:

name = "TestStdlibMissingCompat"
uuid = "4a0d4eb6-ee8c-4d0f-9d49-1daa6f6c32cf"
authors = ["Valentin Churavy <v.churavy@gmail.com>"]
version = "0.1.0"

[deps]
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
julia = "1.9"
Statistics = "1.9"

@DilumAluthge
Copy link
Member

In your example Project.toml file, can you also add an example JLL dependency, just for purposes of illustration?

Copy link
Member

@giordano giordano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this doesn't enforce compat bounds in jlls, as said above, then it looks good to me. For enforcing compat bounds also in jlls, which I'd like to, I'd need help with JuliaPackaging/BinaryBuilderBase.jl#314, I had troubles with installation of stdlib jlls in the build environment

@ericphanson
Copy link
Member

That sounds great to me, but I agree with Dilum we should mention more JLLs too, not just stdlibs, since we're changing both here. (We mentioned they were exempt but not that they are no longer exempt). Also as a tiny grammar nit,

Since the version of a standard library was tightly coupled to the version of Julia it was shipped with.

is kinda an incomplete sentence; maybe:

Stdlibs were exempt because the version of a standard library was tightly coupled to the version of Julia it was shipped with.

@DilumAluthge
Copy link
Member

@vchuravy and/or @staticfloat - can you help @giordano out with JuliaPackaging/BinaryBuilderBase.jl#314?

@vchuravy
Copy link
Member Author

After a conversation with @DilumAluthge I would say let's back out the JLL change for now, that seems like a bigger change and the stdlib change needs to happen now.
We are already likely to have some inconsistencies in the Registry.

@vchuravy vchuravy changed the title Require [compat] for all dependencies Require [compat] for stdlib dependencies Oct 14, 2023
@DilumAluthge DilumAluthge self-requested a review October 14, 2023 19:53
@DilumAluthge DilumAluthge self-assigned this Oct 14, 2023
@DilumAluthge DilumAluthge changed the title Require [compat] for stdlib dependencies Require [compat] for stdlib dependencies Oct 14, 2023
@DilumAluthge
Copy link
Member

Let's call this breaking. I've bumped the major version number to 9.

@DilumAluthge
Copy link
Member

bors try

bors bot added a commit that referenced this pull request Oct 19, 2023
@bors
Copy link
Contributor

bors bot commented Oct 19, 2023

try

Build failed:

@DilumAluthge
Copy link
Member

@vchuravy We need to fix several of the integration tests.

@DilumAluthge
Copy link
Member

bors try

bors bot added a commit that referenced this pull request Oct 19, 2023
@bors
Copy link
Contributor

bors bot commented Oct 19, 2023

try

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

Copy link
Member

@DilumAluthge DilumAluthge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DilumAluthge
Copy link
Member

bors merge

@bors
Copy link
Contributor

bors bot commented Oct 26, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 3082b39 into master Oct 26, 2023
11 checks passed
@bors bors bot deleted the vc/require_compat_for_all branch October 26, 2023 05:36
@DilumAluthge
Copy link
Member

This will be registered in JuliaRegistries/General#94135.

@DilumAluthge
Copy link
Member

This will be deployed by the combination of JuliaRegistries/General#94141 and JuliaRegistries/General#94142

@vchuravy
Copy link
Member Author

I reran StdlibRegistryCompatUpdater for DelimitedFiles and Statistics JuliaRegistries/General#94159

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Require compat statements for upgradeable stdlibs.
4 participants