Comments (9)
I have a feeling that Nix might do that.
Why not just vendor it into your repo though, using jsonnet-bundler to manage that if you want.
from jsonnet.
Can we get an update on this enhancement? Is it something that will ever be worked on? This is issue #9 from 2014....
from jsonnet.
I don't think so. There is some objection to the idea because although in principle it's no more non-hermetic than regular file I/O and indeed you can use UNIX sockets or whatever to connect to curl and achieve the same thing, nevertheless it makes the config depend on having an internet connection, and URLs don't feel as static as files on disk.
The people who have needed this have implemented it using import callbacks or native callbacks, which works quite well. If you use native callbacks you have to do the cacheing yourself.
from jsonnet.
Feel free to keep asking though, if enough people want it, it would tip the balance.
from jsonnet.
(digression)
The people who have needed this have implemented it using import callbacks or native callbacks, which works quite well. If you use native callbacks you have to do the cacheing yourself.
Is there any reason why native callbacks could be preferred over import callbacks for that? I thought that native callbacks are supposed to be for pure functions only.
BTW probably the most mature discussion of jsonnet package management at the moment is ksonnet stuff here:
https://docs.google.com/document/d/1CQ3cQMH0WgoOpnVl_qFWhqMybE0IJIpkbJOu1xH6HFE
from jsonnet.
No, I think they used native callbacks because they didn't realize they could use import callbacks (although I may be mis-remembering this anyway).
from jsonnet.
What if we force the import string to include a checksum e.g. "https+sum://foo.com/bar#sha256:123456789abcdef..."
It would still suffer from:
nevertheless it makes the config depend on having an internet connection
But it would be hermetic.
Furthermore, a "file+sum:/...." URL would allow you to be stricter for local on-disk imports too.
from jsonnet.
With explicit hermetic imports, you always get the same thing, regardless of possible diamond dependencies
from jsonnet.
i'd like this feature
my use case is to import some external non-jsonnet json data in a secure way
the json data is not available at packaging time but will be available in a containerized environment at runtime (the name of the resource is well known and versioned)
python and shell are not to be included in the container image - ideally as few tools as possible
from jsonnet.
Related Issues (20)
- OSS-Fuzz issue 59105 HOT 1
- Jsonnet Incompatible Architecture (have 'x86_64', need 'arm64') HOT 1
- std.{any,all} fails with gibberish log when arr contains non boolean elements
- Jsonnet.org - make headers links
- Specification missing rule for empty object
- Reflection of function arguments
- CMake: Non-existent dependency warning when attempting to disable BUILD_JSONNET option HOT 2
- std.parseYaml fails on non-standard yaml feature, supported in other implementations HOT 1
- adjacent object literals vs adjacent variables HOT 2
- Different behavior of hidden status inheritance between Jsonnet and Go-Jsonnet HOT 5
- stack-overflow exists in the function parse in parser.cpp
- stack-overflow exists in the function maybeParseGreedy in parser.cpp HOT 1
- add atan2 to std HOT 1
- Migrate Jsonnet from Travis CI to GitHub Actions HOT 4
- Unable to install jsonnet in Google Colab notebook: failed building wheel
- OSS-Fuzz issue 65944 HOT 2
- OSS-Fuzz issue 65950 HOT 4
- std.manifestIni should support repeated section names
- Can't parse object HOT 3
- Behavior of `std` overriding and desugaring. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsonnet.