Commit Graph

5 Commits

Author SHA1 Message Date
Dave Cunningham
f60b015405 Corresponding change to formatter, see https://github.com/google/jsonnet/pull/937 2021-12-21 12:17:41 +00:00
Stanisław Barzowski
5899996502 Make go linter happy again. 2021-05-19 15:10:49 +02:00
Simon Let
415d036e5e Put AddPlusObject behind an option, rename FixPlusObject 2021-04-29 22:55:07 +02:00
Stanisław Barzowski
b70cbd441a Anonymous Import Locations
We used to treat dummy paths like <stdin>, <std>, <extvar> as
real import locations, which causes obvious problem for importers.

After this change we consistently pass "" (an empty string) as location
for non-imported paths.

We exposed new functions to properly handle all paths.

The first function family, EvaluateFile* which allow evaluating
a Jsonnet program at a specified importable path. It should
be used in most cases.

The second function family, EvaluateAnonymousSnippet* allows evaluating
a snippet without an importable path. It should be used for situations
like the code passed as a commandline argument, stdin, etc.

The old function family, EvaluateSnippet* is now deprecated, but
works the same as before, i.e. the passed filenames are treated
as imported paths.

Changes are required to custom importers to make sure they satisfy
the refined contract.

Fixes #329.
2020-09-08 17:27:47 +02:00
Dave Cunningham
724650d358
Add native golang formatter (#388)
Add native golang formatter
2020-03-10 22:19:49 +00:00