Description
It would be great if Jsonnet could natively resolve remote imports, rather than be limited to import
ing local files. In its current state, a user must use a workaround like defining all of their Jsonnet in a monorepo, or using a secondary tool like jsonnet-bundler
or vendir
to "vendor" the Jsonnet files locally first.
It would be great if we could extend imports.go to support remote imports. This could either be an extension of the default FileImporter
and it's associated functions, or a new importer type. Extending the default importer would be preferred since it's the default importer in cmd.go
today, otherwise users would have to change that one line and maintain their own fork/build.
I started working on a quick-and-dirty implementation for resolving imports over HTTP, but this became very GitHub-specific once I added auth support. I'd be happy to develop this feature and submit a PR, but I'm hoping the maintainers could provide feedback on (a) whether you support/reject the concept of remote imports in general and (b) preferences on protocol (HTTP vs git vs other) before I invested more time in this.