Commit Graph

59 Commits

Author SHA1 Message Date
Urgau 1e4857a4d9 Allow lint config to have extra custom configs
And report the unused manifest key warning for every key that we do not
use, which is currently every of them.
2024-05-16 17:03:42 +02:00
renovate[bot] 05ba4d8cfe chore(deps): update msrv (1 version) to v1.78 2024-05-02 15:07:25 +00:00
Ed Page 627b1d1470 feat(fix): Migrate inherited deps with ignored default-features 2024-05-01 12:43:47 -05:00
Ed Page 1e6047763d fix(toml): Warn, rather than fail publish, if build.rs is excluded
This could offer a minor performance gain when reading this manifest
since the target doesn't need to be discovered.
2024-04-29 12:25:19 -05:00
Ed Page 39f1a210b8 perf(toml): Avoid looking up readme on published packages
Not much of a performance gain;
this is mostly done to be consistent with the target work.
2024-04-29 12:25:19 -05:00
Ed Page bdd4bda518 fix(toml)!: Remove support for inheriting badges
We allowed `[badges]` to inherit from `[workspace.package.badges]`

This was a bug:
- This was not specified in the RFC
- We did not document this
- Even if someone were to try to guess to use this, it is inconsistent
  with how inheritance works because this should inherit from
  `workspace.badges` instead of `workspace.package.badges`

While keeping in mind that `[badges]` is effectively deprecated.

In that context, I think its safe to break support for this without a
transition period.

Fixes #13643
2024-04-22 14:22:01 -05:00
Scott Schafer 11d6013c1d
fix(cargo-lints): Respect Forbid lint level 2024-04-20 20:12:47 -06:00
Ed Page 6d8d3b6420 fix(schemas): Allow parsing pre-release with X 2024-04-17 16:49:22 -05:00
Ed Page 6f22e9dbee test(schemas): Add PartialVersion unit tests 2024-04-17 16:47:51 -05:00
Ed Page 3a2cc82789 test(msrv): Migrate most parse tests to unit tests 2024-04-17 16:47:29 -05:00
Ed Page 675d67d093 fix(msrv): Error, rather than panic, on rust-version 'x'
Fixes #13768
2024-04-17 15:10:18 -05:00
Weihang Lo eacdfd2917
test: fix tests to assert unxpected querystrring error 2024-04-15 20:25:01 -04:00
Weihang Lo 99b4a49530
test: assert error kind for pkgidspec parsing 2024-04-15 20:25:01 -04:00
Ed Page 5d8bdf4f41 refactor(toml): Separate resolving from other in same fn 2024-03-28 13:33:23 -05:00
Ed Page 611b6889a6 refactor(toml): Separate resolve/validate dependencies 2024-03-28 13:33:23 -05:00
Ed Page 772539a03a refactor(toml): Group resolving of lints with package
We can't have validation depend on `TomlManifest::resolved_lints` yet
because we need to pull out the resolving of deps first.
2024-03-28 13:33:23 -05:00
Ed Page 2ea1ac6fac refactor(toml): Rely on resolved publish 2024-03-28 13:33:23 -05:00
Ed Page 20302b34b7 refactor(toml): Rely on resolved include/exclude 2024-03-28 13:33:23 -05:00
Ed Page 00ba5780e4 refactor(toml): Rely on resolved authors 2024-03-28 13:33:23 -05:00
Ed Page 425a8ae478 refactor(toml): Rely on resolved repository 2024-03-28 13:33:23 -05:00
Ed Page 18550b2512 refactor(toml): Rely on resolved license-file 2024-03-28 13:33:23 -05:00
Ed Page b942be5bc1 refactor(toml): Rely on resolved license 2024-03-28 13:33:23 -05:00
Ed Page 047c1fe9d0 refactor(toml): Rely on resolved categories 2024-03-28 13:33:23 -05:00
Ed Page 258d8447a9 refactor(toml): Rely on resolved keywords 2024-03-28 13:33:23 -05:00
Ed Page d435d0e72a refactor(toml): Rely on resolved readme 2024-03-28 13:33:23 -05:00
Ed Page c62a559d82 refactor(toml): Rely on resolved documentation 2024-03-28 13:33:23 -05:00
Ed Page 5b5f64460b refactor(toml): Rely on resolved homepage 2024-03-28 13:33:23 -05:00
Ed Page f96638ea3b refactor(toml): Rely on resolved description 2024-03-28 13:33:23 -05:00
Ed Page 102b5890be refactor(toml): Rely on resolved edition
Returning a `&String` is unusual but this keeps things easier on both
sides.
2024-03-28 13:33:23 -05:00
Ed Page b3183596cc refactor(toml): Rely on resolved rust-version
This also removes duplicated inheritance and one of them specifying the
wrong field.
2024-03-28 13:33:23 -05:00
Ed Page 6ad976912d refactor(toml): Rely on resolved version 2024-03-28 13:33:23 -05:00
renovate[bot] ccc31b4ddf chore(deps): update msrv 2024-03-25 14:13:38 -05:00
Ed Page 8152bfbb5e refactor(core): Expose all of the variants of VirtualManifests 2024-03-15 21:14:50 -05:00
bors 2fe739fcf1 Auto merge of #13591 - epage:namespace, r=weihanglo
feat: Add 'open-namespaces' feature

### What does this PR try to resolve?

This is a step towards #13576

### How should we test and review this PR?

### Additional information
2024-03-15 21:39:18 +00:00
Ed Page 9ea3f260a8 feat(toml): Add support for open namespaces 2024-03-15 12:54:05 -05:00
Ed Page ff454fd452 refactor(toml): Consolidate how we track unused keys
This makes it act more like everything else, making this easier to
evolve over time.
2024-03-15 12:00:06 -05:00
Ed Page b321285501 refactor(schema): Decouple forms of name validation 2024-03-15 11:49:07 -05:00
Ed Page 134ed93f60 fix: Consistently compare MSRVs
We used several strategies
- Relying in `impl Ord for RustVersion`
- Converting to version requirements
  - Decrementing a version

This consolidates around one strategy: `RustVersion::is_compatible_with`
- Ensure the comparisons have the same behavior
- Centralize knowledge of how to handle pre-release rustc
- Losslessly allow comparing with either rustc or workspace msrv
2024-03-05 10:59:08 -06:00
Ed Page 46584a4d6b refactor(schema): Pull RustVersion out into a mod 2024-03-04 16:45:58 -06:00
Ed Page a980eed118 refactor(schema): Make manifest its own directory 2024-03-04 16:44:05 -06:00
Weihang Lo 7b0919399d
feat(cargo-util-schemas): `TryFrom<PartialVersion>` for `RustVersion` 2024-02-16 10:05:59 -05:00
renovate[bot] 5ea658df78 chore(deps): update msrv (1 version) to v1.76.0 2024-02-08 14:32:51 +00:00
Ed Page b291f42dce chore: Make N-0 MSRVs explicit
This will require a version bump every release but over-releasing these
packages is likely a lot better than over-releasing the N-3 packages,
which we won't have to do anymore after this.

My hope is the `auto` value will be approved and stabilized and then we
won't have to over-release anymore.
2024-01-18 15:28:04 -06:00
Ed Page 62eab55ed2 refactor(toml): Make it more obvious to update package-dependent fields
Inspired by my having forgotten to add `[lints]` to the if sequence.
Previously, we added a comment to suggest this but the further the code
is, the harder it is to track.

I considered a custom `Deserialize` impl, possibly through a new type,
that would error.
This would be the more "pure" solution.
Unfortunately, this would also have worse errors because the errors
would be reported to the `Deserializer` at the document-level, rather
than directly on the individual fields.
Well, we don't do on individual fields now but it is something we will
soon be exploring.
2024-01-08 15:34:38 -06:00
Ed Page 6e86530ae2 fix(manifest): Provide unused key warnings for lints table
The use of `flatten` was getting in the way of `serde_ignored`.
A common workaround is to add our own `unused` tracking but that would
cause duplicates with `workspace.lints` (or we'd just ignore it).

Since the manual deserializer was relatively simple, I went that route.

Fixes #12917
2024-01-08 09:12:46 -06:00
Ed Page e37a04a9d4 refactor(schema): Use dedicated type for 'workspace' field value 2024-01-08 09:06:03 -06:00
hi-rustin ad18dd017b refactor: give some better examples for package ID spec
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2023-12-25 10:08:27 +08:00
Weihang Lo 0b0e78fa3f
chore: bump cargo-util-schemas to 0.2.0 2023-12-20 10:38:03 -05:00
Weihang Lo f9e726b056
refactor(util-schemas): make error enum private 2023-12-20 10:38:03 -05:00
Weihang Lo a0201cd465
refactor(util-schemas): make fn in `restricted_names` crate private
pub
2023-12-20 10:38:02 -05:00