-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(embedded): Don't append hash to bin names #12269
Conversation
r? @weihanglo (rustbot has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense. I was going to suggest using crate::util::hex::short_hash
against manifest
string, but just realize the bin name will be uplifted to target/debug
. That means if someone edit-and-runs the script many times, a lot of executables will mess up target/debug
directory.
Background: the hash existed for sharing a target directory. That code isn't implemented yet and a per-user build cache might remove the need for it, so let's remove it for now and more carefully weigh adding it back in. Immediate: This reduces the chance of hitting file length issues on Windows. Generally: This is a bit hacky and for an official solution, we should probably try to find a better way. This could become more important as single-file packages are allowed in workspaces.
744028a
to
56b2812
Compare
@bors r+ Thanks! |
☀️ Test successful - checks-actions |
Update cargo 11 commits in 49b6d9e179a91cf7645142541c9563443f64bf2b..0c14026aa84ee2ec4c67460c0a18abc8519ca6b2 2023-06-09 17:21:19 +0000 to 2023-06-14 18:43:05 +0000 - fix(embedded): Don't append hash to bin names (rust-lang/cargo#12269) - Fix version requirement example in Dependency Resolution, SemVer compatibility section (rust-lang/cargo#12267) - Update triagebot links. (rust-lang/cargo#12265) - Show a better error when container tests fail. (rust-lang/cargo#12264) - chore: update dependencies (rust-lang/cargo#12261) - refactor(embedded) (rust-lang/cargo#12262) - docs: clarify the use of `default` branch instead of `main` by default (rust-lang/cargo#12251) - docs: update changelog for 1.71 backport and 1.72 (rust-lang/cargo#12256) - feat: Initial support for single-file packages (rust-lang/cargo#12245) - test(z-flags): Verify `-Z` flags list is sorted (rust-lang/cargo#12224) - refactor: registry data kinds cleanup (rust-lang/cargo#12248) --- This commit also update LICENSE exceptions, as Cargo introduced a newer version of `dunce` and `blake3` as dependencies. r? `@ghost`
Update cargo 11 commits in 49b6d9e179a91cf7645142541c9563443f64bf2b..0c14026aa84ee2ec4c67460c0a18abc8519ca6b2 2023-06-09 17:21:19 +0000 to 2023-06-14 18:43:05 +0000 - fix(embedded): Don't append hash to bin names (rust-lang/cargo#12269) - Fix version requirement example in Dependency Resolution, SemVer compatibility section (rust-lang/cargo#12267) - Update triagebot links. (rust-lang/cargo#12265) - Show a better error when container tests fail. (rust-lang/cargo#12264) - chore: update dependencies (rust-lang/cargo#12261) - refactor(embedded) (rust-lang/cargo#12262) - docs: clarify the use of `default` branch instead of `main` by default (rust-lang/cargo#12251) - docs: update changelog for 1.71 backport and 1.72 (rust-lang/cargo#12256) - feat: Initial support for single-file packages (rust-lang/cargo#12245) - test(z-flags): Verify `-Z` flags list is sorted (rust-lang/cargo#12224) - refactor: registry data kinds cleanup (rust-lang/cargo#12248) --- This commit also update LICENSE exceptions, as Cargo introduced a newer version of `dunce` and `blake3` as dependencies. r? `@ghost`
This was originally split out because before rust-lang#12269, it was needed elsewhere.
Is there official documentation for how this works, and what the bare required folders and files are from Rust nightly release? |
The documentation is at https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#script Unsure what you mean by files and folders. |
It's basically impossible to download the entire Rust toolchain on a temporary file system running a live Linux session. So I fetched the Nightly archive, immediately got rid of the 600+ MB documentation folder, and everything else except I'll re-fetch the nightly archive and extract
What I'm really working on doing is using Rust I converted a working C version to Rust using https://c2rust.com/. Now I have to figure out how to link to
Just to see what would happen if I was trying to compile the C to Rust code
This is my second time trying to use Rust to build something. My first time using Rust as a script. Thanks. |
@guest271314 a long-merged PR for an unrelated part of a feature that it doesn't look like you are using from your examples is likely not the best place for us to be having this conversation. For user support, https://users.rust-lang.org/ tends to be a good place to go. |
@epage Thanks. I was replying to
And included my use case for context. Have a great day. |
The links in my research led me here. |
@epage Is there anything special I need to do to avoid "no such command:
|
@guest271314 If you are not using cargo via rustup, you don't need to pass the Anyhow, this PR was closed a year ago. If you have feedback for |
What does this PR try to resolve?
More immediately, this is to unblock rust-lang/rust#112601
The hash existed for sharing a target directory. That code isn't
implemented yet and a per-user build cache might remove the need for it,
so let's remove it for now and more carefully weigh adding it back in.
In general, this is also the more appropriate way for a feature that would be first class.
How should we test and review this PR?
This originally built on #12268 but now stands alone as the other PR has windows issues to work out
Additional information