Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add uv build --all option #7724

Merged
merged 5 commits into from
Sep 27, 2024
Merged

Add uv build --all option #7724

merged 5 commits into from
Sep 27, 2024

Conversation

blueraft
Copy link
Contributor

Summary

Resolves #7705

Test Plan

cargo test and tested locally.

The snapshots were unstable due to the packages being built in a non-deterministic order, so I used the quiet flag to suppress the output.

Another question is whether we should label the build output to indicate which package it belongs to?

@charliermarsh
Copy link
Member

Wondering if we should call this --workspace to follow Cargo's convention?

@blueraft
Copy link
Contributor Author

--all is a bit more intuitive to me, but --workspace sounds good too.

)
});

let results = futures::future::join_all(build_futures).await;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also sort the results for determinism here right? Generally I'm pretty into having deterministic output if it's not high-cost.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the build output itself would be interleaved even if sorted. We'd need --no-build-output from your prior PR... then we could make the asset names deterministic, I think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would need that.. wouldn't we :p I feel like in this case it'd probably make sense to do something else with the build output by default instead of interleaving it... like show progress bars for each build and write the output to a file per project or something. Anyway, that doesn't need to be in scope here.

Cross-linking for reference #7675

@charliermarsh
Copy link
Member

I guess --all is fine since it's consistent with Rye.

@charliermarsh
Copy link
Member

This generally looks good to me though it may be worth reviving #7675 so that we can get better snapshot tests (just the artifact output, rather than the build output). Wdyt @zanieb?

@zanieb
Copy link
Member

zanieb commented Sep 26, 2024

I'd be down to restore #7675 as a hidden option so we can use it here and consider if we want it in the long run?

@charliermarsh
Copy link
Member

Sounds good. I re-opened and approved.

Building source distribution...
Building wheel from source distribution...
Building wheel from source distribution...
Successfully built packages/member_a/dist/member_a-0.1.0.tar.gz and packages/member_a/dist/member_a-0.1.0-py3-none-any.whl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should every member write to a single top-level ./dist? I'm actually not sure. What does Rye do? In this PR, you're writing to ./dist relative to each member.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is fine. I'm not sure what's best. Rye writes to a single ./dist.

@charliermarsh charliermarsh merged commit 805f1bd into astral-sh:main Sep 27, 2024
60 checks passed
@charliermarsh
Copy link
Member

Thanks!

@blueraft blueraft deleted the build-all branch September 27, 2024 07:58
charliermarsh added a commit that referenced this pull request Sep 27, 2024
…l` (#7736)

## Summary

Small follow up to #7724

## Test Plan

`cargo test`

---------

Co-authored-by: Charlie Marsh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add uv build --all option
3 participants