Replies: 1 comment
-
Related issue grafana/jsonnet-libs#644. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The Jsonnet VM can be instantiated with interpreter specific native functions for speed and convenience of implementation. Some functions are very slow in pure Jsonnet and benefit from being implemented natively and some projects like Tanka use this to more easily implement pretty YAML manifestation and regexp procedures.
Presently the
jsonnet-language-server
only supports the built-in std lib native functions and not any of those provided by Tanka or any other interpreter. Trying to use the language server on projects that use Tanka native functions will cause error diagnostics that are not particularly useful as the null function cannot be called and errors withunexpected type null
.My current personal opinion is that libraries that use non-default native functions should be more sympathetic to users and provide alternative implementations (or a more useful error) but I can understand that users of the language server may want the support here.
Perhaps there is a plugin based approach that could be used to allow the language server to optionally support specific native functions?
Beta Was this translation helpful? Give feedback.
All reactions