CertainLach / jrsonnet

Rust implementation of Jsonnet language
MIT License
312 stars 37 forks source link

JPATH not applied to `--tla-code-file` #130

Open Duologic opened 1 year ago

Duologic commented 1 year ago

A plain example:

[I] ➜ cat vendor/read.jsonnet
{}

[I] ➜ jsonnet -J vendor --tla-code-file "file=read.jsonnet" -e 'function(file) std.toString(file)'
"{ }"

[I] ➜ jrsonnet -J vendor --tla-code-file "file=read.jsonnet" -e 'function(file) std.toString(file)'
error: invalid value 'file=read.jsonnet' for '--tla-code-file <name=tla code path>': No such file or directory (os error 2)

For more information, try '--help'.

I've also found that when using the full path vendor/<path/to/file> and the tla-code-file has relative imports it may not work well either, but couldn't come up with a minimally reproducible test case.

CertainLach commented 1 year ago

Huh. I wonder why jpath is not resolved in input in official jsonnet, yet tla-code-file uses it.