84 Commits

Author SHA1 Message Date
Ed Page
6da546c9e1 chore: Bump versions 2024-11-29 10:43:19 -06:00
renovate[bot]
1ec49b8947
chore(deps): update msrv 2024-11-29 03:54:45 +00:00
Ed Page
878caf7447 docs: Surround identifiers in backticks
This was mostly done by clippy via `clippy::doc_markdown`.
I then reviewed it to fix words that shouldn't have it or where `--fix`
put the backtick in the wrong location.
2024-11-15 09:33:23 -06:00
Ed Page
13255d0fc1 fix(schemas): Support deserializing str's as well as Strings
Not needed for `toml` but could be useful for other formats.
2024-11-08 10:21:50 -06:00
dacian
21ce69ef37 feat: unstable-json-schema generation for Cargo.toml 2024-10-25 00:05:11 +03:00
renovate[bot]
341d619f66
chore(deps): update msrv 2024-10-19 01:35:59 -04:00
Ed Page
5c87c14f9a docs: Declare support level for each crate in our Charter / docs
This is to bring us into conformance with the [Rust crate ownership
policy](https://forge.rust-lang.org/policies/crate-ownership.html).

Items of note
- `cargo-credential-1password` is declared as Experimental as it is
  intended for the community but I was unsure if we wanted to commit to
  full support for it.  In my mind, the ideal thing to do would be to
  expatriate this to 1password.
- `home` is declared as Internal despite its wide use within the
  ecosystem.
- `cargo-credential` is declared as Intentional as its an API intended
  for the wider ecosystem and I didn't see a reason to declare it
  experimental.
- `cargo-platform`, `cargo-util-schemas`, and `crates-io` are declared
  as Intentional as they are both used internally and intended for
  others to use for logic that integrates with cargo/registries.
  I wondered about these being Experimental or Internal instead.
2024-09-26 12:43:09 -05:00
Ed Page
5e35e271bc feat(toml): Add autolib
PR #5335 added `autobins`, etc for #5330.  Nowhere in there is
discussion of `autolib`.

Cargo script disables support for additional build-targets by disabling
discovery.
Except we don't have a way to disable discovery of `autolib`, leading to #14476.
By adding `autolib`, we can continue in that direction.

This also allows us to bypass inferring of libs on published packages,
like all other build-targets which were handled in #13849.

As this seems fairly low controversy, this insta-stabilizes the field.
In prior versions of Cargo, users will get an "unused manifest key"
warning.
For packags where this is set by `cargo publish`, the warning will be suppressed and things will work as normal.
For `cargo vendor`, the same except there will be some churn in the
vendored source as this field will now be set.
For local development, it should be rare to set `autolib` so the lack of
error by discovering a file when this is set shouldn't be a problem.

Fixes #14476
2024-09-24 11:24:24 -05:00
Ed Page
da18686f29 chore(schemas): Bump version 2024-09-24 11:24:24 -05:00
Ed Page
1b94fb2326 chore: Bump MSRV to 1.81
This is prep for using `#[expect]`.

Its not clear why RenovateBot didn't do this.
2024-09-23 19:45:57 -05:00
Ed Page
f4c7ed1990 fix(pkgid): Allow open namespaces in PackageIdSpec's 2024-08-28 10:35:16 -05:00
Ed Page
c81e82dffb refactor(pkgid): Pull out spec parsing 2024-08-28 10:19:13 -05:00
Ed Page
00604fa152 test(pkgid): Show existing pkgid behavior 2024-08-28 10:03:37 -05:00
Ed Page
8dd37c1d22 refactor(schema): Pull out test helpers for reuse 2024-08-28 10:03:37 -05:00
Joe Birr-Pixton
b9fe71853e Correct diagnostic for TomlDebugInfo
This is missing the friendly aliases introduced in 3dbb474c.
2024-08-16 16:48:03 +01:00
Daniel Paoliello
502c74e0a5 Implement base paths (RFC 3529) 1/n: path dep and patch support 2024-08-13 15:00:45 -07:00
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