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 doesn't use default nimdoc.cfg with config.nims in XDG_CONFIG_HOME #9450

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

Comments

@kaushalmodi
Copy link
Contributor

Since past few days I have started using ~/.config/nim/config.nims and today I see another unexpected impact of that (first one being #9420).

When running nim doc, it now doesn't seem to look at the default nimdoc.cfg that gets installed with Nim.

Example

Place a config.nims in ~/,config/nim/ dir, and run nim doc on any Nim file.

Current Output

With config.nims in place, the nim-default nimdoc.cfg is not read. I see below on doing nim doc foo.nim:

Hint: used config file '/home/kmodi/stow/pkgs/nim/devel/config/nim.cfg' [Conf]
Hint: used config file '/home/kmodi/.config/nim/config.nims' [Conf]
Hint: system [Processing]
...

If I remove that config.nims, running nim doc foo.nim shows:

Hint: used config file '/home/kmodi/stow/pkgs/nim/devel/config/nim.cfg' [Conf]
Hint: used config file '/home/kmodi/stow/pkgs/nim/devel/config/nimdoc.cfg' [Conf]
Hint: system [Processing]
...

Expected Output

I was expecting to see this instead:

Hint: used config file '/home/kmodi/stow/pkgs/nim/devel/config/nim.cfg' [Conf]
Hint: used config file '/home/kmodi/stow/pkgs/nim/devel/config/nimdoc.cfg' [Conf]
Hint: used config file '/home/kmodi/.config/nim/config.nims' [Conf]
Hint: system [Processing]
...

Additional Information

Nim version:

Nim Compiler Version 0.19.1 [Linux: amd64]
Compiled at 2018-10-19
Copyright (c) 2006-2018 by Andreas Rumpf

git hash: cd9bc941e1315f47efd1ec567249a16347c0319a
active boot switches: -d:release

Probably related: #9405

@mratsim mratsim added the Documentation Content Related to documentation content (not generation). label Oct 20, 2018
@krux02 krux02 added Documentation Generation Related to documentation generation (but not content). and removed Documentation Content Related to documentation content (not generation). labels Oct 20, 2018
@narimiran
Copy link
Member

I've tried this on Nim 1.3.5, and it seems it works correctly now, or at least I couldn't reproduce it.

@kaushalmodi
Copy link
Contributor Author

It works.. though now it's making 1 pass of nimdoc.cfg and 2 passes of all the other configs:

Hint: used config file '/home/kmodi/usr_local/apps/7/nim/devel/config/nim.cfg' [Conf]
Hint: used config file '/home/kmodi/usr_local/apps/7/nim/devel/config/config.nims' [Conf]
Hint: used config file '/home/kmodi/.config/nim/config.nims' [Conf]
Hint: used config file '/home/kmodi/usr_local/apps/7/nim/devel/config/nimdoc.cfg' [Conf]
Hint: used config file '/home/kmodi/usr_local/apps/7/nim/devel/config/nim.cfg' [Conf]
Hint: used config file '/home/kmodi/usr_local/apps/7/nim/devel/config/config.nims' [Conf]
Hint: used config file '/home/kmodi/.config/nim/config.nims' [Conf]

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

4 participants