Repository navigation
rerun cpp-overload-test build script when src/ changes - #63
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: Ikeh Chukwuka <mrikehchukwuka@gmail.com>
85794b2 to
9ca886f
Compare
teor2345
left a comment
There was a problem hiding this comment.
This looks good enough to go, thank you!
| cargo test --all-features --package cpp-overload-test --lib | ||
| cargo test --doc --all-features --package cpp-overload-test | ||
| cargo fmt --package cpp-overload-test -- --check | ||
| - name: Check changed cpp! code is rebuilt |
There was a problem hiding this comment.
Normally I would split this out into a separate job, but we're getting a lot of jobs now, so I don't think it matters that much.
If it turns out this job is always the slowest, or it fails, we can change it later.
| // `cc` prints `rerun-if-env-changed` lines, which turns off Cargo's default rescan of the | ||
| // package, so instruct Cargo to rerun this script whenever `src/` changes and pick up | ||
| // `cpp!` updates. | ||
| println!("cargo::rerun-if-changed=src"); |
There was a problem hiding this comment.
It would be great to upstream this fix to cpp. But this is an optional change, please prioritise completing your overloading wrapper PR during the Outreachy application period.
If you do have time to do both, feel free to include it in your Outreachy application.
There was a problem hiding this comment.
hi teor, i have created a pr upstream suggesting a fix for the build script, mystor/rust-cpp#118.
related to #61
adds
cargo::rerun-if-changed=srctocpp-overload-test/build.rs.once a build script prints any
rerun-ifline, cargo stops rescanning the package (cargo docs). so editing acpp!block never reran the script, and the build failed with "This cpp! macro is not found in the library's rust-cpp metadata" untilbuild.rswas touched.after
touch cpp-overload-test/src/stdcpp/forward_list.rsandcargo build -v:before:
after:
edit:
the pr adds a CI test in the
cpp-overload-test-okjob. it tests thecpp!code insrc/rerun_check.rs, then copiesrerun-check/rerun_check.rsover it to change the existingcpp!block and add a new one. after that it tests again withoutcargo clean. with thererun-if-changedline removed, the second test fails with the metadata error. also, i updated the "Testing Quirks" section inREADME.md.