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

nimsuggest doesn't work unless compiled with -d:danger #11482

Closed
alaviss opened this issue Jun 12, 2019 · 0 comments

Comments

@alaviss
Copy link
Contributor

commented Jun 12, 2019

Example

$ touch empty.nim
$ nimsuggest empty.nim
Hint: used config file '/etc/nim/nim.cfg' [Conf]
usage: sug|con|def|use|dus|chk|mod|highlight|outline|known file.nim[;dirtyfile.nim]:line:col
type 'quit' to quit
type 'debug' to toggle debug mode on/off
type 'terse' to toggle terse mode on/off
> highlight # or any other command listed above

Current Output

/<redacted>/lib/system/fatal.nim(48) sysFatal
Error: unhandled exception: value out of range: -1 [RangeError]

Additional Information

$ nimsuggest -v
Nim Compiler Version 0.20.99 [Linux: amd64]
Compiled at 2019-06-11
Copyright (c) 2006-2019 by Andreas Rumpf

git hash: c7e1c665a1d399272bef35395a6c364b9f98d64a
active boot switches: -d:release --gc:markAndSweep

narimiran added a commit to narimiran/Nim that referenced this issue Jun 17, 2019

[bugfix] fix nim-lang#11482, fix nimsuggest range error
The default starting parameters for `line` and `col` were switched.

See line 141: "line starts at 1, column at 0, dirtyfile is optional".
Also, in `TLineInfo` object, `line` is uint16, `col` is int16.

@Araq Araq closed this in 6cad5c7 Jun 17, 2019

narimiran added a commit that referenced this issue Jun 20, 2019

[bugfix] fix #11482, fix nimsuggest range error (#11519)
The default starting parameters for `line` and `col` were switched.

See line 141: "line starts at 1, column at 0, dirtyfile is optional".
Also, in `TLineInfo` object, `line` is uint16, `col` is int16.

(cherry picked from commit 6cad5c7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.