Commit Graph

3 Commits

Author SHA1 Message Date
Florian
6cf3a05067 RFC: Make include_dependency(path; track_content=true) the default (#54965)
By changing the default to `true` we make it easier to build relocatable
packages from already existing ones when 1.11 lands.

This keyword was just added during 1.11, so its not yet too late to
change its default.
2024-07-02 13:22:30 -04:00
Florian
b5bd10e591 Add track_content option to allow hashing of include_dependencys (#51798)
Continuation of #49866.
Fixes #52462 

So far any `include_dependency` was tracked by `mtime`.
A package using `include_dependency` can't be relocated without
recompilation if the dependency also needs to be relocated.

With `include_dependency(path, track_content=true)` the tracking works
like for `include`,
i.e. recompilation is only triggered when the file's content changes.
In case `path` is a directory we use the string `join(readdir(path))` as
content.

---------

Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com>
2024-02-08 12:54:08 +01:00
Florian
f2df1b41b8 Make precompile files relocatable (#49866)
String replacement with `@depot` when serializing out happens with any
paths that are located inside a `DEPOT_PATH` (first match wins). If no
match, then we emit the absolute file path as before. Right now we only
emit one token `@depot`.

String replacement of `@depot` when loading happens now on a `.ji` file
basis and only if all the listed include dependencies can be resolved to
files located in one and the same depot on `DEPOT_PATH` (again, first
match wins). If we can't resolve, then the cache is invalided with
`stale_cachefile`.
2023-10-19 20:56:22 -04:00