nim-lang / c2nim

c2nim is a tool to translate Ansi C code to Nim. The output is human-readable Nim code that is meant to be tweaked by hand before and after the translation process.
MIT License
502 stars 62 forks source link

replace shallowCopy with move, otherwise it fails nimgen #246

Closed ringabout closed 2 years ago

ringabout commented 2 years ago

ref https://github.com/nim-lang/Nim/pull/19972

2022-07-28T11:12:09.4182108Z Downloading https://github.com/nim-lang/c2nim using git
2022-07-28T11:12:09.4182506Z   Verifying dependencies for c2nim@#head
2022-07-28T11:12:09.4182810Z  Installing c2nim@#head
2022-07-28T11:12:09.4183134Z    Building c2nim/c2nim using c backend
2022-07-28T11:12:09.4183913Z /tmp/nimble_20270/githubcom_nimlangc2nim_#head/c2nim.nim(12, 16) Warning: Number of spaces around '/' is not consistent [Spacing]
2022-07-28T11:12:09.4184858Z /tmp/nimble_20270/githubcom_nimlangc2nim_#head/compiler/llstream.nim(13, 3) Warning: imported and not used: 'strutils' [UnusedImport]
2022-07-28T11:12:09.4186479Z /tmp/nimble_20270/githubcom_nimlangc2nim_#head/compiler/options.nim(11, 26) Warning: imported and not used: 'osproc' [UnusedImport]
2022-07-28T11:12:09.4187298Z /tmp/nimble_20270/githubcom_nimlangc2nim_#head/compiler/idents.nim(15, 11) Warning: imported and not used: 'strutils' [UnusedImport]
2022-07-28T11:12:09.4188112Z /tmp/nimble_20270/githubcom_nimlangc2nim_#head/compiler/ast.nim(13, 41) Warning: imported and not used: 'strutils' [UnusedImport]
2022-07-28T11:12:09.4188892Z /tmp/nimble_20270/githubcom_nimlangc2nim_#head/compiler/ast.nim(13, 55) Warning: imported and not used: 'sha1' [UnusedImport]
2022-07-28T11:12:09.4189688Z /tmp/nimble_20270/githubcom_nimlangc2nim_#head/compiler/ast.nim(13, 22) Warning: imported and not used: 'nversion' [UnusedImport]
2022-07-28T11:12:09.4190486Z /tmp/nimble_20270/githubcom_nimlangc2nim_#head/compiler/ast.nim(13, 32) Warning: imported and not used: 'options' [UnusedImport]
2022-07-28T11:12:09.4191223Z /tmp/nimble_20270/githubcom_nimlangc2nim_#head/compiler/msgs.nim(190, 3) Error: undeclared identifier: 'shallowCopy'
2022-07-28T11:12:09.4191761Z candidates (edit distance, scope distance); see '--spellSuggest': 
2022-07-28T11:12:09.4192264Z  (4, 4): 'shallow' [proc declared in /home/runner/work/Nim/Nim/lib/system.nim(2799, 6)]
2022-07-28T11:12:09.4192788Z  (4, 4): 'shallow' [proc declared in /home/runner/work/Nim/Nim/lib/system.nim(2809, 6)]
2022-07-28T11:12:09.4193277Z        Tip: 9 messages have been suppressed, use --verbose to show them.
2022-07-28T11:12:09.4193601Z      Error: Build failed for package: c2nim
2022-07-28T11:12:09.4193897Z         ... Execution failed with exit code 1
2022-07-28T11:12:09.4194754Z         ... Command: /home/runner/work/Nim/Nim/bin/nim c --colors:on --noNimblePath -d:release -d:NimblePkgVersion=0.9.18 --hints:off -o:'/tmp/nimble_20270/githubcom_nimlangc2nim_#head/c2nim' '/tmp/nimble_20270/githubcom_nimlangc2nim_#head/c2nim.nim'