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

Update docs to better distinguish among getCurrentDir, getProjectPath and currentSourceDir #10477

Open
kaushalmodi opened this Issue Jan 28, 2019 · 1 comment

Comments

Projects
None yet
3 participants
@kaushalmodi
Copy link
Contributor

commented Jan 28, 2019

Summary

Update docs so that the different "current path" procs are not confused among each other.

Description

I'll send a PR to attempt the fix the docs for those 3 procs/templates and also point the user to the other 2 procs from each proc doc-string.

.. and with examples.

Additional Information

@timotheecour

This comment has been minimized.

Copy link
Contributor

commented Jan 30, 2019

I'll send a PR to attempt the fix the docs for those 3 procs/templates

just make sure its DRY (ie please don't copy paste that description in all 3 places); hopefully that was your intention indeed; wasn't sure;

i don't like when docs do that, it immediately triggers the search for whether there's a subtle difference in the 2 descriptions, eg:
this snippet which is repeated twice:
https://nim-lang.github.io/Nim/system.html#int-max_1

Note that the sequence will be filled with zeroed entries, which can be a problem for sequences containing strings since their value will be nil. After the creation of the sequence you should assign entries to the sequence instead of adding them. Example:

image

(i don't know whether it's good to remind also in that description that paths (eg import "."/foo/bar) are relative to the file doing the import)

(ditto with the subtle gorgeEx that sets workingDir to file where gorgeEx is called, although that should probably left out of your description)

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.