Git Product home page Git Product logo

Comments (1)

d-e-s-o avatar d-e-s-o commented on September 24, 2024

I had a look at this issue. The problem seems to be that the generated files' mtimes are after those of the output that they are compared against to determine staleness. Intuitively, that makes no sense, because it is the build script that emits those outputs to stdout while also generating those files. Hence, the build script's outputs can only be available completely after said script has run (that is, after the files have been generated as well).

This behavior seems to be caused by https://github.com/rust-lang/cargo/blob/4a60ff78a5f03e7c9ed2399754efb62c80a8ecc8/src/cargo/core/compiler/fingerprint/mod.rs?L249#L249-L256 and so is fully intentional to the degree I can tell. I haven't dug into why exactly that is (the comments doesn't make it clear to me), but I will say that we are somewhat out of the purview of what build scripts are meant to be used for. E.g., just check https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script

This is not a blocking issue, but it's not great behavior either. One thing I believe we can do is rewind the mtimes of our generated files to a time before the output file's mtime.

from blazesym.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.