-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Move command line parameter code #20946
Conversation
I like the idea but there is no deliberation on this that I know of.
Would be nice to hear your reasoning. Also new modules tend to go in lib/std, not lib/pure. |
When it comes to the module name cmdparam, this was my idea of the name as the module facilitates obtaining och parsing the command line. This can be changed if you have other suggestions. I put cmdparam.nim in lib/pure because os.nim also is located there. I'm not too familiar with the source code structure and what goes where. cmdparam.nim can be moved to lib/std if that's a better location. When it comes to the Just to clarify the background and reason for this change. In order to use command line parameters you need to include the os module and this brings in the whole lot with many functionalities that might not even exist for the particular embedded system. For embedded systems, everything might not be implemented. Instead you can single out the command line functionality from a separate module by "import std/cmdparam". The goal is that you should be able to cherry pick functionality more rather than a big os module monolith. |
The refactoring is great but the module's name should be |
One check was cancelled after 60 minutes. There is not much information why this test failed other than the text.
Any idea what this is about? |
Never mind. The test sometimes fails for unknown reasons. I have restarted it. |
lib/std/cmdline.nim
Outdated
# Nim's Runtime Library | ||
# (c) Copyright 2015 Andreas Rumpf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The copyright year can be updated since it is a new module.
Command line paramater code moved from os.nim to cmdparam.nim
Do we add an extra Also you don't have to bother manually squashing & force pushing every time, it's done when merging anyway |
I tried to keep it clean on my local branch, that's why I used amend commits with force push. I was not sure how smart Github is when it comes to magically remove merge commits and subsequence change commits. |
Yes it's fine if another new module is not part of this PR. |
Thanks for your hard work on this PR! Hint: mm: orc; opt: speed; options: -d:release |
I believe there is a changelog entry missing. |
I think the OS splits will have a change log entry at the end to avoid conflicts |
@IgorDeepakM Nice work! It would be appreciated if you can add it to changelogs following
|
* minor cleanup follow up #20946 * Update lib/std/cmdline.nim * Update lib/std/cmdline.nim Co-authored-by: Clay Sweetser <[email protected]>
=> #21039 |
Command line paramater code moved from os.nim to cmdparam.nim Co-authored-by: IgorDeepakM <[email protected]>
* minor cleanup follow up nim-lang#20946 * Update lib/std/cmdline.nim * Update lib/std/cmdline.nim Co-authored-by: Clay Sweetser <[email protected]>
Command line paramater code moved from os.nim to cmdparam.nim Co-authored-by: IgorDeepakM <[email protected]>
* minor cleanup follow up nim-lang#20946 * Update lib/std/cmdline.nim * Update lib/std/cmdline.nim Co-authored-by: Clay Sweetser <[email protected]>
Command line paramater code moved from os.nim to cmdparam.nim Co-authored-by: IgorDeepakM <[email protected]>
* minor cleanup follow up nim-lang#20946 * Update lib/std/cmdline.nim * Update lib/std/cmdline.nim Co-authored-by: Clay Sweetser <[email protected]>
Command line paramater code moved from os.nim to cmdparam.nim