You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "eejbyfeldt (via GitHub)" <gi...@apache.org> on 2024/06/17 07:29:40 UTC
[PR] fix: Running cargo build always triggers rebuild [datafusion-comet]
eejbyfeldt opened a new pull request, #579:
URL: https://github.com/apache/datafusion-comet/pull/579
I don't think rerun-if-changed supports globs
https://doc.rust-lang.org/cargo/reference/build-scripts.html#rerun-if-changed
but according to the docs passing a directory should work.
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
Closes #578.
## Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
Quicker build in many cases.
## What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
Fixes our build.rs build script to only rebuild when there is actual changes in the proto files.
## How are these changes tested?
Running `make core` manually.
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: Running cargo build always triggers rebuild [datafusion-comet]
Posted by "viirya (via GitHub)" <gi...@apache.org>.
viirya merged PR #579:
URL: https://github.com/apache/datafusion-comet/pull/579
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: Running cargo build always triggers rebuild [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #579:
URL: https://github.com/apache/datafusion-comet/pull/579#discussion_r1642918541
##########
core/build.rs:
##########
@@ -20,7 +20,7 @@
use std::{fs, io::Result, path::Path};
fn main() -> Result<()> {
- println!("cargo:rerun-if-changed=src/execution/proto/*.proto");
+ println!("cargo:rerun-if-changed=src/execution/proto/");
Review Comment:
This change seems correct to me. The docs state that the syntax is [cargo::rerun-if-changed=PATH](https://doc.rust-lang.org/cargo/reference/build-scripts.html#rerun-if-changed) and adds these notes:
```
The rerun-if-changed instruction tells Cargo to re-run the build script if the file at the given path has changed. Currently, Cargo only uses the filesystem last-modified “mtime” timestamp to determine if the file has changed. It compares against an internal cached timestamp of when the build script last ran.
If the path points to a directory, it will scan the entire directory for any modifications.
```
##########
core/build.rs:
##########
@@ -20,7 +20,7 @@
use std::{fs, io::Result, path::Path};
fn main() -> Result<()> {
- println!("cargo:rerun-if-changed=src/execution/proto/*.proto");
+ println!("cargo:rerun-if-changed=src/execution/proto/");
Review Comment:
This change seems correct to me. The docs state that the syntax is [cargo::rerun-if-changed=PATH](https://doc.rust-lang.org/cargo/reference/build-scripts.html#rerun-if-changed) and adds these notes:
The rerun-if-changed instruction tells Cargo to re-run the build script if the file at the given path has changed. Currently, Cargo only uses the filesystem last-modified “mtime” timestamp to determine if the file has changed. It compares against an internal cached timestamp of when the build script last ran.
If the path points to a directory, it will scan the entire directory for any modifications.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: Running cargo build always triggers rebuild [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #579:
URL: https://github.com/apache/datafusion-comet/pull/579#discussion_r1642918541
##########
core/build.rs:
##########
@@ -20,7 +20,7 @@
use std::{fs, io::Result, path::Path};
fn main() -> Result<()> {
- println!("cargo:rerun-if-changed=src/execution/proto/*.proto");
+ println!("cargo:rerun-if-changed=src/execution/proto/");
Review Comment:
This change seems correct to me. The docs state that the syntax is `[cargo::rerun-if-changed=PATH](https://doc.rust-lang.org/cargo/reference/build-scripts.html#rerun-if-changed) and adds these notes:
```
The rerun-if-changed instruction tells Cargo to re-run the build script if the file at the given path has changed. Currently, Cargo only uses the filesystem last-modified “mtime” timestamp to determine if the file has changed. It compares against an internal cached timestamp of when the build script last ran.
If the path points to a directory, it will scan the entire directory for any modifications.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org