-
Notifications
You must be signed in to change notification settings - Fork 69
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 --quiet
option to FsLex and FsYacc.
#199
Conversation
…e output of the generated code to the console. The generated code is still written to the output file.
let example1 = | ||
let e = "E" | ||
let t = "Terminal" | ||
let plus = "+" | ||
let mul = "*" | ||
let f = "F" | ||
let lparen = "(" | ||
let rparen = ")" | ||
let id = "id" | ||
|
||
let terminals = [plus; mul; lparen; rparen; id] | ||
let nonTerminals = [e; t; f] | ||
|
||
let p2 = e, (NonAssoc, ExplicitPrec 1), [NonTerminal e; Terminal plus; NonTerminal t], None | ||
let p3 = e, (NonAssoc, ExplicitPrec 2), [NonTerminal t], None in | ||
let p3 = e, (NonAssoc, ExplicitPrec 2), [NonTerminal t], None in |
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.
Those are either by fantomas or my editor, I can revert if needed.
Same applies for all whitespace changes in files.
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.
As this is in a code comment, this is your editor's doing.
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.
Hmm, I'm on the fence here.
While I have some permissions on this repository, I will let the maintainers decide here.
let example1 = | ||
let e = "E" | ||
let t = "Terminal" | ||
let plus = "+" | ||
let mul = "*" | ||
let f = "F" | ||
let lparen = "(" | ||
let rparen = ")" | ||
let id = "id" | ||
|
||
let terminals = [plus; mul; lparen; rparen; id] | ||
let nonTerminals = [e; t; f] | ||
|
||
let p2 = e, (NonAssoc, ExplicitPrec 1), [NonTerminal e; Terminal plus; NonTerminal t], None | ||
let p3 = e, (NonAssoc, ExplicitPrec 2), [NonTerminal t], None in | ||
let p3 = e, (NonAssoc, ExplicitPrec 2), [NonTerminal t], None in |
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.
As this is in a code comment, this is your editor's doing.
@@ -668,6 +678,6 @@ let writeSpecToFile (generatorState: GeneratorState) (spec: ParserSpec) (compile | |||
generatorState.bufferTypeArgument | |||
ty | |||
|
|||
let compileSpec (spec: ParserSpec) (logger: Logger) = | |||
let compileSpec (spec: ParserSpec) (logger: Logger) quiet = |
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.
Hmm, I would prefer to see logger
changed to Microsoft.Extensions.Logging.Logger
.
The quiet
flag very much feels like a quick win that someone else will need to clean up in the future.
Hello @nojaf , I would like to reopen this and resolve whatever feedback is provided by the maintainers. Before I do it, do you think this has a chance to be expected? |
Hi there, @T-Gro! My initial concern with this proposal is that it feels like a quick-fix solution that would need to be revisited the next time someone wants to fine-tune it. Using something like As I mentioned, I'm not a maintainer; I have some permissions granted by Don to merge items here. For small tweaks and fixes, I use this privilege. In this case, I'm uncertain and would appreciate the maintainers sharing their thoughts. Could you please reach out to @dsyme about this? If he thinks it's harmless, I won't oppose it. |
This option suppresses the output of the generated code to the console. The generated code is still written to the output file.
If anyone has better approach to the issue, please advise. Also, not sure where/how to test it.
I will pick this later to
dotnet/fsharp
's local copies.Update: reasoning is to suppress output when working with compiler, output is useless for 99% of contributors in 99% of cases.