Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
No idea. I'm quite new to Nim, so I don't know where to start looking.
Additional Information
I'm trying to build a task runner using nimscripts as a base. However, this issue makes it very annoying to use IDEs that report errors since almost every line will be marked red unless called in the root of the module.
$ nim -v
Nim Compiler Version 1.7.1 [Linux: amd64]
Compiled at 2022-01-05
Copyright (c) 2006-2021 by Andreas Rumpf
git hash: 9df195ef581879cf9e5c3c3154755bd1dba677c6
active boot switches: -d:release
Also tried with the stable channel and got the same result.
Copied over from https://github.com/saem/vscode-nim/issues/72
Example
I'm trying to use a standalone nimscript. The following script:
Looks like this:![image](https://user-images.githubusercontent.com/2884929/150650463-c9272212-9275-4bbd-aa8d-867226e2f50d.png)
It's reporting that:
exec
andgetCurrentDir
are undeclared identifiersI'd expect it to only report that the
build
proc is unused.All errors disappear if I simply call the build proc at the end of the script.
Current Output
Using
choosenim devel
orchoosenim stable
and then:Expected Output
Only a warning regarding unused proc. Nothing else. The other methods should be supported in nimscripts according to https://nim-lang.org/docs/nimscript.html
Possible Solution
No idea. I'm quite new to Nim, so I don't know where to start looking.
Additional Information
I'm trying to build a task runner using nimscripts as a base. However, this issue makes it very annoying to use IDEs that report errors since almost every line will be marked red unless called in the root of the module.
Also tried with the stable channel and got the same result.