-
Notifications
You must be signed in to change notification settings - Fork 257
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
Let target be an argument instead of an option for translate #3239
Let target be an argument instead of an option for translate #3239
Conversation
The --compile-verbose option would be better named --translate-verbose or even just --verbose |
…ummer/dafny into targetAsArgumentForTranslate2
Am I right in understanding that this change is just envisioned for |
That's right! |
Could you please add as a follow-up PR an element in docs/dev/* so that we can announce to the world this breaking change? Even if you believe no one actually relied on this command before, we need to announce it. Also, when we will have project files, the language option should be optional as I believe will be possible to provide it directly in the project file. |
Sure: #3253 |
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 text under "New Help" still lists --compile-verbose
…ang#3239) ### Changes Changes the `--target` option for `dafny translate` into a `<language>` argument, so that users don't accidentally run `dafny translate` with a target they didn't want. Since there are many targets and only one is correct, accepting a default target likely wastes users's time by letting them wait for `dafny translate` to finish, inspecting the results, and then discovering it was translated to the wrong language and they should probably look at the options. ### Data New help: ``` Description: Translate Dafny sources to source and build files in a specified language. Usage: Dafny translate <language> [<file>...] [options] Arguments: <language> cs - Translate to C#. go - Translate to Go. js - Translate to JavaScript. java - Translate to Java. py - Translate to Python. cpp - Translate to C++. Note that the C++ backend has various limitations (see Docs/Compilation/Cpp.md). This includes lack of support for BigIntegers (aka int), most higher order functions, and advanced features like traits or co-inductive types. <file> input files Options: -o, --output <file> Specify the filename and location for the generated target language files. --compile-verbose Print information such as files being written by the compiler to the console --include-runtime Include the Dafny runtime as source in the target language. ... ``` Old help: ``` Description: Generate source and build files in a specified target language. Usage: Dafny translate [<file>...] [options] Arguments: <file> input files Options: -o, --output <file> Specify the filename and location for the generated target language files. --compile-verbose Print information such as files being written by the compiler to the console --include-runtime Include the Dafny runtime as source in the target language. -t, --target <language> cs - Compile to .NET via C#. go - Compile to Go. js - Compile to JavaScript. java - Compile to Java. py - Compile to Python. cpp - Compile to C++. ... ``` <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
Changes
Changes the
--target
option fordafny translate
into a<language>
argument, so that users don't accidentally rundafny translate
with a target they didn't want. Since there are many targets and only one is correct, accepting a default target likely wastes user's time by letting them wait fordafny translate
to finish, inspecting the results, and then discovering it was translated to the wrong language and they should probably look at the options.Rename
--compile-verbose
to--verbose
Data
New help:
Old help:
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.