18465 Commits

Author SHA1 Message Date
sanchitlegalai
6ede1e2b27 fix(publish): Bail on existing version 2024-09-06 13:25:55 -05:00
Ed Page
0a84f1fff6 refactor(registry): Expose the registry source for reuse 2024-09-06 13:24:29 -05:00
sanchitlegalai
e0a1918cf2 test(publish): Show publishing existing version 2024-09-06 13:24:29 -05:00
bors
be1bbda84b Auto merge of #14433 - tweag:multi-package-publishing-rebased, r=epage
Publish workspace

Adds support for simultaneously publishing multiple (possibly inter-dependent) packages in a workspace, gated by the `-Zpackage-workspace` flag.

Questions to be worked out through stabilization:
- Are we ok stabilizing this and #10948 at the same time?  Currently, they are behind the same flag
- What is the desired behavior for the publish timeout? This PR uploads the crates in batches (depending on the dependency graph), and we only timeout if nothing in the batch is available within the timeout, deferring the rest to the next wait-for-publish. So for example, if you have packages `a`, `b`, `c` then we'll wait up to 60 seconds and if only `a` and `b` were ready in that time, we'll then wait another 60 seconds for `c`.
- What is the desired behavior when some packages in a workspace have `publish = false`? This PR raises an error whenever any of the selected packages has `publish = false`, so it will error on `cargo publish --workspace` in a workspace with an unpublishable package. An alternative interface would implicitly exclude unpublishable packages in this case, but still error out if you explicitly select an unpublishable package with `-p package-name` (see #14356). This PR's behavior is the most conservative one as it can change from an error to implicit excludes later.

This is part of #1169
2024-09-06 15:07:42 +00:00
Joe Neeman
a016e5f5c2 Multi-package publishing
Co-authored-by: Tor Hovland <55164+torhovland@users.noreply.github.com>
Co-authored-by: Ed Page <eopage@gmail.com>
2024-09-06 19:05:27 +07:00
Joe Neeman
431d84a6bf Factor out poll_one_package 2024-09-06 19:05:27 +07:00
Joe Neeman
3121a7175d Don't bind Operation::Read 2024-09-06 19:05:27 +07:00
Joe Neeman
faee9a7e91 Use the shared infer_registry function for publishing 2024-09-06 19:05:27 +07:00
Joe Neeman
de8b64ee59 Add publish workspace tests
Co-authored-by: Tor Hovland <55164+torhovland@users.noreply.github.com>
2024-09-06 19:05:27 +07:00
bors
b687045b12 Auto merge of #14503 - tweag:cargo-semver-version, r=weihanglo
Bump ci's version of cargo-semver-version

I just started seeing CI failures like this:
```
error: rustdoc format v33 for file /home/jneeman/tweag/cargo/target/semver-checks/local-cargo-0_83_0/target/semver-checks/target/doc/cargo.json is not supported
```
I think the issue is that the new rust version needs a new cargo-semver-checks, so this PR bumps the version of cargo-semver-checks in CI.
2024-09-06 08:11:22 +00:00
Joe Neeman
90fef7a6aa Bump cargo-semver-checks in ci 2024-09-06 10:16:04 +07:00
bors
8995f54d77 Auto merge of #14496 - tweag:cargo-package-doc, r=epage
Document -Zpackage-workspace

Adds some unstable documentation on the `-Zpackage-workspace` feature, as requested in [#10948](https://github.com/rust-lang/cargo/issues/10948#issuecomment-2330402126). This documentation assumes that #14433 gets merged.
2024-09-05 13:55:15 +00:00
Joe Neeman
e262c48d1e Document -Zpackage-workspace 2024-09-05 13:45:16 +07:00
bors
978b4fefe7 Auto merge of #14451 - jschwe:fix_gnullvm_implib, r=weihanglo
uplift windows gnullvm import libraries

Same changes as #8141, but for gnullvm.
gnullvm does not seem to be tested in CI, so tests were not adjusted.

### What does this PR try to resolve?

The `implib` for [gnullvm](https://doc.rust-lang.org/rustc/platform-support/pc-windows-gnullvm.html) targets should end up at the same location as for `gnu` targets.

### Background

I'm not a windows developer, so I may be wrong, but I believe the implib artifacts for gnullvm should be needed in the same way as for the normal windows-gnu target. In my downstream code, I need to know the location of the implib artifact, and would prefer for the location to be the same for both gnullvm and normal gnu.
2024-09-05 06:24:19 +00:00
bors
cb37786157 Auto merge of #14495 - weihanglo:version-bump, r=epage
Bump to 0.84.0; update changelog
2024-09-05 02:48:45 +00:00
Weihang Lo
dcbc524836
doc: update changelog for 1.83.0 2024-09-05 10:37:19 +08:00
Weihang Lo
40302052a3
doc: update changelog for 1.82.0 2024-09-05 10:37:19 +08:00
Weihang Lo
8a93ea488f
doc: update changelog for 1.81.0 2024-09-05 10:37:18 +08:00
Weihang Lo
0c94d6558a
Bump to 0.84.0 2024-09-05 10:12:53 +08:00
bors
40b6638df6 Auto merge of #13765 - dohse:fix-13702, r=epage
Fix cargo add behaving different when translating package name

Fixes #13702
Fixes #10680

TODOs

- [x] ~Fuzzy match registry dependencies in `cargo remove` as well~
     `cargo remove` does not need fuzzy matching, because there is no unexpected behavior for the user
- [x] ~Don't duplicate name permutation generation~
     Unsure whether this is worth it
- [ ] Shall we reject cases where multiple different permutations match?
- [x] Add comments that explain the behavior
2024-09-04 00:17:46 +00:00
bors
9627da3328 Auto merge of #14475 - rust-lang:renovate/core-foundation-0.x, r=epage
chore(deps): update rust crate core-foundation to 0.10.0

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [core-foundation](https://togithub.com/servo/core-foundation-rs) | workspace.dependencies | minor | `0.9.4` -> `0.10.0` |

---

### Release Notes

<details>
<summary>servo/core-foundation-rs (core-foundation)</summary>

### [`v0.10.0`](https://togithub.com/servo/core-foundation-rs/compare/core-foundation-v0.9.4...core-foundation-v0.10.0)

[Compare Source](https://togithub.com/servo/core-foundation-rs/compare/core-foundation-v0.9.4...core-foundation-v0.10.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 5am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/rust-lang/cargo).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->
2024-09-03 17:55:40 +00:00
bors
fda48a0036 Auto merge of #14471 - epage:msrv, r=ehuss
feat(resolve): Report MSRV compatible version instead of incomptible

### What does this PR try to resolve?

This expands on #14461 to where only MSRV-compatible versions are
"actionable".  MSRV-incompatible versions are therefore unstyled.

We report the MSRV needed so people can choose to unblock by updating
their MSRV.  I had wondered if we should report the the absolute latest
MSRV-incompatible version or the one with the next higher MSRV from
where the user is at.  Both are reasonable use cases, so I erred with
absolute latest version.

```console
$ cargo update --workspace -v
```
![image](https://github.com/user-attachments/assets/27e40dda-287b-4223-a377-0233205307a2)

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

I changed the label from `latest` to `available` to not have to keep coming up with relevant terms for each case.

### Additional information

This is the final step before asking for new feedback on #13908
2024-09-03 15:57:24 +00:00
bors
2807645c79 Auto merge of #14488 - tweag:package-filter-current, r=epage
Don't automatically include the current crate when packaging

This replicates some of the changes in #10677 while packaging. It was split off from #14433
2024-09-03 11:38:53 +00:00
bors
ee6f1c8ee8 Auto merge of #14487 - ehuss:fix-elided-lifetime, r=epage
Fix elided lifetime

This fixes an issue with the recent nightly that has added a lint (https://github.com/rust-lang/rust/pull/129207) that warns about the lack of a lifetime, which looks like:

```
warning: elided lifetime has a name
   --> src/cargo/core/workspace.rs:580:66
    |
580 |     pub fn default_members<'a>(&'a self) -> impl Iterator<Item = &Package> {
    |                            -- lifetime `'a` declared here        ^ this elided lifetime gets resolved as `'a`
    |
    = note: `#[warn(elided_named_lifetimes)]` on by default
```
2024-09-02 22:58:30 +00:00
Eric Huss
2597cdf770 Fix implicit_features_edition_2024 matching rust version
This test should not be matching the exact Rust version.
2024-09-02 15:18:01 -07:00
Eric Huss
e21f0d018e Fix elided lifetime 2024-09-02 14:52:00 -07:00
bors
cf88141806 Auto merge of #14478 - rust-lang:renovate/pasetors-0.x, r=ehuss
chore(deps): update rust crate pasetors to 0.7.0

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [pasetors](https://togithub.com/brycx/pasetors) | workspace.dependencies | minor | `0.6.8` -> `0.7.0` |

---

### Release Notes

<details>
<summary>brycx/pasetors (pasetors)</summary>

### [`v0.7.0`](https://togithub.com/brycx/pasetors/blob/HEAD/CHANGELOG.md#070)

[Compare Source](https://togithub.com/brycx/pasetors/compare/0.6.8...0.7.0)

**Date:** August 28, 2024.

-   Bump MSRV to `1.80`.
-   Updated test vectors for `v3.public`.
-   (*BREAKING*) Improved error-handling during claims validation. Added `Error::ClaimValidation(ClaimValidationError)`, where `ClaimValidationError` now further specifies the validation error ([#&#8203;131](https://togithub.com/brycx/pasetors/pull/131), credits: [`@&#8203;jpramosi](https://togithub.com/jpramosi)).`

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 5am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/rust-lang/cargo).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->
2024-09-01 14:13:55 +00:00
Jonas Dohse
9391bfb34d Fix #10680, Fix #13702 2024-09-01 15:49:34 +02:00
renovate[bot]
9fcfff47ce
chore(deps): update rust crate pasetors to 0.7.0 2024-09-01 03:14:40 +00:00
renovate[bot]
ccfd6a9d68
chore(deps): update rust crate core-foundation to 0.10.0 2024-09-01 01:15:17 +00:00
Ed Page
911f5e17b6 feat(resolve): Report MSRV compatible version instead of incomptible
This expands on #14461 to where only MSRV-compatible versions are
"actionable".  MSRV-incompatible versions are therefore unstyled.

We report the MSRV needed so people can choose to unblock by updating
their MSRV.  I had wondered if we should report the the absolute latest
MSRV-incompatible version or the one with the next higher MSRV from
where the user is at.  Both are reasonable use cases, so I erred with
absolute latest version.
2024-08-30 09:40:54 -05:00
Ed Page
ded3f004a4 fix(resolve): Generalize term describing updates
`latest` was easy.  `latest compatible` was ok.  But how do I talk about
"latest compatible with your MSRV".  That gets messy.
2024-08-30 09:26:56 -05:00
Jonas Dohse
140911cc12 Add test case for feature adding with fuzzy name #10680 2024-08-30 12:16:29 +02:00
Jonas Dohse
cdab0c0058 Add test case for fuzzy package adding issue #13702 2024-08-30 12:16:29 +02:00
Joe Neeman
4110b844fb Filter package specs while packaging 2024-08-30 10:10:46 +07:00
Joe Neeman
653025fdd5 Add test for package filtering with old edition 2024-08-30 10:10:46 +07:00
Ed Page
e14f690e6e refactor(resolve): Provide full access to summary 2024-08-29 16:55:36 -05:00
bors
c1fa840a85 Auto merge of #14461 - epage:actionable, r=Muscraft
fix(resolve): With `latest` message, differentiate actionable updates

### What does this PR try to resolve?

Instead of always listing the absolutely latest version as a warning
color, we now differentiate
- compatible updates are always actionable
- incompatible, direct deps are always actionable

These get reported and made yellow while non-actionable messages are
unstyled.

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

I just used a broad stroke to say "compatible" in the message means "semver
compatible" and use `^`
- We could focus on "compatible with dependent version reqs" which is
  what will be most actionable but seeing if we can get away without
  having to track all in-coming version reqs.
- We could be more nuanced in language but the more verbose we are, the
  more we take away from higher priority messages

### Additional information

This is not intended as *the* solution for #13908 though it experiments with what to do for that.
This is prep work for improved MSRV reporting where we will
differentiate this further by only considering MSRV-compatible updates as actionable
(or rustc-compatible when not using MSRV-aware reslver).
2024-08-29 21:03:53 +00:00
bors
33714c404e Auto merge of #14467 - epage:open-pkgid, r=Muscraft
fix(pkgid): Allow open namespaces in PackageIdSpec's

### What does this PR try to resolve?

This is a part of #13576

This unblocks #14433.  We have a test to ensure you can't publish a namespaced package and the error for that is getting masked in #14433 because the package name is getting  parsed as a `PackageIdSpec` which wasn't supported until this PR.

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

### Additional information
2024-08-29 20:31:35 +00: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
bors
59ecb11a29 Auto merge of #14459 - epage:msrv-rustc, r=Muscraft
feat(resolve): Report incompatible-with-rustc when MSRV-resolver is disabled

### What does this PR try to resolve?

This builds on #14457 to report when deps are incompatible with rustc when an MSRV-aware resolver is not used.
This affects stable code.

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

### Additional information
2024-08-27 20:51:07 +00:00
Ed Page
353cd87cea fix(resolve): With latest message, differentiate actionable updates
Instead of always listing the absolute latest version as a warning
color, we now differentiate
- compatible updates are always actionable
- incompatible, direct deps are always actionable

These get reported and made yellow while non-actionable messages are
unstyled.

This is not intended as *the* solution for #13908 though it makes
improvements in that direction.
This is prep work for improved MSRV reporting where we will
differentiate this further by only considering MSRV-compatible updates as actionable
(or rustc-compatible when not using MSRV-aware reslver).

I just used a broad stroke to say "compatible" in the message means "semver
compatible" and use `^`
- We could focus on "compatible with dependent version reqs" which is
  what will be most actionable but seeing if we can get away without
  having to track all in-coming version reqs.
- We could be more nuanced in language but the more verbose we are, the
  more we take away from higher priority messages
2024-08-27 13:40:03 -05:00
Ed Page
545ca21d71 refactor(resolve): Give more details to 'report_latest' 2024-08-27 13:40:03 -05:00
Ed Page
78d67959ed refactor(resolve): Give room for more policies 2024-08-27 13:31:17 -05:00
Ed Page
c60d3175f0 refactor(resolve): Give report_latest more formatting control 2024-08-27 13:00:40 -05:00
bors
b8a4f1bc2d Auto merge of #14457 - epage:msrv, r=ehuss
fix(resolve): Report incompatible packages with precise Rust version

### What does this PR try to resolve?

In #14401, we reported about MSRV issues as if we were the resolver.  We can be smarter than that though and report precise MSRV information.  This allows us to elevate the message from color from yellow to red.

This is also prep work for telling users when a newer, MSRV-compatible version of a package is available.

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

The report function I added is a little odd because a follow up commit will update it to report when a package is incompatible with rustc when the MSRV resolver is disabled and do this on stable.

### Additional information

This builds on #14445 to improve #14401
2024-08-27 17:46:40 +00:00
bors
ef854d2f66 Auto merge of #14445 - epage:locked, r=weihanglo
fix(resolve): Dont show locking workspace members

### What does this PR try to resolve?
This is for `cargo generate-lockfile` and when syncing the lockfile with
the manifest.
We still show it for `cargo update` because of `cargo update
--workspace`.

We hacked around this previously by filtering out the `num_pkgs==1` case
for single packages but this didn't help with workspaces.

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

### Additional information

This builds on #14440
2024-08-26 22:16:00 +00:00