-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
New Manifest.toml format: Pt 1. Teach Pkg new format, but default to old format #2561
New Manifest.toml format: Pt 1. Teach Pkg new format, but default to old format #2561
Conversation
322e82e
to
dcebfee
Compare
1fa2217
to
9bc451e
Compare
9bc451e
to
56cc7c2
Compare
Updates:
Beyond reviewing, I think it would be good for others to try this PR out, on top of JuliaLang/julia#40765 Btw this is marked as do not merge to remind me that CI has been messed with. |
Some thoughts:
|
I feel like a warning should be in 1.7 but maybe how this PR is right now isn't exactly what's needed for the backport to 1.6.2 For the backport I think it needs to default to writing to v1 format, and doesn't need to warn if it's maintaining a v2 manifest. I can make the goal of this PR be the backport which can then be built on.
Perhaps a warning? "Unknown newer Manifest.toml format version detected, unexpected behavior may occur"
Yeah agreed. Also need to add tests to the Base PR |
56cc7c2
to
d4a1e14
Compare
deps
field
Updated based on feedback. In #2557 @davidanthoff suggested Currently
|
Just a minor question: does it make sense to use three-part versions for the manifest/schema version (whatever the name is, I don't really have a preference)? I think semver is not that useful for format versioning, or at least it is not entirely clear to me how one would use it for that. Maybe better to just use an integer for that and keep it simple? |
Yeah three part is definitely excessive, but two might be useful. It only prints 3-part because that's the way I'll convert to a 2-part string during the Edit: Tests pass. The two "Run tests" ones are the only valid tests for now |
|
||
Base.@kwdef mutable struct Manifest | ||
julia_version::Union{Nothing,VersionNumber} = Base.VERSION | ||
manifest_format::VersionNumber = v"1.0.0" # default to older flat format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the Manifest
constructor actually ever called without these arguments being explicitly given? If not, I suggest the defaults are removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is called, when a manifest file doesn't exist https://github.com/IanButterworth/Pkg.jl/blob/8281b20d232768e0bcc4f28eb85965ffdd8a94e1/src/manifest.jl#L176
CI needs re-running when the merged JuliaLang/julia#40765 works its way into the nightlies |
@KristofferC @StefanKarpinski Is this PR good to merge once CI turns green? |
LGTM now |
Windows has caught up, but there seems to be an unrelated issue popping up on MacOS sometimes #2596 |
@fredrikekre or @IanButterworth Can you add this PR to the backports PR (#2592)? |
…old format (JuliaLang#2561) * implement manifest format with deps field * temporarily run CI on base PR * simpler convert_flat_format_manifest * default to old manifest format * remove warning about maintaining old manifest format * add unknown manifest format warning * fix * only print the major and minor part of the `manifest_format` to file * add tests for manifest.toml formats * add test for unknown manifest format warning * provide manifest file path in warning, when available * Revert "temporarily run CI on base PR" This reverts commit d4a1e14. * add support for unknown extra data in Manifest * fixes * add missing write_manifest method * fix with windows-safe regex Co-authored-by: KristofferC <[email protected]>
#2575 will need backporting before this. And might as well do #2581 too. |
It would be good to clean up the commit message a bit when squash merging something big like this. |
…old format (#2561) * implement manifest format with deps field * temporarily run CI on base PR * simpler convert_flat_format_manifest * default to old manifest format * remove warning about maintaining old manifest format * add unknown manifest format warning * fix * only print the major and minor part of the `manifest_format` to file * add tests for manifest.toml formats * add test for unknown manifest format warning * provide manifest file path in warning, when available * Revert "temporarily run CI on base PR" This reverts commit d4a1e14. * add support for unknown extra data in Manifest * fixes * add missing write_manifest method * fix with windows-safe regex Co-authored-by: KristofferC <[email protected]> (cherry picked from commit a3fc759) New manifest format: Fix `upgrade_manifest` and raw dict entry for nothing (#2610) (cherry picked from commit b8bea6c)
Initial discussion in #2557
This is Part 1, which is intended to be backported to 1.6.2
julia_version
andmanifest_format
metadata fields, and package deps nested under adeps
fieldmanifest_format
version is detectedPart 2: #2580
GitHub actions CI has been limited to linux 64 and that PR's binary is used (ignore appveyor)