Skip to content
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 scrooge-generator compiler flags in thrift_library rule #6

Merged
merged 4 commits into from
Nov 26, 2020

Conversation

cattibrie
Copy link
Collaborator

Description and Motivation

Currently passing compiler args to scrooge_generator is not supported in rules_scala.

Add compiler_args argument to thrift_library rule.

Use scopt option parser to parse compiler flags.
The option parsing is copy-pasted from Twitter scrooge-generator.
The copy-pasted code will be removed when the Twitter scrooge-generator version with these changes is released.

Update Compiler with the latest changes in scrooge-generator Compiler.

TODO: add tests that check that compiler_args set on a thrift_library target are used by scrooge-generator.

@cattibrie
Copy link
Collaborator Author

@blorente @wisechengyi
Please, take a look when you have time.

Copy link
Collaborator

@wisechengyi wisechengyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @cattibrie!

@wisechengyi
Copy link
Collaborator

looks like there's some minor formatting issue from travis

�[0m./scala/private/macros/scala_repositories.bzl # reformat
./src/scala/io/bazel/rules_scala/scrooge_support/BUILD # reformat
./twitter_scrooge/BUILD # reformat

otherwise this is good to go.

@blorente blorente merged commit 2931b4c into twitter-forks:master Nov 26, 2020
blorente pushed a commit that referenced this pull request Nov 26, 2020
  * Add option parsing file

  * Add OptionParser

  * Add scopt dependency

  * Lint reformat
blorente pushed a commit that referenced this pull request Feb 22, 2021
  * Add option parsing file

  * Add OptionParser

  * Add scopt dependency

  * Lint reformat
cattibrie added a commit to cattibrie/rules_scala that referenced this pull request Feb 23, 2021
…ter-forks#6)

  * Add option parsing file

  * Add OptionParser

  * Add scopt dependency

  * Lint reformat
cattibrie added a commit to cattibrie/rules_scala that referenced this pull request Mar 8, 2021
…lbuild#1228)

* Support scrooge-generator compiler flags in thrift_library rule (twitter-forks#6)

  * Add option parsing file

  * Add OptionParser

  * Add scopt dependency

  * Lint reformat

* Add option parsing file

* Add scopt dependency

* Lint reformat

* Add test for compiler_args in thrift_library

* Fix lint error

* Remove option parser from rules_scala code

* Add scopt dependency

* Update test and clean code
wisechengyi pushed a commit that referenced this pull request Mar 11, 2021
…lbuild#1228)

* Support scrooge-generator compiler flags in thrift_library rule (#6)

  * Add option parsing file

  * Add OptionParser

  * Add scopt dependency

  * Lint reformat

* Add option parsing file

* Add scopt dependency

* Lint reformat

* Add test for compiler_args in thrift_library

* Fix lint error

* Remove option parser from rules_scala code

* Add scopt dependency

* Update test and clean code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants