From cb6ba6f43ab49a1c29ae0f933b9f60c105709201 Mon Sep 17 00:00:00 2001 From: Long Cao <48221800+long-stripe@users.noreply.github.com> Date: Wed, 8 May 2019 13:47:34 -0700 Subject: [PATCH] Docs reorganization (#742) * split out rule docs into separate files in docs/, minor doc fixups along the way * make Rules section in README.md a regular Markdown list with links to docs * move Overview first and freshen it up a bit * inline scala-lang.org link, (https) --- README.md | 599 +--------------------------------- docs/scala_binary.md | 167 ++++++++++ docs/scala_library.md | 176 ++++++++++ docs/scala_library_suite.md | 9 + docs/scala_macro_library.md | 177 ++++++++++ docs/scala_repl.md | 25 ++ docs/scala_test.md | 28 ++ docs/scala_test_suite.md | 7 + docs/scala_toolchain.md | 48 +++ docs/scalapb_proto_library.md | 88 +++++ docs/thrift_library.md | 73 +++++ 11 files changed, 815 insertions(+), 582 deletions(-) create mode 100644 docs/scala_binary.md create mode 100644 docs/scala_library.md create mode 100644 docs/scala_library_suite.md create mode 100644 docs/scala_macro_library.md create mode 100644 docs/scala_repl.md create mode 100644 docs/scala_test.md create mode 100644 docs/scala_test_suite.md create mode 100644 docs/scala_toolchain.md create mode 100644 docs/scalapb_proto_library.md create mode 100644 docs/thrift_library.md diff --git a/README.md b/README.md index cfb5cf954..bee7206b2 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,25 @@ # Scala Rules for Bazel [![Build Status](https://travis-ci.org/bazelbuild/rules_scala.svg?branch=master)](https://travis-ci.org/bazelbuild/rules_scala) [![Build status](https://badge.buildkite.com/90ce5244556df74db805a3c24a703fb87458396f9e1ddd687e.svg)](https://buildkite.com/bazel/scala-rules-scala-postsubmit) [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/bazelbuild_rules_scala/Lobby) -
Attributes | -|
---|---|
name |
-
-
A unique name for this target - |
- srcs |
-
-
List of Scala |
-
-
deps |
-
-
List of other libraries to linked to this library target. - These must be jvm targets (scala_library, java_library, java_import, etc...) - |
-
runtime_deps |
-
-
List of other libraries to put on the classpath only at runtime. This is rarely needed in Scala. - These must be jvm targets (scala_library, java_library, java_import, etc...) - |
-
exports |
-
-
List of targets to add to the dependencies of those that depend on this target. Similar - to the `java_library` parameter of the same name. Use this sparingly as it weakens the - precision of the build graph. - These must be jvm targets (scala_library, java_library, java_import, etc...) - |
-
data |
-
-
List of files needed by this rule at runtime. - |
-
main_class |
-
-
Name of class with main() method to use as an entry point -
- The value of this attribute is a class name, not a source file. The
- class must be available at runtime: it may be compiled by this rule
- (from |
-
resources |
-
-
A list of data files to be included in the JAR. - |
-
resource_strip_prefix |
-
-
- The path prefix to strip from Java resources. If specified, - this path prefix is stripped from every file in the `resources` attribute. - It is an error for a resource file not to be under this directory. - - |
-
scalacopts |
-
-
- Extra compiler options for this library to be passed to scalac. Subject to - Make variable - substitution and - Bourne shell tokenization. - - |
-
jvm_flags |
-
-
- Deprecated, superseded by scalac_jvm_flags and javac_jvm_flags. Is not used and is kept as backwards compatibility for the near future. Effectively jvm_flags is now an executable target attribute only. - - |
-
scalac_jvm_flags |
-
-
- List of JVM flags to be passed to scalac after the
- |
-
javac_jvm_flags |
-
-
- List of JVM flags to be passed to javac after the
- |
-
unused_dependency_checker_mode |
-
-
- Enable unused dependency checking (see Unused dependency checking).
- Possible values are: |
-
Attributes | -|
---|---|
name |
-
-
A unique name for this target - |
- srcs |
-
-
List of Scala |
-
-
deps |
-
-
List of other libraries to linked to this binary target. - These must be jvm targets (scala_library, java_library, java_import, etc...) - |
-
runtime_deps |
-
-
List of other libraries to put on the classpath only at runtime. This is rarely needed in Scala. - These must be jvm targets (scala_library, java_library, java_import, etc...) - |
-
data |
-
-
List of files needed by this rule at runtime. - |
-
main_class |
-
-
Name of class with main() method to use as an entry point -
- The value of this attribute is a class name, not a source file. The
- class must be available at runtime: it may be compiled by this rule
- (from |
-
resources |
-
-
A list of data files to be included in the JAR. - |
-
resource_strip_prefix |
-
-
- The path prefix to strip from Java resources. If specified, - this path prefix is stripped from every file in the `resources` attribute. - It is an error for a resource file not to be under this directory. - - |
-
scalacopts |
-
-
- Extra compiler options for this binary to be passed to scalac. Subject to - Make variable - substitution and - Bourne shell tokenization. - - |
-
jvm_flags |
-
-
- List of JVM flags to be passed to the executing JVM. Subject to - Make variable - substitution and - Bourne shell tokenization. - - |
-
scalac_jvm_flags |
-
-
- List of JVM flags to be passed to scalac after the
- |
-
javac_jvm_flags |
-
-
- List of JVM flags to be passed to javac after the
- |
-
unused_dependency_checker_mode |
-
-
- Enable unused dependency checking (see Unused dependency checking).
- Possible values are: |
-
Attributes | -|
---|---|
name |
-
-
A unique name for this target - |
- srcs |
-
-
List of Thrift |
-
-
deps |
-
-
List of other thrift dependencies that this thrift depends on. Also can include `scroogle_scala_import` - targets, containing additional `thrift_jars` (which will be compiled) and/or `scala_jars` needed at compile time (such as Finagle). - |
-
absolute_prefix |
-
-
This string acts as a wildcard expression of the form *`string_value` that is removed from the start of the path. - Example: thrift is at `a/b/c/d/e/A.thrift` , prefix of `b/c/d`. Will mean other thrift targets can refer to this thrift - at `e/A.thrift`. - - |
-
absolute_prefixes |
-
-
Each of these strings acts as a wildcard expression of the form |
-
Attributes | -|
---|---|
name |
-
-
A unique name for this target - |
-
deps |
-
-
List of dependencies for this target. Must either be of type |
-
with_grpc |
-
-
Enables generation of grpc service bindings for services defined in |
-
with_java |
-
-
Enables generation of converters to and from java protobuf bindings. If you set this to |
-
with_flat_package |
-
-
When true, ScalaPB will not append the protofile base name to the package name - |
-
with_single_line_to_string |
-
-
Enables generation of |
-
scalac_jvm_flags |
-
-
List of JVM flags to pass to the underlying |
-
Attributes | +|
---|---|
name |
+
+
A unique name for this target + |
+ srcs |
+
+
List of Scala |
+
+
deps |
+
+
List of other libraries to linked to this binary target. + These must be jvm targets (scala_library, java_library, java_import, etc...) + |
+
runtime_deps |
+
+
List of other libraries to put on the classpath only at runtime. This is rarely needed in Scala. + These must be jvm targets (scala_library, java_library, java_import, etc...) + |
+
data |
+
+
List of files needed by this rule at runtime. + |
+
main_class |
+
+
Name of class with main() method to use as an entry point +
+ The value of this attribute is a class name, not a source file. The
+ class must be available at runtime: it may be compiled by this rule
+ (from |
+
resources |
+
+
A list of data files to be included in the JAR. + |
+
resource_strip_prefix |
+
+
+ The path prefix to strip from Java resources. If specified, + this path prefix is stripped from every file in the `resources` attribute. + It is an error for a resource file not to be under this directory. + + |
+
scalacopts |
+
+
+ Extra compiler options for this binary to be passed to scalac. Subject to + Make variable + substitution and + Bourne shell tokenization. + + |
+
jvm_flags |
+
+
+ List of JVM flags to be passed to the executing JVM. Subject to + Make variable + substitution and + Bourne shell tokenization. + + |
+
scalac_jvm_flags |
+
+
+ List of JVM flags to be passed to scalac after the
+ |
+
javac_jvm_flags |
+
+
+ List of JVM flags to be passed to javac after the
+ |
+
unused_dependency_checker_mode |
+
+
+ Enable unused dependency checking (see Unused dependency checking).
+ Possible values are: |
+
Attributes | +|
---|---|
name |
+
+
A unique name for this target + |
+ srcs |
+
+
List of Scala |
+
+
deps |
+
+
List of other libraries to linked to this library target. + These must be jvm targets (scala_library, java_library, java_import, etc...) + |
+
runtime_deps |
+
+
List of other libraries to put on the classpath only at runtime. This is rarely needed in Scala. + These must be jvm targets (scala_library, java_library, java_import, etc...) + |
+
exports |
+
+
List of targets to add to the dependencies of those that depend on this target. Similar + to the `java_library` parameter of the same name. Use this sparingly as it weakens the + precision of the build graph. + These must be jvm targets (scala_library, java_library, java_import, etc...) + |
+
data |
+
+
List of files needed by this rule at runtime. + |
+
main_class |
+
+
Name of class with main() method to use as an entry point +
+ The value of this attribute is a class name, not a source file. The
+ class must be available at runtime: it may be compiled by this rule
+ (from |
+
resources |
+
+
A list of data files to be included in the JAR. + |
+
resource_strip_prefix |
+
+
+ The path prefix to strip from Java resources. If specified, + this path prefix is stripped from every file in the `resources` attribute. + It is an error for a resource file not to be under this directory. + + |
+
scalacopts |
+
+
+ Extra compiler options for this library to be passed to scalac. Subject to + Make variable + substitution and + Bourne shell tokenization. + + |
+
jvm_flags |
+
+
+ Deprecated, superseded by scalac_jvm_flags and javac_jvm_flags. Is not used and is kept as backwards compatibility for the near future. Effectively jvm_flags is now an executable target attribute only. + + |
+
scalac_jvm_flags |
+
+
+ List of JVM flags to be passed to scalac after the
+ |
+
javac_jvm_flags |
+
+
+ List of JVM flags to be passed to javac after the
+ |
+
unused_dependency_checker_mode |
+
+
+ Enable unused dependency checking (see Unused dependency checking).
+ Possible values are: |
+
Attributes | +|
---|---|
name |
+
+
A unique name for this target + |
+ srcs |
+
+
List of Scala |
+
+
deps |
+
+
List of other libraries to linked to this library target. + These must be jvm targets (scala_library, java_library, java_import, etc...) + |
+
runtime_deps |
+
+
List of other libraries to put on the classpath only at runtime. This is rarely needed in Scala. + These must be jvm targets (scala_library, java_library, java_import, etc...) + |
+
exports |
+
+
List of targets to add to the dependencies of those that depend on this target. Similar + to the `java_library` parameter of the same name. Use this sparingly as it weakens the + precision of the build graph. + These must be jvm targets (scala_library, java_library, java_import, etc...) + |
+
data |
+
+
List of files needed by this rule at runtime. + |
+
main_class |
+
+
Name of class with main() method to use as an entry point +
+ The value of this attribute is a class name, not a source file. The
+ class must be available at runtime: it may be compiled by this rule
+ (from |
+
resources |
+
+
A list of data files to be included in the JAR. + |
+
resource_strip_prefix |
+
+
+ The path prefix to strip from Java resources. If specified, + this path prefix is stripped from every file in the `resources` attribute. + It is an error for a resource file not to be under this directory. + + |
+
scalacopts |
+
+
+ Extra compiler options for this library to be passed to scalac. Subject to + Make variable + substitution and + Bourne shell tokenization. + + |
+
jvm_flags |
+
+
+ Deprecated, superseded by scalac_jvm_flags and javac_jvm_flags. Is not used and is kept as backwards compatibility for the near future. Effectively jvm_flags is now an executable target attribute only. + + |
+
scalac_jvm_flags |
+
+
+ List of JVM flags to be passed to scalac after the
+ |
+
javac_jvm_flags |
+
+
+ List of JVM flags to be passed to javac after the
+ |
+
unused_dependency_checker_mode |
+
+
+ Enable unused dependency checking (see Unused dependency checking).
+ Possible values are: |
+
Attributes | +|
---|---|
name |
+
+
A unique name for this target + |
+
deps |
+
+
List of dependencies for this target. Must either be of type |
+
with_grpc |
+
+
Enables generation of grpc service bindings for services defined in |
+
with_java |
+
+
Enables generation of converters to and from java protobuf bindings. If you set this to |
+
with_flat_package |
+
+
When true, ScalaPB will not append the protofile base name to the package name + |
+
with_single_line_to_string |
+
+
Enables generation of |
+
scalac_jvm_flags |
+
+
List of JVM flags to pass to the underlying |
+
Attributes | +|
---|---|
name |
+
+
A unique name for this target + |
+ srcs |
+
+
List of Thrift |
+
+
deps |
+
+
List of other thrift dependencies that this thrift depends on. Also can include `scroogle_scala_import` + targets, containing additional `thrift_jars` (which will be compiled) and/or `scala_jars` needed at compile time (such as Finagle). + |
+
absolute_prefix |
+
+
This string acts as a wildcard expression of the form *`string_value` that is removed from the start of the path. + Example: thrift is at `a/b/c/d/e/A.thrift` , prefix of `b/c/d`. Will mean other thrift targets can refer to this thrift + at `e/A.thrift`. + + |
+
absolute_prefixes |
+
+
Each of these strings acts as a wildcard expression of the form |
+