movatechtoday / jsonnet_pro

Other
1 stars 0 forks source link

Does not recognise imported function #8

Closed quom closed 1 year ago

quom commented 1 year ago

If I have a file like func.jsonnet with contents:

function(params) {
    foo: 'bar',
}

and file main.jsonnet

local func = import 'func.jsonnet';

{
    baz: func({}),
}

then jsonnet pro does not recognise the func({}) call as a function:

image

If I change the function to be within a document rather than at the top level, e.g.:

{
    fn: function(params) { foo: 'bar', },
}

and import this file then func.fn({}) is resolved correctly.

movatechtoday commented 1 year ago

Hello @quom There is a new version of the plugin available. https://jsonnet.movatech.today/docs/release_notes/version_2023.1.2/

The issue should be fixed.

I would like to thank you for the provided use case. It allow improving the plugin core and its ecosystem.

movatechtoday commented 1 year ago

I would appreciate if you fill in the survey and share your experience using the Jsonnet Pro plugin.

https://www.surveymonkey.com/r/32JTDKS