This touches up the filtering logic to ensure that upstream dependencies as well
as local dependencies are built with optimizations when `cargo build --release`
is used.
Fingerprinting will fail at an fs::stat() call if there is a broken
symlink in a package's directory. This commit recovers from fs::stat()
errors on broken symlinks by treating them as having mtime 0, which
should not affect the overall fingerprint.
Fix#135
* The installation script was modified to recognize when its running on windows,
as well as tweaking how it downloads and installs snapshots. The goal here was
to make the script runnable on buildbot for mac/linux/windows with 32/64 bit
options on mac/linux.
* The installation script now install rustc to `rustc/bin` in the local
directory to have parallel builds on buildbot.
* The tests now store all their temporary state locally in the build directory
to enable parallel builds on buildbot.
* A shell test is ignored which assumed the presence of a TTY output.
* The installation script was modified to recognize when its running on windows,
as well as tweaking how it downloads and installs snapshots. The goal here was
to make the script runnable on buildbot for mac/linux/windows with 32/64 bit
options on mac/linux.
* The installation script now install rustc to `rustc/bin` in the local
directory to have parallel builds on buildbot.
* The tests now store all their temporary state locally in the build directory
to enable parallel builds on buildbot.
* A shell test is ignored which assumed the presence of a TTY output.
Windows occasionally has \r\n while everywhere else has \n. Instead of worrying
about the difference, just replace all instances of \r with nothing and rely on
matching against \n.
* Add a convenience method bin() for generating the name of a binary. On windows
this remembers to append `.exe`.
* Stop executing relative paths to binaries and relying on PATH. This is
suffering from rust-lang/rust#15149 and failing to spawn processes on windows.
Additionally, this allows the tests to work with a pre-installed cargo becuase
the freshly built executables are precisely specified.
* A new function, escape_path(), was added for tests. When generated source
files with paths, this function needs to be called to properly escape the
\-character that appears in windows path names. Without this function we would
be generating invalid TOML and rust.
Apparently git checkouts have objects in the database with permissions 444 which
need to be changed to something with a write permission before removal.
This commit adds support for recognizing "fingerprints" of upstream
dependencies. When a dependency's fingerprint change, it must be rebuilt.
Currently the fingerprint unconditionally includes the version of the compiler
you're using as well as a specialized version depending on the type of source
you're compiling from:
- git sources return their fingerprint as the current SHA. This will
disregard any local changes.
- path sources return their fingerprint as the maximum mtime of any file found
at the location. This is a little too coarse and may rebuild packages too
often (due to sub-packages), but this should get the job done for now.
When executing `cargo compile`, dependencies are not rebuilt if their
fingerprint remained constant.
This commit enables support for custom precompilation commands to be triggered
before a package builds via rustc. The current interface is to have
`build = "foo"` in the `[project]` section of Cargo.toml and cargo will just
execute the exact command given.