-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
refactor(schemas): Pull out mod for proposed schemas package #13097
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.
r? @ehuss (rustbot has picked a reviewer for you, use r? to override) |
23054a4
to
cb2a02b
Compare
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 |
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.
Overall looks good!
Thanks for the review and the update, people. Let's go and merge this! @bors r=ehuss |
☀️ Test successful - checks-actions |
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
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
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
Originally for #12801 we talked about a
cargo-util-manifest-schema
packageutil
in the name to not clash with pluginsThe problem is we have types that aren't manifest specific, like
PartialVersion
(currently slated forcargo-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.