Problem: env!() bakes the path at compile time,
so it breaks when the binary runs from a different
location (e.g. a Guix/Nix sandbox or container).
Solution: use std::env::var() to read it at runtime.
This patch removes the option to scan out-of-tree json files
for locales resolution.
When the time comes to have to incorporate out-of-tree apps
with locales, a method should be devised that doesn't expand
the dependency surface of the project beyond the immediate
repository.
This makes `locales` its own package. As a result, the system will not
rebuild the locales unless necessary.
Additionally, the `generate-locales` command has been updated to simply
force a rebuild of this file in order to keep the previous behavior.
Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-04 12:19:06 +08:00
Renamed from xtask/src/generate_locales.rs (Browse further)