-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
core/compiler: report executable paths for all binary crates #13605
base: master
Are you sure you want to change the base?
Conversation
Ensure the `compiler-artifact` message reports `executable: "..."` for all builds where the crate-type is set to `bin`. Currently, only crates with a target-type of `bin` will report the executable path. This is unfortunate, since several other builds produce executables that are otherwise hard to distinguish from other artifacts due to the lack of file extension. In particular, the following builds now properly report their executables: - Library targets built via `cargo rustc --crate-type bin` - Build scripts Before they would report `executable: null` and thus make it very hard for callers to decide whether the produced file is an executable.
Generally, I'd recommend creating an issue first for us to focus the discussion on the problem you are facing and what the potential solutions are. Could you elaborate on why this is needed? |
We build application bundles for a range of operating systems, including This setup keeps the Cargo package as the center piece and using as much metadata from the unmodified Cargo setup as possible, with minor annotations required as package-metadata. By optionally using the unstable Cargo Unfortunately, we face 2 issues which we have to work around with rather ugly heuristics:
Given the documentation of the What exactly are your concerns? Is this about confusing existing tools which expect a single build to only ever report a single executable? I am not entirely sure how the key is used by external tools. We always parse the entire metadata before the build, so we can filter based on target-types, but I guess if you do not do this, it might be confusing to see multiple Alternatively, I could reduce the PR to only report executables for |
I feel there is a problem you are having that we need to dig into and better understand. Would you be willing to move this conversation to an Issue? I've found Issues are much better for discussions of problems and proposed solutions while PRs are better for the implementation. Part of this stems from PRs mixing problem/solution/implementation and part from the fact that there can be multiple PRs for one Problem and that can split the problem/solution discussion, making it harder to track. |
Sure! Filed as #13612. |
Converted to draft for now until we have something from #13612. |
☔ The latest upstream changes (presumably #14293) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (possibly 081d7ba) made this pull request unmergeable. Please resolve the merge conflicts. |
Ensure the
compiler-artifact
message reportsexecutable: "..."
for all builds where the crate-type is set tobin
.Currently, only crates with a target-type of
bin
will report the executable path. This is unfortunate, since several other builds produce executables that are otherwise hard to distinguish from other artifacts due to the lack of file extension.In particular, the following builds now properly report their executables:
cargo rustc --crate-type bin
Before they would report
executable: null
and thus make it very hard for callers to decide whether the produced file is an executable.