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 currentSourcePath #10477

Closed
kaushalmodi opened this issue Jan 28, 2019 · 3 comments · Fixed by #12565
Labels
Documentation Content Related to documentation content (not generation).

Comments

@kaushalmodi
Copy link
Contributor

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

@andreaferretti andreaferretti added the Documentation Content Related to documentation content (not generation). label Jan 28, 2019
@timotheecour
Copy link
Member

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)

@narimiran
Copy link
Member

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.

@kaushalmodi any news on this? Did you send a PR but didn't reference this issue?

@kaushalmodi
Copy link
Contributor Author

@narimiran No, this fell down the sideways.. I'll find some time this week to submit that PR and close this issue. Thanks for the reminder.

I'll be porting stuff from https://scripter.co/notes/nim/#fetching-various-paths in some manual-friendly way.

@kaushalmodi kaushalmodi changed the title Update docs to better distinguish among getCurrentDir, getProjectPath and currentSourceDir Update docs to better distinguish among getCurrentDir, getProjectPath and currentSourcePath Oct 31, 2019
kaushalmodi added a commit to kaushalmodi/Nim that referenced this issue Oct 31, 2019
kaushalmodi added a commit to kaushalmodi/Nim that referenced this issue Oct 31, 2019
kaushalmodi added a commit to kaushalmodi/Nim that referenced this issue Oct 31, 2019
narimiran pushed a commit that referenced this issue Oct 31, 2019
narimiran pushed a commit to narimiran/Nim that referenced this issue Nov 5, 2019
…rrentDir and currentSourcePath (nim-lang#12565)

Fixes nim-lang#10477.

(cherry picked from commit d914e9a)
kiyolee pushed a commit to kiyolee/nim that referenced this issue Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Content Related to documentation content (not generation).
Projects
None yet
4 participants