Enables fetching scala library sources (#7464)

* Enables fetching scala library sources

Enables fetch_sources flag for fetching scala sources.
These sources can be used for manual linking scala library if sources are not resolved otherwise

CHANGELOG_BEGIN
CHANGELOG_END

* Apply suggestions from code review

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
This commit is contained in:
Marton Nagy 2020-09-23 17:13:06 +02:00 committed by GitHub
parent 3e09e9b4d9
commit 071f604d6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 9 deletions

View File

@ -300,6 +300,12 @@ Bazel command (`run`, `test`, etc.). If applicable, you can also define Bazel
command-line flags or command-line flags to the executable. Click on "Apply", command-line flags or command-line flags to the executable. Click on "Apply",
or "OK" to add the run configuration. or "OK" to add the run configuration.
#### Attaching sources to scala library
If you do not have the Scala library sources linked (you only see the decompiled
sources), you can attach it manually by selecting the `Choose sources...`
button on the yellow bar at the top, and selecting `scala-library...-src.jar`.
### Known Issues ### Known Issues
#### Missing folders in project tree #### Missing folders in project tree
@ -1006,4 +1012,3 @@ poisoned Nix cache. To clear that run through the following steps:
### Working in environments with low or intermittent connectivity ### Working in environments with low or intermittent connectivity
Bazel tries to leverage the remote cache to speed up the build process but this can turn out to work against you if you are working in an environment with low or intermittent connectivity. To disable fetching from the remote cache in such scenario, you can use the `--noremote_accept_cached` option. Bazel tries to leverage the remote cache to speed up the build process but this can turn out to work against you if you are working in an environment with low or intermittent connectivity. To disable fetching from the remote cache in such scenario, you can use the `--noremote_accept_cached` option.

View File

@ -706,14 +706,17 @@ load(
) )
# note some dependencies in bazel-jvm-deps.bzl (e.g. silencer_plugin) refer to the current scala version: # note some dependencies in bazel-jvm-deps.bzl (e.g. silencer_plugin) refer to the current scala version:
scala_repositories(( scala_repositories(
"2.12.11", (
{ "2.12.11",
"scala_compiler": "e901937dbeeae1715b231a7cfcd547a10d5bbf0dfb9d52d2886eae18b4d62ab6", {
"scala_library": "dbfe77a3fc7a16c0c7cb6cb2b91fecec5438f2803112a744cb1b187926a138be", "scala_compiler": "e901937dbeeae1715b231a7cfcd547a10d5bbf0dfb9d52d2886eae18b4d62ab6",
"scala_reflect": "5f9e156aeba45ef2c4d24b303405db259082739015190b3b334811843bd90d6a", "scala_library": "dbfe77a3fc7a16c0c7cb6cb2b91fecec5438f2803112a744cb1b187926a138be",
}, "scala_reflect": "5f9e156aeba45ef2c4d24b303405db259082739015190b3b334811843bd90d6a",
)) },
),
fetch_sources = True,
)
load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains") load("@io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains")