Skip to content

Nim compiler doesn't build with -d:debugReorder #20887

@Phytolizer

Description

@Phytolizer

What happened?

I recently encountered a warning about circular dependencies and wanted more info. By reading the compiler
sources, I was able to determine that it needed a rebuild with -d:debugReorder.

However, on trying this, I received an error due to missing std/tables import.

It seems to me that the imports at the top of compiler/reorder.nim used to include tables and now don't.

I will be making a PR shortly to resolve this.

Nim Version

Nim Compiler Version 1.7.3 [Linux: amd64]
Compiled at 2022-11-21
Copyright (c) 2006-2022 by Andreas Rumpf

git hash: 79b25a9
active boot switches: -d:release

Current Standard Output Logs

cmd: ./koch boot -d:release -d:debugReorder --skipUserCfg --skipParentCfg --hints:off
iteration: 1
bin/nim c  --skipUserCfg --skipParentCfg -d:nimKochBootstrap --nimcache:nimcache/r_linux_amd64 -d:release -d:debugReorder --skipUserCfg --skipParentCfg --hints:off --noNimblePath --compileOnly compiler/nim.nim
/home/kyle/code/Nim/lib/system.nim(27, 48) Warning: unknown magic 'ZeroDefault' might crash the compiler [UnknownMagic]
/home/kyle/code/Nim/lib/system.nim(27, 48) Warning: unknown magic 'ZeroDefault' might crash the compiler [UnknownMagic]
/home/kyle/code/Nim/lib/system.nim(2244, 68) Warning: unknown magic 'Finished' might crash the compiler [UnknownMagic]
/home/kyle/code/Nim/compiler/reorder.nim(22, 17) Error: undeclared identifier: 'newTable'
FAILURE

Expected Standard Output Logs

No response

Possible Solution

Add the import std/tables under a when clause.

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions