-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
bugSomething isn't workingSomething isn't working
Description
We only seem to be able to use sjsonnet libraries inside of imported files. ( the ds namespace is not recognized)
Here is a simple junit test you can add to the ImportTest.java file to verify:
@Test
void importWithLib() {
Mapper mapper = new Mapper("import 'example.ds'", Collections.emptyList(), Collections.singletonMap("example.ds", "{test: ds.contains([1,2],1)}"));
String result = mapper.transform("{}");
assertEquals("{\"test\":true}", result);
}
The error response is sjsonnet.Error Unknown variable ds at .... so it does seem to initially evaluate correctly but has issues when actually used
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working