Closed TheSimpleZ closed 2 years ago
Hello!
In the following example:
import nimscripter import nimscripter/vmops const script = """ import std/os ## <-- this import proc build*(): bool = echo "building nim... " echo getCurrentDir().lastPathPart ## <--- and this usage of 'lastPathPart' echo "done" true when isMainModule: discard build() """ addVmops(buildpackModule) addCallable(buildpackModule): proc build(): bool const addins = implNimscriptModule(buildpackModule) discard loadScript(NimScriptFile(script), addins)
Causes
.... Hint: ~/Documents/nimscripter/bin/tvmops [Exec] Script Error: ~/.choosenim/toolchains/nim-1.6.2/lib/pure/os.nim:812:16 undeclared identifier: 'cmpic' candidates (edit distance, scope distance); see '--spellSuggest': (2, 5): 'cmp' [proc declared in ~/.choosenim/toolchains/nim-1.6.2/lib/system.nim(2245, 8)] (2, 5): 'cmp' [proc declared in ~/.choosenim/toolchains/nim-1.6.2/lib/system.nim(943, 6)].
Any tips on how to fix this?
Could maybe be related to https://github.com/nim-lang/Nim/issues/17051
I think i might need a define flag passed for this to work, so I guess yet another optional parameter to loadScript might be in order.
loadScript
Sorry for the delay, forgot about the issue.
Hello!
In the following example:
Causes
Any tips on how to fix this?
Could maybe be related to https://github.com/nim-lang/Nim/issues/17051