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

Added new command line option --info:X to nimsuggest for obtaining … #22943

Merged

Conversation

nickysn
Copy link
Contributor

@nickysn nickysn commented Nov 15, 2023

…information. (#22940)

--info:protocolVer returns the highest nimsuggest protocol version that is supported (currently, it's version 3).
--info:nimVer returns the Nim compiler version that nimsuggest uses internally.

Note that you can obtain the Nim compiler version via nimsuggest -v, but that requires parsing the output, which looks like this:

Nim Compiler Version 2.1.1 [Linux: amd64]
Compiled at 2023-11-14
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: 47ddfeca5247dce992becd734d1ae44e621207b8
active boot switches: -d:release -d:danger --gc:markAndSweep

--info:nimVer will return just:

2.1.1

(cherry picked from commit d0cc02d)

…information. (nim-lang#22940)

`--info:protocolVer` returns the highest nimsuggest protocol version
that is supported (currently, it's version 3).
`--info:nimVer` returns the Nim compiler version that nimsuggest uses
internally.

Note that you can obtain the Nim compiler version via `nimsuggest -v`,
but that requires parsing the output, which looks like this:

```
Nim Compiler Version 2.1.1 [Linux: amd64]
Compiled at 2023-11-14
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: 47ddfec
active boot switches: -d:release -d:danger --gc:markAndSweep
```

`--info:nimVer` will return just:

```
2.1.1
```

(cherry picked from commit d0cc02d)
@ringabout ringabout merged commit b8cec0c into nim-lang:version-2-0 Nov 16, 2023
Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from b8cec0c

Hint: mm: orc; opt: speed; options: -d:release
168641 lines; 6.758s; 613.039MiB peakmem

@nickysn nickysn deleted the version-2-0-nimsuggest-info-backport branch November 16, 2023 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants