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

deprecated jvm_flags not reflected in scala_library_suite or scala_test_suite #621

Closed
aherrmann opened this issue Sep 27, 2018 · 6 comments · Fixed by #622
Closed

deprecated jvm_flags not reflected in scala_library_suite or scala_test_suite #621

aherrmann opened this issue Sep 27, 2018 · 6 comments · Fixed by #622

Comments

@aherrmann
Copy link
Contributor

The README marks the jvm_flags attribute to scala_library and scala_test as deprecated. But, the corresponding scala_library_suite and scala_test_suite macros don't reflect this deprecation, as they only accept the jvm_flags attribute.

@ittaiz
Copy link
Member

ittaiz commented Sep 27, 2018 via email

@aherrmann
Copy link
Contributor Author

@ittaiz No, e.g. passing scalac_jvm_flags to scala_library_suite causes the following error:

unexpected keyword 'scalac_jvm_flags' in call to scala_library_suite

However, passing that attribute to scala_library does not cause an error.

@ittaiz
Copy link
Member

ittaiz commented Sep 28, 2018 via email

@aherrmann
Copy link
Contributor Author

The plugins attribute is not passed on either. A kwargs dict seems like a good way to cover all these.

@ittaiz
Copy link
Member

ittaiz commented Sep 28, 2018 via email

@johnynek
Copy link
Member

I think it was just an oversight that we didn’t plumb them through. A PR with a test would be great.

aherrmann added a commit to aherrmann/rules_scala that referenced this issue Oct 1, 2018
From `scala_library_suite` to `scala_library`, and
from `scala_test_suite` to `scala_test`.

closes bazelbuild#621
aherrmann added a commit to aherrmann/rules_scala that referenced this issue Oct 1, 2018
aherrmann added a commit to aherrmann/rules_scala that referenced this issue Oct 17, 2018
From `scala_library_suite` to `scala_library`, and
from `scala_test_suite` to `scala_test`.

closes bazelbuild#621
aherrmann added a commit to aherrmann/rules_scala that referenced this issue Oct 17, 2018
aherrmann added a commit to aherrmann/rules_scala that referenced this issue Oct 30, 2018
From `scala_library_suite` to `scala_library`, and
from `scala_test_suite` to `scala_test`.

closes bazelbuild#621
aherrmann added a commit to aherrmann/rules_scala that referenced this issue Oct 30, 2018
ittaiz pushed a commit that referenced this issue Oct 30, 2018
* Forward **kwargs

From `scala_library_suite` to `scala_library`, and
from `scala_test_suite` to `scala_test`.

closes #621

* Add regression test for #621

* Disable linting

See #622 (comment)

* Remove manually forwarded arguments

These are now forwarded as part of the kwargs argument.
Additionally, the data argument is now forwarded to scala_test_suite,
instead of being quietly ignored as it was before.
This addresses the following comment
#627 (comment)

An additional advantage is that attribute defaults don't have to be kept
in sync between the *_suite and non-suite rules/macros.

closes #627

* Regression test for data attr in scala_test_suite

Modifies the TestSuitePassesKwArgs test-case to test that the data
attribute is passed through by scala_test_suite. This is a stronger
test-case since it doesn't just test that attributes like data,
jvm_flags, and scalac_jvm_flags are accepted by scala_test_suite. But,
it also tests that data and jvm_flags are actually passed through to
scala_test. The test-case tries to read from the file defined in these
attributes.

* Rename test targets

Addressing the following comment
#622 (review)
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 a pull request may close this issue.

3 participants