NimBorg icon indicating copy to clipboard operation
NimBorg copied to clipboard

Missing 'map' identifier in Nim 0.12.0

Open wizzardx opened this issue 9 years ago • 5 comments

On Nim HEAD (1a73cef), this command fails on a NimBorg checkout:


david@david:/tmp/wat/NimBorg$ nim c -r ./nimborg/py/test/test_py_eval.nim Hint: system [Processing] Hint: test_py_eval [Processing] Hint: high_level [Processing] Hint: low_level [Processing] Hint: dynlib [Processing] /tmp/wat/NimBorg/nimborg/py/low_level.nim(1661, 5) Warning: use 'defer'; standalone 'finally' is deprecated [Deprecated] Hint: macros [Processing] Hint: strutils [Processing] Hint: parseutils [Processing]

/tmp/wat/NimBorg/nimborg/py/high_level.nim(103, 10) Error: undeclared identifier: 'map'

If I edit high_level.nim, and add in an import line like this near the top:


from sequtils import map

Then things seem to work:


david@david:/tmp/wat/NimBorg$ nim c -r ./nimborg/py/test/test_py_eval.nim Hint: system [Processing] Hint: test_py_eval [Processing] Hint: high_level [Processing] Hint: low_level [Processing] Hint: dynlib [Processing] /tmp/wat/NimBorg/nimborg/py/low_level.nim(1661, 5) Warning: use 'defer'; standalone 'finally' is deprecated [Deprecated] Hint: macros [Processing] Hint: sequtils [Processing] Hint: strutils [Processing] Hint: parseutils [Processing] /tmp/wat/NimBorg/nimborg/py/high_level.nim(214, 20) Hint: 'T' is declared but not used [XDeclaredButNotUsed] Hint: [Link] Hint: operation successful (15919 lines compiled; 0.260 sec total; 23.240MB; Debug Build) [SuccessX]

0.42

wizzardx avatar Dec 13 '15 06:12 wizzardx

Still broken in Nim 0.17.2.

My test code in hello.nim:

import nimborg/py/high_level

let py_math = pyImport("math")

Attempting to compile and run:

david@david-pc:/tmp/x/y/z$ nim c -r hello.nim
Hint: used config file '/etc/nim.cfg' [Conf]
Hint: system [Processing]
Hint: hello [Processing]
Hint: high_level [Processing]
Hint: low_level [Processing]
Hint: dynlib [Processing]
Hint: strutils [Processing]
Hint: parseutils [Processing]
Hint: math [Processing]
Hint: algorithm [Processing]
Hint: macros [Processing]
/home/david/.nimble/pkgs/NimBorg-0.0.2/nimborg/py/high_level.nim(102, 10) Error: undeclared identifier: 'map'

david@david-pc:/tmp/x/y/z$ nim --version
Nim Compiler Version 0.17.2 (2017-09-08) [Linux: amd64]
Copyright (c) 2006-2017 by Andreas Rumpf

active boot switches: -d:release

wizzardx avatar Sep 28 '17 09:09 wizzardx

Sorry chap, I'm not maintaining this repo any more. I'll take it down eventually so that people don't get confused. Note that some core nim devs have forked it, and perhaps other people would keep maintaining it.

micklat avatar Sep 28 '17 11:09 micklat

@micklat if you could, please don't take down repos. Just add a note to the readme that you're not maintaining it anymore. It sucks losing repos, even if forks exist.

dom96 avatar Sep 28 '17 12:09 dom96

It's really annoying too, as any links to the repo will 404.

Varriount avatar Sep 28 '17 14:09 Varriount

OK, the repo stays.

micklat avatar Sep 29 '17 06:09 micklat