vscode-jsonnet icon indicating copy to clipboard operation
vscode-jsonnet copied to clipboard

Is there a way to provide TLAs when evaluating the file?

Open pddg opened this issue 2 years ago • 2 comments

I want to evaluate the jsonnet file that requires some TLAs like this.

function(name)
  {
    value: std.format("Hello %s", name)、
  }

However, there seems to be no way to provide these information when evaluating the file. And the evaluation fails due to RUNTIME ERROR: Missing argument: name Top-level function call.

Currently I need to put a dummy file that calls this function to evaluate this. Also, due to this specification, all jsonnet and libsonnet files containing such function declarations are marked with a warning.

Is there some mechanism to provide the TLAs at the time of evaluation?

pddg avatar Dec 15 '22 01:12 pddg

Any update on this? The config jsonnet.languageServer.extCode doesn't seem to work

guiguan avatar Feb 03 '23 06:02 guiguan

I just published the extCode support: https://github.com/grafana/vscode-jsonnet/releases/tag/v0.4.1

julienduchesne avatar Aug 16 '23 15:08 julienduchesne