scrooge icon indicating copy to clipboard operation
scrooge copied to clipboard

Documentation for sbt-plugin scroogeBuildOptions is out of date

Open dossett opened this issue 7 years ago • 6 comments

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 ServiceOptions that should be explained too.

dossett avatar Feb 14 '18 20:02 dossett

Thanks for the report, @dossett. Are you interested in fixing the documentation?

yufangong avatar Feb 14 '18 21:02 yufangong

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?

dossett avatar Feb 14 '18 23:02 dossett

Thank you and apologize for the out-dated doc. Not sure if this will answer your question, but, we have two ServiceOptions 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.

yufangong avatar Feb 15 '18 01:02 yufangong

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?

dossett avatar Feb 15 '18 02:02 dossett

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 avatar Feb 15 '18 14:02 dossett

@dossett Agreed, couldn't find the verbose option in the plugin. I think what you said above is correct.

yufangong avatar Feb 15 '18 19:02 yufangong