[Compiler Toolchains] Add support for plugins#1795
Open
FrankPortman wants to merge 3 commits intobazel-contrib:masterfrom
Open
[Compiler Toolchains] Add support for plugins#1795FrankPortman wants to merge 3 commits intobazel-contrib:masterfrom
FrankPortman wants to merge 3 commits intobazel-contrib:masterfrom
Conversation
Collaborator
|
@FrankPortman This generally looks OK to me, but in addition to converting the manual tests to test scripts, please look into the test failures from CI and fix those. They all appear to be of the following form, which seems like it should prove easily reproducible locally: ERROR: /workdir/test/toolchain_plugins/BUILD.bazel:33:14:
scala @@//test/toolchain_plugins:requires_plugin failed: (Exit 1):
scalac failed: error executing Scalac command
from target //test/toolchain_plugins:requires_plugin)
bazel-out/.../bin/src/java/io/bazel/rulesscala/scalac/scalac
@bazel-out/.../bin/test/toolchain_plugins/requires_plugin.jar-0.params
--
test/toolchain_plugins/RequiresPlugin.scala:7: error: not found: type *
class RequiresPlugin extends HKT[Either[String, *]]
^
test/toolchain_plugins/RequiresPlugin.scala:7: error: Either[String,<error>] takes no type parameters, expected: one
class RequiresPlugin extends HKT[Either[String, *]]
^
two errors foundAlso, adding newlines to the end of the files that currently don't have them would be lovely. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Right now, you can only supply compiler plugins into
scala_librarytargets. This allows you to set them at the compiler toolchain level, in order for them to apply to every target.Motivation
Sometimes you want to apply your
plugins to your entire monorepo, or apply the plugins broadly based on flags. The current ways to do so would involve "wrapping"scala_libraryand injecting these specifics into it viamacro, which feels regrettable because of how foundational of a concept it is. On the other hand, if you "wrap"scala_libraryand createnew_scala_library, you must then know when/where to use this other version.TODO
pluginsattrTest for now