-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support -v / --version in ch
binary
#2472
Comments
Duplicate of #109 |
Whoops, apologies! My GitHub issue-searching skills are lacking… |
@mathiasbynens - Note that |
@dilijev Not in release mode builds, it seems:
Anyway, I meant to say that |
@mathiasbynens That's correct, we don't support any flags in release builds. That decision is because of configuration flags but run-mode flags like printing help or version info should probably be supported in release builds. Thanks for reminding that any change in this area should enable those flags for release builds as well. |
Also note the surprising parameter |
Partially addresses chakra-core#109 and chakra-core#2472 ``` ch /v ch /version ch -v ch --v ch -version ch --version ``` The above all display the version in a simple `<major>.<minor>.<patch>` format, e.g.: ``` 1.4.1 ``` This flag is available in all flavors (including Release).
…t in chakra-core#2472. Enables `-h` and `-help` for non-release builds, and `-?`, `-h`, and `-help` for release builds. Messages will look as follows. debug/test builds: ``` Usage: ch.exe [-v|-version] [-h|-help] [-?] [flaglist] <source file> -v|-version Displays version info -h|-help Displays this help message -? Displays this help message with complete [flaglist] info ``` release builds: ``` Usage: ch.exe [-v|-version] [-h|-help|-?] <source file> Note: [flaglist] is not supported in Release builds; try a Debug or Test build to enable these flags. -v|-version Displays version info -h|-help|-? Displays this help message ``` The distinction is that `-?` is already implemented in debug/test builds to display full information about the `[flaglist]` options. This is a minimal change here that will result in guiding the user more accurately in all build flavors, the effect of which is that `-?` in debug/test builds is still the only way to get information about the `[flaglist]` options.
…raCore version. Merge pull request #2490 from dilijev:version-r14 Partially addresses #109 and #2472. This is intended as a first pass at the issue to provide some information at this point. Later, we plan to add more information such as whether a binary was produced as a developer build or an official build, what specific commit the binary was built from, which branch, which machine, etc. The specific set of information that we plan to provide is still being discussed in #109. ``` ch /v ch /version ch -v ch --v ch -version ch --version ``` (Supporting `-` and `--` prefixes for short and long flag names is consistent with how we process all behaviors. The logic I used here is a replica of that in `CmdLineArgsParser::Parse`.) The above all display the version information for `ch` and `ChakraCore` as `<major>.<minor>.<patch>.<QFE>` (note: by convention, ChakraCore's `QFE` is always `0`). For example on Windows for ChakraCore 1.4.1 with `ch.exe` and `ChakraCore.dll` from the same build: ``` $ ch -v ch.exe version 1.4.1.0 chakracore.dll version 1.4.1.0 ``` If with the same `ch.exe`, if `ChakraCore.dll` was from, e.g., a 2.0.0 build: ``` $ ch -v ch.exe version 1.4.1.0 chakracore.dll version 2.0.0.0 ``` On Linux: ``` ~/dev/ChakraCore$ ./BuildLinux/Release/ch -v ch version 1.4.1.0 ``` This flag is available in all flavors (including Release). --- Updating the help message. Also enable `-h` and `-help` as per request in #2472. Enables `-h` and `-help` for non-release builds, and `-?`, `-h`, and `-help` for release builds. Messages will look as follows. debug/test builds: ``` Usage: ch.exe [-v|-version] [-h|-help] [-?] [flaglist] <source file> -v|-version Displays version info -h|-help Displays this help message -? Displays this help message with complete [flaglist] info ``` release builds: ``` Usage: ch.exe [-v|-version] [-h|-help|-?] <source file> Note: [flaglist] is not supported in Release builds; try a Debug or Test build to enable these flags. -v|-version Displays version info -h|-help|-? Displays this help message ``` The distinction is that `-?` is already implemented in debug/test builds to display full information about the `[flaglist]` options. This is a minimal change here that will result in guiding the user more accurately in all build flavors, the effect of which is that `-?` in debug/test builds is still the only way to get information about the `[flaglist]` options.
…to print ChakraCore version. Merge pull request #2490 from dilijev:version-r14 Partially addresses #109 and #2472. This is intended as a first pass at the issue to provide some information at this point. Later, we plan to add more information such as whether a binary was produced as a developer build or an official build, what specific commit the binary was built from, which branch, which machine, etc. The specific set of information that we plan to provide is still being discussed in #109. ``` ch /v ch /version ch -v ch --v ch -version ch --version ``` (Supporting `-` and `--` prefixes for short and long flag names is consistent with how we process all behaviors. The logic I used here is a replica of that in `CmdLineArgsParser::Parse`.) The above all display the version information for `ch` and `ChakraCore` as `<major>.<minor>.<patch>.<QFE>` (note: by convention, ChakraCore's `QFE` is always `0`). For example on Windows for ChakraCore 1.4.1 with `ch.exe` and `ChakraCore.dll` from the same build: ``` $ ch -v ch.exe version 1.4.1.0 chakracore.dll version 1.4.1.0 ``` If with the same `ch.exe`, if `ChakraCore.dll` was from, e.g., a 2.0.0 build: ``` $ ch -v ch.exe version 1.4.1.0 chakracore.dll version 2.0.0.0 ``` On Linux: ``` ~/dev/ChakraCore$ ./BuildLinux/Release/ch -v ch version 1.4.1.0 ``` This flag is available in all flavors (including Release). --- Updating the help message. Also enable `-h` and `-help` as per request in #2472. Enables `-h` and `-help` for non-release builds, and `-?`, `-h`, and `-help` for release builds. Messages will look as follows. debug/test builds: ``` Usage: ch.exe [-v|-version] [-h|-help] [-?] [flaglist] <source file> -v|-version Displays version info -h|-help Displays this help message -? Displays this help message with complete [flaglist] info ``` release builds: ``` Usage: ch.exe [-v|-version] [-h|-help|-?] <source file> Note: [flaglist] is not supported in Release builds; try a Debug or Test build to enable these flags. -v|-version Displays version info -h|-help|-? Displays this help message ``` The distinction is that `-?` is already implemented in debug/test builds to display full information about the `[flaglist]` options. This is a minimal change here that will result in guiding the user more accurately in all build flavors, the effect of which is that `-?` in debug/test builds is still the only way to get information about the `[flaglist]` options.
There is currently no way to figure out the version of a given
ch
binary built in release mode:Please consider making
-v
/--version
(and possibly-h
/--help
) output something useful.The text was updated successfully, but these errors were encountered: