Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Merge bazel build master #9

Merged
merged 87 commits into from
Jan 17, 2020
Merged

Merge bazel build master #9

merged 87 commits into from
Jan 17, 2020

Conversation

tian000
Copy link

@tian000 tian000 commented Jan 17, 2020

This just merges master from bazel build

laurentlb and others added 30 commits May 24, 2019 08:23
…azelbuild#759)

This allows the bazel test runner correctly generate the test log, based only on tests that actually did run.
* move collect_plugin_paths to common.bzl

* add scala_doc rule + aspect implementations

* add basic scala_doc Markdown documentation

* add scala_doc example

* collect plugins in aspect too

* declare_directory for scaldoc output path or else it complains

* add a simple test target for scala_doc rule

* add doc note about scaladoc being kind of slow

* fix scala_doc.md code block

* privatize scaladoc aspect

* get more src_files/compile_jars

* also accept scalacopts in scala_doc

* turn off scaladoc warnings for now

* use host_path_separator in classpath
fix the string `scala_doc` which was copy-pasted as `scala_binary`
This will be required by Bazel 0.27, where the flag
`--incompatible_no_support_tools_in_action_inputs` will be on by
default.

The function `collect_plugin_paths` iterates over its argument, so we
need to flatten the depset.
…te (bazelbuild#764)

* PlusOne propagates PlusOne deps of exports

* rename of tests

* correct test dependency

* use scala toolchain to toggle on +1 collection
* fix grpc opencensus stats integration
- upgrade opencensus-java packages to the latest (0.22.1)
- add opencensus-impl and opencensus-impl-core

* add opencensus-impl transitive dependency com.lmax:disruptor
* Specify which version of bazel is required.

* Update README.md
* Specs2 now will create its JUnit Description tree with filtered child items

* Creating a filtered description tree from Specs2 utilities - keeps ordering and hashCodes intact

* Redirecting test error output
* Migrate from java_common.create_provider to JavaInfo()

* Fix scala/private/common.bzl

* Fix some build failures.

* Fix some more builds.

* Remove scala/private/common:create_java_provider

* Remove unused _create_provider.

* Remove unused load statement

* Also propagate deps and runtime_deps in scala_import with no jars.

* Address review comments.

* Update custom-jvm-rule.bzl

* Update BUILD

* typo

* Removed implicit value for deps_providers.

* Add dummy intermediate jar file for scala_import with no jars.

* Cleanup code.

* Replace + with lists extend.

* Revert enabling --all_incompatible_changes test by mistake.
* expose source_jar in JavaInfo

* nit: clarify conditional

* nit: replace one hack with another

* nit: replace concat with append

* remove "main" attr usage

it's no longer needed

* add comment
…onstruction speed (bazelbuild#736)

* Import java_stub_template from bazelbuild@8b8271e

* Port changes from bazelbuild/bazel#8196

* Remove java_stub_template from WORKSPACE

* Update java_stub_template archive URL

* Make java_stub_template a normal file
* a JavaInfo provider should be given for deps

* flatten providers lists

* Revert "flatten providers lists"

This reverts commit a464f61.
* Allow for code coverage to be run on 0.27.1

* Update expected-coverage.dat

* actually remove all merge conflicts

remove scala_doc
merge conflict


spacing


newline
resolve_command shouldn't be required here.
bazelbuild#801)

* Add test for host deps

* Add a test hopefully to illustrate host deps

* Update test

* Change api usage to use binds

* Remove errant print

* See if behavior is different on 0.28.1

* incompatible_string_join_requires_strings: string.join(list) accepts invalid (non-string) list elements

* Add a to_list

* Another case of depset iterable

* Windows ci can only support 0.28.0 via chocolaty right now
* Add scalac_jvm_flags to scala_toolchain

This allows things like setting the max heap on all Scalac workers.

* Add docs

* Fix comment

* Add enable_code_coverage_aspect to the docs

* Flags on target should override flags on toolchain.

Also fix comment.
* Add scala_test_jvm_flags to the toolchain

* Fix package name

* Fix target names

* Add trivial test suite and rename some things

* Wrap all jvm_flags in _expand_location
* Remove the deprecated attribute proto_source_root.

Replace it with strip_import_prefix, its spiritual successor.

* Update Bazel version on Travis

* Update rules_scala to work with Bazel >=0.27.

The flag --incompatible_string_join_requires_strings was flipped, which
this repository was incompatible with.

* Update to Bazel 0.26 instead.

test_coverage_on fails for some mysterious reason that seems unrelated to the cleanup crusade I'm pursuing at the moment.

* add point release number so that downloading Bazel succeeds

* change whitespace to re-trigger build

* update Bazel version, hopefully properly

* update test_expected_failure/

* minimize diff

* re-trigger Travis

* re-trigger Travis again
note the last version of 0.23 that we ran CI on.
chenrui333 and others added 17 commits December 19, 2019 22:34
* Add configurable phases

* Refactor rules implementation into configurable phases

* Customizable phases

* Customizable phases tests

* Break up init to more reasonable phases

* Move final to non-configurable phase

* Rename parameter builtin_customizable_phases

* Fix ijar

* Switch default for buildijar

* Add TODOs

* Rename provider

* Move to advanced_usage

* rename custom_phases

* Make default phase private

* Fix exports_jars

* Adjusted_phases

* Rename p to be more clear

* Add in-line comments

* Fix lint

* Add doc for phases

* Doc for consumers

* Doc for contributors

* Add more content

* Fix md

* Test for all rules

* Fix junit test

* Fix lint

* Add more tests

* Fix junit test

* Fix doc

* Change _test_ to _scalatest_

* More doc on provider
* expand locations in scalac options

* allow plugins in expansion

* add a happy path test

* make the target names more obvious

* comment
* expand locations in scalacopts (bazelbuild#890)

* expand locations in scalac options

* allow plugins in expansion

* add a happy path test

* make the target names more obvious

* comment

* access ctx.attr.plugins with fallback

* reformat
)

* See test failing

* Use input plugins param instead of ctx
* phase_jvm_flags uses JavaInfo provider instead of scala_provider

* remove phase scala_provider

* readme clarifies minimum version at HEAD is 1.1.0

* travis.yml moved from 0.28.1 to 1.1.0
I'm not currently a maintainer of this project.
* runfiles and files are part of explicit DefaultInfo provider
and do not come from attributes

* removed transitive_rjars attribute as it was only needed internally
and before phases was exposed mistakenly because that's how the infra worked
Now internally phases use p.compile.rjars

* executable attribute part of DefaultInfo as well

* use coverage_common.instrumented_files_info provider instead of attribute

* remove redundant attributes

* linting

* return array of providers instead of struct

* scala_import return array of providers instead of struct
* collect_srcjars to phase

* move compile_or_empty and needed code to phase_compile (from rule_impls)

* phase_compile to take scalac_provider from phases instead of rule_impls

* rule_impls loads are loaded as private and unused are removed

* get_scalac_provider in phase_scalac_provider and not rule_impls

* move write_java_wrapper from rule_impls to phase_java_wrapper

* move merge_jars from rule_impls to phase_merge_jars

* move get_unused_dependency_checker_mode from rule_impls to get_unused_dependency_checker_mode

* move write_manifest from common to get_write_manifest

* move collect_jars_from_common_ctx from rule_impls to phase_collect_jars

* move write_executable from rule_impls to phase_write_executable

* linting

* [CR] inline _collect_jars_from_common_ctx

* [CR] inline _collect_srcjars

* [CR] inline write_java_wrapper

* [CR] inline merge_jars

* [CR] inline _write_executable
@simonyun
Copy link

you sneaking in fetch_sources=False into the merge commit?

@tian000
Copy link
Author

tian000 commented Jan 17, 2020

@simonyun you added fetch_sources to this method. But the methods that call this method do not pass in fetch_sources. So I am just defaulting it here so that things build. I will do a second PR, where I bubble fetch_sources up to be set at scala_repositories.

This PR i just meant to be a merge from bazelbuild/master with as few changes as possible.

Copy link

@mattforbes-gr mattforbes-gr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the history of why we maintain a fork, so not sure I should approve this. What's stopping us from using upstream rules_scala?

@tian000
Copy link
Author

tian000 commented Jan 17, 2020

@mattforbes-gr we want fetch_sources for when we get jar files from maven. Which is why we maintain a fork. I have an issue (which maintainer supports) to merge our modifications upstream, but its waiting on @simonyun for legal approval.

@tian000
Copy link
Author

tian000 commented Jan 17, 2020

@mattforbes-gr see #10 for changes we want to be able to get sources for the scala jars we get from maven

Copy link

@mattforbes-gr mattforbes-gr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha sgtm then

@tian000 tian000 merged commit 5d1e922 into master Jan 17, 2020
@tian000 tian000 deleted the merge-bazel-build-master branch January 17, 2020 21:58
@simonyun
Copy link

rubber stamp

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.