Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected warnings on std.native function calls #111

Open
iwinux opened this issue Aug 13, 2023 · 1 comment
Open

unexpected warnings on std.native function calls #111

iwinux opened this issue Aug 13, 2023 · 1 comment

Comments

@iwinux
Copy link

iwinux commented Aug 13, 2023

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
@julienduchesne
Copy link
Member

julienduchesne commented Aug 14, 2023

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants