Skip to content
This repository was archived by the owner on Nov 17, 2021. It is now read-only.

Conversation

@seh
Copy link

@seh seh commented Oct 6, 2019

When a Jsonnet consults an Importer for a path nominated by an external variable or top-level argument file-based command-line flag, the "importedFrom" parameter passed to the Importer.Import method is not a valid URL, but is instead a sentinel placeholder value—namely, an empty string. Detect these sentinel values and use the current working directory as the base URL instead when resolving relative import paths.

NB: This patch is speculative for now, based on a change to the Jsonnet Importer.Import method's contract proposed by @sbarzowski (#266 (comment)). See google/go-jsonnet#329 for a request for establishing this contract.


This change is Reviewable

When a Jsonnet consults an Importer for a path nominated by an
external variable or top-level argument file-based command-line flag,
the "importedFrom" parameter passed to the Importer.Import method is
not a valid URL, but is instead a sentinel placeholder value (namely,
an empty string). Detect these sentinel values and use the current
working directory as the base URL instead when resolving relative
import paths.
@seh
Copy link
Author

seh commented Aug 16, 2020

See google/go-jsonnet#447. With that, we can proceed here. @mkmik, take note.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant