Skip to content

fix: Robust cache invalidation using realpath

Andreas Brandl requested to merge ab/jsonnet-cache/path into master

This aims to make cache invalidation robust against variance in how we specify paths.

In essence, before this change, this made a difference in terms of the content generated:

./generate-jsonnet-rules.sh ./path/to/some.jsonnet
./generate-jsonnet-rules.sh path/to/some.jsonnet

With caching, this led to non-obvious behavior (failed in CI, but not locally). See #149 (closed) for more details on how to reproduce the behavior we're trying to prevent with this change.

This change comes with two commits, I've separated the shellcheck related ones into 28d7e8de. Without those changes, shellcheck wouldn't let me edit the file.

Edited by Andreas Brandl

Merge request reports