-
Notifications
You must be signed in to change notification settings - Fork 277
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
ScalaTest deps to toolchain #1110
Conversation
@@ -38,8 +38,51 @@ declare_deps_provider( | |||
`junit_classpath_provider` (deps_id `junit_classpath`) is where classpath required for junit tests | |||
is defined. | |||
|
|||
Toolchain must be registerd in your `WORKSPACE` file: | |||
ScalaTest support can be enabled by configuring a provider with an id `scalatest_classpath`: |
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.
unrelated to this change but this doc seems to suggest that in order to use scalatest I need to configure it. Why doesn't it show the easy defaults way?
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.
Not sure I understood your comment, there are no defaults when setting up custom toolchain
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.
Is docs/testing.md
only about custom testing toolchains?
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.
Probably not, but I think it requires a lot more effort to rethink/rewrite whole setting up rules scala docs. I think it should be done outside this PR.
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.
My point- configuring custom deps became more complicated (but more powerful and we're ok with it).
If the readme before caused people to think they need to do X to use it now it seems like one needs to do 5X.
Can you please add a note here clarifying that this is needed only for the custom case?
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.
I have reorganized doc and added a note about custom deps
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.
Thanks. I appreciate it
pass | ||
|
||
def scalatest_toolchain(): | ||
native.register_toolchain("//testing:scalatest_toolchain") |
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.
@liucijus Is this supposed to be register_toolchains
?
Added the following in my WORKSPACE file:
load("@io_bazel_rules_scala//testing:scalatest.bzl", "scalatest_toolchain")
scalatest_toolchain()
and it errored out with:
Error: no native function or rule 'register_toolchain'
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.
Thanks for reporting, here's the fix: #1130
* Add scalatest deps to testing toolchain * Update testing docs, toolchain and repository loading * Fix aspect test * Add testing toolchain to version tests WORKSPACE * Update testing toolchain docs
ScalaTest deps on toolchain, part of #940