Fix rerun-if-changed directive syntax to use double colon (#82)#88
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-1870c3de-47c9-450b-8c3f-057896c38c1e Co-authored-by: Amp <amp@ampcode.com>
Please double check the following review of the pull request:
Changes in the diff
Identified Issues
Issue 001ExplanationThe line in the diff changes: println!("cargo:rerun-if-changed={file}");to println!("cargo::rerun-if-changed={file}");The correct syntax for the Cargo build script directive is with a single colon ( FixRevert the change back to the correct syntax: println!("cargo:rerun-if-changed={file}");Explanation of the fixCargo expects the directive to be exactly Suggested fix code snippet- println!("cargo::rerun-if-changed={file}");
+ println!("cargo:rerun-if-changed={file}");Missing tests for the incoming changesSince this is a build script directive, it is difficult to write a unit test for this exact print statement. However, you can add an integration test or manual test instructions to verify that when a watched file changes, Cargo reruns the build script. Suggested test approach:
No automated test code is provided here due to the nature of the change. Summon me to re-review when updated! Yours, Gooroo.dev |
Amp-Thread-ID: https://ampcode.com/threads/T-1870c3de-47c9-450b-8c3f-057896c38c1e