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
Closed

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

kaushalmodi opened this issue Oct 17, 2018 · 4 comments
Labels
Documentation Generation Related to documentation generation (but not content).

Comments

@kaushalmodi
Copy link
Contributor

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
Copy link
Contributor Author

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

@kaushalmodi
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

@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
@krux02 krux02 added the Documentation Generation Related to documentation generation (but not content). label Oct 28, 2018
@Araq Araq reopened this Dec 16, 2018
@Araq Araq closed this as completed in d91d186 Dec 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Generation Related to documentation generation (but not content).
Projects
None yet
Development

No branches or pull requests

3 participants