Make parseopt available on all backends (#17009)
* Make parseopt available on all backends * fix spaces * fix getopt and update prelude * no crazy unnecessary version checks, use doAssert
This commit is contained in:
parent
4326f743d0
commit
fad8439b8d
5 changed files with 165 additions and 144 deletions
|
|
@ -147,6 +147,14 @@ provided by the operating system.
|
|||
issues like https://github.com/nim-lang/Nim/issues/13063 (which affected error messages)
|
||||
for modules importing `std/wrapnils`.
|
||||
|
||||
- `parseopt.initOptParser` has been made available and `parseopt` has been
|
||||
added back to `prelude` for all backends. Previously `initOptParser` was
|
||||
unavailable if the `os` module did not have `paramCount` or `paramStr`,
|
||||
but the use of these in `initOptParser` were conditionally to the runtime
|
||||
arguments passed to it, so `initOptParser` has been changed to raise
|
||||
`ValueError` when the real command line is not available. `parseopt` was
|
||||
previously excluded from `prelude` for JS, as it could not be imported.
|
||||
|
||||
## Language changes
|
||||
|
||||
- `nimscript` now handles `except Exception as e`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue