scrooge
scrooge copied to clipboard
Documentation for sbt-plugin scroogeBuildOptions is out of date
The documentation refers to scroogeBuildOptions
as a Seq[String]
but it is now something related to Seq[ServiceOption]
, see: https://github.com/twitter/scrooge/blob/develop/scrooge-sbt-plugin/src/main/scala/com/twitter/ScroogeSBT.scala#L64
If it possible to add options by creating ServiceOption
s that should be explained too.
Thanks for the report, @dossett. Are you interested in fixing the documentation?
Hi @yufangong I would be happy to, once i figure out how to use the new type. Do you know of any examples of the verbose option being set with the new type?
Thank you and apologize for the out-dated doc. Not sure if this will answer your question, but, we have two ServiceOption
s so far, and both of them have been set as default WithFinagle
and WithAsClosable
.
I find this PR did this change, and it might be helpful to look at it and figure out what we missed in the documentation if you are willing to update the doc.
Thank you! If I'm understanding that PR correctly, adding a verbose option would require creating a new ServiceOption
like case object WithVerbose extends ServiceOption
and then adding logic to Generator.scala
to pass a verbose option to the compiler if WithVerbose
is present?
Just to clarify @yufangong what I mean is that it used to be possible to pass the verbose flag to scrooge with:
scroogeBuildOptions in Compile := Seq("--verbose")
But now it does not seem possible to enable that flag at all. A code change, not just a document update, would be required. Something like case object WithVerbose extends ServiceOption
and other code changes to support it. Is that right? If so, I might work on that as well as a documentation update. The verbose
flag has been very helpful in the past.
Thank you again!
@dossett Agreed, couldn't find the verbose option in the plugin. I think what you said above is correct.