Following my success in getting #30 to work on a remote linux, I'm trying to achieve the same by copying the libjsonnet I got from the server and working locally, on a windows 10 PC.
I got some kind of success by Using this configuration:
{
"jsonnet.languageServer.jpath": [
"C:/workspace/tools/libjsonnet"
],
"jsonnet.languageServer.tankaMode": false
}
The autocompletion works, but unlike the linux version, I get a warning on the "local" keyword on my first line;
local ddb = import 'ddb.docker.libjsonnet';
RUNTIME ERROR: Undefined external variable: core.env.available
C:\workspace\tools\libjsonnet\ddb.docker.libjsonnet:42:29-61 thunk <_core_env_available> from <$>
C:\workspace\tools\libjsonnet\ddb.docker.libjsonnet:376:35-54 thunk from <thunk <indexes> from <function <envIndex>>>
<std>:1636:21-24 thunk from <function <anonymous>>
<std>:32:25-26 thunk from <function <anonymous>>
<std>:32:16-27 function <anonymous>
<std>:1636:9-25 function <anonymous>
C:\workspace\tools\libjsonnet\ddb.docker.libjsonnet:376:21-55 thunk <indexes> from <function <envIndex>>
C:\workspace\tools\libjsonnet\ddb.docker.libjsonnet:377:33-40 thunk from <thunk <index> from <function <envIndex>>>
C:\workspace\tools\libjsonnet\ddb.docker.libjsonnet:377:22-41 thunk <index> from <function <envIndex>>
C:\workspace\tools\libjsonnet\ddb.docker.libjsonnet:378:5-10 function <envIndex>
...
<std>:1545:21-22 thunk from <function <anonymous>>
<std>:1545:5-33 function <anonymous>
C:\workspace\tools\libjsonnet\ddb.docker.libjsonnet:165:9-43 function <apply_docker_compose_included_services>
C:\workspace\tools\libjsonnet\ddb.docker.libjsonnet:272:62-148 thunk from <thunk from <function <Compose>>>
C:\workspace\tools\libjsonnet\ddb.docker.libjsonnet:175:2-9 function <apply_resolve_ports_conflicts>
C:\workspace\tools\libjsonnet\ddb.docker.libjsonnet:272:32-149 thunk from <function <Compose>>
C:\workspace\tools\libjsonnet\ddb.docker.libjsonnet:177:44-50 function <apply_default_network_name>
C:\workspace\tools\libjsonnet\ddb.docker.libjsonnet:272:5-150 function <Compose>
C:\workspace\projects\THE-PROJECT\docker-compose.yml.jsonnet:(9:1)-(99:3) $
During evaluation
OK, that might not be a real issue, and I should probably set every std.extVar
value I plan to use in the extension configuration, that's no my main concern.
When I try to ctrl+click on the file name on that line, it opens an editor to my project root (C:\workspace\projects\THE-PROJECT), with that message:
![image](https://private-user-images.githubusercontent.com/3399355/261054093-902eb8e5-67bc-446b-bd5b-1a4472ad3925.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5MzYzNzIsIm5iZiI6MTcxOTkzNjA3MiwicGF0aCI6Ii8zMzk5MzU1LzI2MTA1NDA5My05MDJlYjhlNS02N2JjLTQ0NmItYmQ1Yi0xYTQ0NzJhZDM5MjUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDJUMTYwMTEyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NjgzMGI4NWZhNzcyZDlkYTViN2U0ZmE0ZDQ0YmE5MzlhZDRiYjMyOWFmOTVlODg4N2YzYTFhZDc0MmEwYzJkMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.sbh8pCg9LUxlpmZY7vmhgSItO7HC-K8YqRJ2l7Pma-I)
I suspect there is something off with the path handling of windows, but I don't know what to debug. The only thing I get is this:
time="2023-08-16T17:16:59+02:00" level=info msg="configuration updated: {ResolvePathsWithTanka:false JPaths:[C:/workspace/tools/libjsonnet] ExtVars:map[] ExtCode:map[] FormattingOptions:{Indent:2 MaxBlankLines:2 StringStyle:1 CommentStyle:1 PrettyFieldNames:true PadArrays:false PadObjects:true SortImports:true UseImplicitPlus:true StripEverything:false StripComments:false StripAllButComments:false} EnableEvalDiagnostics:true EnableLintDiagnostics:false}"
time="2023-08-16T17:17:02+02:00" level=error msg="Hover: error parsing the document"
Any idea of what I need to do ?
EDIT: I tried with tanka enabled and disabled (with a full vs code restart in-between) and it behaves in the same way, except that I have a more verbose "unable to identify the project root" with tanka enabled.