refactor(schemas): Pull out mod for proposed schemas package#13097
Merged
bors merged 1 commit intorust-lang:masterfrom Dec 5, 2023
Merged
refactor(schemas): Pull out mod for proposed schemas package#13097bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Originally for rust-lang#12801 we talked about a `cargo-util-manifest-schema` package - `util` in the name to not clash with plugins - manifest specific to keep the scope down The problem is we have types that aren't manifest specific, like - `PartialVersion` (currently slated for `cargo-util-semverext`) - `RustVersion` - `PackageIdSpec` - `SourceKind` (soon) Things get messy if we try to break things down into common packages. Instead, I think it'd be useful to have a schemas package that has mods for each type of schema, re-exporting what is needed. Normally, componentizing your package by the layer in the stack is a recipe for pain. I don't think that'll apply here because these are meant to be so low level. The other big concern could be compile times. My hope is it won't be too bad. So this moves the `util/toml` types into the module and we can add more in the future.
Collaborator
|
r? @ehuss (rustbot has picked a reviewer for you, use r? to override) |
23054a4 to
cb2a02b
Compare
Contributor
|
I don't have a particular opinion here, this seems fine to me. I'm going to kick this to @weihanglo if he has any opinions on the organization, but if not feel free to |
weihanglo
approved these changes
Dec 5, 2023
Member
|
Thanks for the review and the update, people. Let's go and merge this! @bors r=ehuss |
Contributor
Contributor
Contributor
|
☀️ Test successful - checks-actions |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 6, 2023
Update cargo 5 commits in 623b788496b3e51dc2f9282373cf0f6971a229b5..9787229614b27854cf73d57ffae430d7c1e6caa4 2023-12-02 18:10:03 +0000 to 2023-12-06 02:29:23 +0000 - feat(spec): Extend PackageIdSpec with source kind + git ref for unambiguous specs (rust-lang/cargo#12933) - test(trim-paths): assert `OSO` and `SO` cannot be trimmed (rust-lang/cargo#13118) - refactor(schemas): Pull out mod for proposed schemas package (rust-lang/cargo#13097) - chore(test): remove unnecesary packages and versions for `optionals` tests (rust-lang/cargo#13108) - chore(config): migrate renovate config (rust-lang/cargo#13106) r? ghost
20 tasks
lnicola
pushed a commit
to lnicola/rust-analyzer
that referenced
this pull request
Apr 7, 2024
Update cargo 5 commits in 623b788496b3e51dc2f9282373cf0f6971a229b5..9787229614b27854cf73d57ffae430d7c1e6caa4 2023-12-02 18:10:03 +0000 to 2023-12-06 02:29:23 +0000 - feat(spec): Extend PackageIdSpec with source kind + git ref for unambiguous specs (rust-lang/cargo#12933) - test(trim-paths): assert `OSO` and `SO` cannot be trimmed (rust-lang/cargo#13118) - refactor(schemas): Pull out mod for proposed schemas package (rust-lang/cargo#13097) - chore(test): remove unnecesary packages and versions for `optionals` tests (rust-lang/cargo#13108) - chore(config): migrate renovate config (rust-lang/cargo#13106) r? ghost
RalfJung
pushed a commit
to RalfJung/rust-analyzer
that referenced
this pull request
Apr 27, 2024
Update cargo 5 commits in 623b788496b3e51dc2f9282373cf0f6971a229b5..9787229614b27854cf73d57ffae430d7c1e6caa4 2023-12-02 18:10:03 +0000 to 2023-12-06 02:29:23 +0000 - feat(spec): Extend PackageIdSpec with source kind + git ref for unambiguous specs (rust-lang/cargo#12933) - test(trim-paths): assert `OSO` and `SO` cannot be trimmed (rust-lang/cargo#13118) - refactor(schemas): Pull out mod for proposed schemas package (rust-lang/cargo#13097) - chore(test): remove unnecesary packages and versions for `optionals` tests (rust-lang/cargo#13108) - chore(config): migrate renovate config (rust-lang/cargo#13106) r? ghost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Originally for #12801 we talked about a
cargo-util-manifest-schemapackageutilin the name to not clash with pluginsThe problem is we have types that aren't manifest specific, like
PartialVersion(currently slated forcargo-util-semverext)RustVersionPackageIdSpecSourceKind(soon)Things get messy if we try to break things down into common packages. Instead, I think it'd be useful to have a schemas package that has mods for each type of schema, re-exporting what is needed.
Normally, componentizing your package by the layer in the stack is a recipe for pain.
I don't think that'll apply here because these are meant to be so low level.
The other big concern could be compile times. My hope is it won't be too bad.
So this moves the
util/tomltypes into the module and we can add more in the future.