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

Exited with hard error when custom build file no existence or not in package #12995

Merged
merged 5 commits into from
Nov 24, 2023

Conversation

linyihai
Copy link
Contributor

@linyihai linyihai commented Nov 17, 2023

What does this PR try to resolve?

Fixed #11383

How should we test and review this PR?

Add test build_script_outside_pkg_root, this will check custom_build.rs existence and whether in the package root, if not then exited with a hard error

Additional information

The code just handle the custom build target that i know how to test it. Other target type is skipped.

@rustbot
Copy link
Collaborator

rustbot commented Nov 17, 2023

r? @epage

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added Command-package S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 17, 2023
@linyihai linyihai changed the title Issue 11383 add warning for custom build file no existence or not in package Nov 17, 2023
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I am not sure if this is ready for review but I took a look.

src/cargo/ops/cargo_package.rs Show resolved Hide resolved
src/cargo/ops/cargo_package.rs Outdated Show resolved Hide resolved
src/cargo/ops/cargo_package.rs Show resolved Hide resolved
tests/testsuite/package.rs Outdated Show resolved Hide resolved
tests/testsuite/package.rs Outdated Show resolved Hide resolved
src/cargo/ops/cargo_package.rs Outdated Show resolved Hide resolved
@linyihai linyihai marked this pull request as ready for review November 20, 2023 07:05
src/cargo/ops/cargo_package.rs Outdated Show resolved Hide resolved
src/cargo/ops/cargo_package.rs Show resolved Hide resolved
tests/testsuite/package.rs Outdated Show resolved Hide resolved
@linyihai linyihai changed the title add warning for custom build file no existence or not in package Exited with hard error when custom build file no existence or not in package Nov 22, 2023
@linyihai
Copy link
Contributor Author

r? @weihanglo

@rustbot rustbot assigned weihanglo and unassigned epage Nov 24, 2023
@weihanglo
Copy link
Member

Thank you. Sometimes I would force push and clean up the commit history if it help reasoning the patch. But that's fine I'll go ahead and merge it.

@bors r+

@bors
Copy link
Contributor

bors commented Nov 24, 2023

📌 Commit 75aaa40 has been approved by weihanglo

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 Nov 24, 2023
@bors
Copy link
Contributor

bors commented Nov 24, 2023

⌛ Testing commit 75aaa40 with merge 22bbc95...

@bors
Copy link
Contributor

bors commented Nov 24, 2023

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 22bbc95 to master...

@bors
Copy link
Contributor

bors commented Nov 24, 2023

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 22bbc95 to master...

@bors bors merged commit 22bbc95 into rust-lang:master Nov 24, 2023
20 checks passed
@bors
Copy link
Contributor

bors commented Nov 24, 2023

👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request.

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 25, 2023
Update cargo

7 commits in 71cd3a926f0cf41eeaf9f2a7f2194b2aff85b0f6..9b13310ca596020a737aaa47daa4ed9ff8898a2f
2023-11-20 15:30:57 +0000 to 2023-11-24 16:20:51 +0000
- feat: Add `CARGO_RUSTC_CURRENT_DIR` (unstable) (rust-lang/cargo#12996)
- Exited with hard error when custom build file no existence or not in package (rust-lang/cargo#12995)
- try running on windows (rust-lang/cargo#13042)
- refactor(toml): Better abstract inheritance details (rust-lang/cargo#13021)
- cargo-test-support: Add features to the default Cargo.toml file (rust-lang/cargo#12997)
- Migrate rustfix to the cargo repo (rust-lang/cargo#13005)
- typo: rusc -> rustc (rust-lang/cargo#13019)

---

This also removes the check to ensure that `rustfix` between

* src/tools/cargo
* src/tools/compiletest

has the same version,
since `rust-lang/rustfix` has migrated to under `rust-lang/cargo`.

r? ghost
@rustbot rustbot added this to the 1.76.0 milestone Nov 25, 2023
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Nov 27, 2023
Update cargo

7 commits in 71cd3a926f0cf41eeaf9f2a7f2194b2aff85b0f6..9b13310ca596020a737aaa47daa4ed9ff8898a2f
2023-11-20 15:30:57 +0000 to 2023-11-24 16:20:51 +0000
- feat: Add `CARGO_RUSTC_CURRENT_DIR` (unstable) (rust-lang/cargo#12996)
- Exited with hard error when custom build file no existence or not in package (rust-lang/cargo#12995)
- try running on windows (rust-lang/cargo#13042)
- refactor(toml): Better abstract inheritance details (rust-lang/cargo#13021)
- cargo-test-support: Add features to the default Cargo.toml file (rust-lang/cargo#12997)
- Migrate rustfix to the cargo repo (rust-lang/cargo#13005)
- typo: rusc -> rustc (rust-lang/cargo#13019)

---

This also removes the check to ensure that `rustfix` between

* src/tools/cargo
* src/tools/compiletest

has the same version,
since `rust-lang/rustfix` has migrated to under `rust-lang/cargo`.

r? ghost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-package S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo package doesn't include build script if this has a custom path
5 participants