jsonnet-language-server icon indicating copy to clipboard operation
jsonnet-language-server copied to clipboard

unexpected warnings on `std.native` function calls

Open iwinux opened this issue 1 year ago • 1 comments

Versions

  • VS Code Jsonnet Language Server Extension v0.3.3
  • jsonnet-language-server v0.11.0

Example Code

local nextID = std.native('nextID');

{
  id: nextID(),
}

Error Message

RUNTIME ERROR: Unexpected type null, expected function
	/tmp/test.jsonnet:4:7-15	object <anonymous>
	Field "id"	
	During manifestation	
jsonnet evaluation

iwinux avatar Aug 13 '23 04:08 iwinux

Hmm, I don't think we pass native funcs, other than the Tanka ones to the jsonnet VM. That could be it. We could have a new parameter to the server where the user specifies all expected native funcs (just their key)

julienduchesne avatar Aug 14 '23 03:08 julienduchesne