Publish workspace by jneem · Pull Request #14433 · rust-lang/cargo (original) (raw)

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

jneem

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:

This is part of #1169

@rustbot

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@ehuss

Is it worth adding a new -Zpublish-workspace flag, or is it ok to reuse the old one?

I don't have enough context to know if -Zpackage-workspace was intended as a stepping-stone for publishing, or if there really is an independent use-case for packaging versus publishing.

This breaks the publish_namespaced test, because we now try to parse all packages as package specs, and "foo::bar" fails to parse. This could probably be avoided by a refactor (adding a different package function that takes a list of packages instead of trying to get them from cli arguments), but I also think it's a bug in the package spec parser. Thoughts?

Can the check here be moved to an earlier stage, like in ops::registry::publish::publish by iterating over the just_pkgs list and checking if any of them have the open-namespaces feature?

@ehuss

I realistically won't have time to give this a good review for at least a few days if not a week or more. I was wondering if @weihanglo or @epage would have more bandwidth in the short term? If not, that's ok, I'll try to review this when I can.

@epage epage mentioned this pull request

Aug 28, 2024

@epage

This breaks the publish_namespaced test, because we now try to parse all packages as package specs, and "foo::bar" fails to parse. This could probably be avoided by a refactor (adding a different package function that takes a list of packages instead of trying to get them from cli arguments), but I also think it's a bug in the package spec parser. Thoughts?

@jneem I posted #14467

bors added a commit that referenced this pull request

Aug 29, 2024

@bors

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

@epage

Could you rebase on top of #14467?

@jneem

epage

@epage

Is it worth adding a new -Zpublish-workspace flag, or is it ok to reuse the old one?

I don't have enough context to know if -Zpackage-workspace was intended as a stepping-stone for publishing, or if there really is an independent use-case for packaging versus publishing.

-Zpackage-workspace is a stepping stone. In that spirit, it seems like the feature would be named -Zpublish-workspace but probably not worth changing at this point.

The questions relevant for this is would we want to stabilize these together? Are there design risks for one that by separating the stabilization of them would make it easier to stabilize the other?

epage

epage

epage

epage

epage

epage

epage

epage

epage

epage

epage

epage

epage

@jneem

But I don't think a straight dependency tree was the concern. Is my update accurate?

Yes, your update is accurate. I thought that a long straight dependency tree might also be a concern, because it effectively extends the timeout.

@jneem jneem mentioned this pull request

Sep 5, 2024

bors added a commit that referenced this pull request

Sep 5, 2024

@bors

Document -Zpackage-workspace

Adds some unstable documentation on the -Zpackage-workspace feature, as requested in [#10948](#10948 (comment)). This documentation assumes that #14433 gets merged.

@epage

Yes, your update is accurate. I thought that a long straight dependency tree might also be a concern, because it effectively extends the timeout.

Not concerned about the straight line because the timeout is for publishing a package, not publishing everything, so its natural they get concatenated when doing them back-to-back.

@jneem @torhovland

Co-authored-by: Tor Hovland 55164+torhovland@users.noreply.github.com

@jneem

@jneem

@jneem

Co-authored-by: Tor Hovland 55164+torhovland@users.noreply.github.com Co-authored-by: Ed Page eopage@gmail.com

@epage

@bors

📌 Commit a016e5f has been approved by epage

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Sep 6, 2024

@bors

@epage

btw I've noted in #10948 the open questions

@bors

This was referenced

Sep 6, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Sep 15, 2024

@bors

bors added a commit to rust-lang-ci/rust that referenced this pull request

Sep 15, 2024

@bors

bors added a commit to rust-lang-ci/rust that referenced this pull request

Sep 16, 2024

@bors

github-actions bot pushed a commit to rust-lang/miri that referenced this pull request

Sep 16, 2024

@bors

@epage epage mentioned this pull request

Sep 6, 2024

4 tasks

@epage epage mentioned this pull request

Sep 6, 2024