Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nim doc fail on lib/system/profiler.nim #9420

Closed
kaushalmodi opened this issue Oct 17, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@kaushalmodi
Copy link
Contributor

commented Oct 17, 2018

koch docs fails when compiling nimprof.nim docs.

To reproduce this error, do:

nim doc lib/pure/nimprof.nim

I get:

Hint: used config file '/home/kmodi/stow/pkgs/nim/devel/config/nim.cfg' [Conf]
Hint: used config file '/home/kmodi/downloads/git/Nim/lib/pure/nimprof.nim.cfg' [Conf]
Hint: used config file '/home/kmodi/.config/nim/config.nims' [Conf]
../../../../../stow/pkgs/nim/devel/lib/system/profiler.nim(92, 23) Error: undeclared identifier: 'framePtr'
@kaushalmodi

This comment has been minimized.

Copy link
Contributor Author

commented Oct 17, 2018

Probably related to #8991? May be the profiler was turned on by default recently?

@kaushalmodi

This comment has been minimized.

Copy link
Contributor Author

commented Oct 17, 2018

Or.. probably this is the reason: #4446 (comment)

Failed every time if config.nims file is present in same folder as my nim file to profile.

I now have a config.nims in my ~/.config/nim/config.nims (I did not have that earlier, during my last koch docs)!

But my config.nims is simply defining Nim build and "nim doc" unrelated tasks: https://github.com/kaushalmodi/nim_config/blob/master/config.nims. The only switch it sets is switch("nep1", "on").

@kaushalmodi kaushalmodi changed the title [regression] lib/system/profiler.nim(92, 23) Error: undeclared identifier: 'framePtr' lib/system/profiler.nim(92, 23) Error: undeclared identifier: 'framePtr' *if* config.nims present in search path Oct 17, 2018

@kaushalmodi kaushalmodi changed the title lib/system/profiler.nim(92, 23) Error: undeclared identifier: 'framePtr' *if* config.nims present in search path lib/system/profiler.nim(92, 23) Error: undeclared identifier: 'framePtr' *even if* an empty config.nims is present in search path Oct 18, 2018

@kaushalmodi

This comment has been minimized.

Copy link
Contributor Author

commented Oct 18, 2018

Turns out I get this error even if an empty config.nims is present in ~/.config/nim/ dir.

To reproduce this issue on a unix type system, do:

mkdir -p ~/.config/nim/
touch ~/.config/nim/config.nims # creates empty config.nims
# cd to the nim cloned repo
nim doc lib/pure/nimprof.nim
@kaushalmodi

This comment has been minimized.

Copy link
Contributor Author

commented Oct 18, 2018

@Araq Probably fixing the config file search order (ref: #9405) fixes this?

@krux02 krux02 changed the title lib/system/profiler.nim(92, 23) Error: undeclared identifier: 'framePtr' *even if* an empty config.nims is present in search path nim doc fail on lib/system/profiler.nim Oct 20, 2018

@Araq Araq closed this in #9945 Dec 13, 2018

@Araq Araq reopened this Dec 16, 2018

@Araq Araq closed this in d91d186 Dec 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.