-
Notifications
You must be signed in to change notification settings - Fork 77
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
Migrate to config 1.0 #1533
Comments
I did a quick look at the dist-version = "0.24.1"
targets = [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
"x86_64-pc-windows-msvc",
]
[[artifacts.extra]]
build = [
"cargo",
"run",
"--release",
"--",
"dist",
"manifest-schema",
"--output=dist-manifest-schema.json",
]
artifacts = ["dist-manifest-schema.json"]
[ci]
pr-run-mode = "plan"
publish-jobs = ["./publish-crates"]
[ci.github.runners]
aarch64-unknown-linux-gnu = "buildjet-8vcpu-ubuntu-2204-arm"
aarch64-unknown-linux-musl = "buildjet-8vcpu-ubuntu-2204-arm"
[hosts]
axodotdev = true
[hosts.github]
attestations = true
[installers]
install-path = "CARGO_HOME"
powershell = true
shell = true
updater = false
[installers.bin-aliases]
dist = ["cargo-dist"]
[installers.homebrew]
tap = "axodotdev/homebrew-tap"
[installers.npm]
scope = "@axodotdev"
[publishers]
homebrew = true
npm = true |
Note: the above generated config is missing the top-level [dist]
dist-version = "0.24.1"
targets = [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
"x86_64-pc-windows-msvc",
]
[[dist.artifacts.extra]]
# ... Currently, the
Steps 1 and 2 are the steps that are specific to the old config format. Step 3 ensures that we're now in config 1.0 land. Any branching we do just needs to be in the form of obtaining a Meanwhile, over in init land, we skip the standard parsing code entirely. Instead, we parse it using cargo-dist/cargo-dist/src/init.rs Line 90 in 7dd0f7f
This means that to handle the config 1.0 conversion in init, we'll want to do one of two things:
|
talked with Ashley a bit, and my current rough plan is:
|
|
Internally, we've migrated to the planned 1.0 config format - we parse the original format, then do a conversion to the new structure. The new structure is set up with serialization and deserialization routes that makes it theoretically possible to read the new files - but nothing is set up to actually do so. Our final steps to complete this migration will be:
dist init
to read the old config format and migrate to the new one, and then use that new format as the basis for edits we make to the user's config files on their behalf. This should allow us to painlessly migrate everyone to the new format.My plan is that when we introduce this, any commands except
init
will refuse to run if they're loaded from the old config files, but can use that as information to notify users that they need to upgrade viadist init
.The text was updated successfully, but these errors were encountered: