68 Commits

Author SHA1 Message Date
Ed Page
d0c54ec87f refactor(toml): Rename 'resolved' to 'normalized'
In a discussion on an issue, it became confusing to talk about
"resolved" manifests and dependency resolution,
so I'm switching manifests to use the other term I considered,
"normalized".
2024-08-01 16:23:53 -05:00
renovate[bot]
74f01c4b65
chore(deps): update msrv 2024-07-26 12:52:37 +00:00
Alex Macleod
9f85086fd2 Add TomlPackage::new, Default for TomlWorkspace 2024-07-19 17:51:38 +00:00
tianyeyouyou
87084c176b remove duplicate words 2024-07-10 20:51:45 +08:00
renovate[bot]
a018e3a946
chore(deps): update msrv (1 version) to v1.79 2024-06-13 17:27:19 +00:00
Ed Page
786ebe9d14 chore: Bump cargo-util-schemas to 0.5
See #13902
2024-06-10 09:53:58 -05:00
bors
54d9c3306b Auto merge of #13902 - heisen-li:plugin, r=weihanglo
fix(toml): remove `lib.plugin` key support and make it warning

### What does this PR try to resolve?

Remove `lib.plugin` key, making it an "unused key" warning.

Remove some of the tests, which should look useless (I hope I'm understanding this

- [x] Remove key, and related tests.
- [x] Adjust the documentation about the plugin.
- [ ] Some of the comments and function names have not yet finished being modified.

part of #13629

Closes #13246
2024-06-09 18:07:55 +00:00
Ed Page
4a6f25c112 refactor: Resolve snapbox deprecations 2024-05-27 10:28:13 -05:00
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
heisen-li
1f48eab757 fix(toml): remove lib.plugin key 2024-05-16 20:03:26 +08: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