Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for selecting scala version (#544)
* WIP compile using worker supplied from provider * Provider[ScalaWorker] contains (will contain) everything needed to run a specific version of the scala compiler * Manually create ScalaWorker for 2.11/2.12 * Add scalareflect + scalacompiler to [ScalaWorker] * Run scala_repl using compiler from [ScalaWorker] * All rules using [ScalaWorker] * run scala_binary, scala_macro_library, scala_test, scala_junit_test using [ScalaWorker] * Tests now working with 2.12 * Create [ScalaWorker] using new_scala_repository * Generate build file for scalac_2_12 in repository_rule * Use filegroup for scalac worker files * Specify scala version and label in new_scala_repository * Download scala version specified as parameter * Set label for ScalaWorker as @{name}//:{name} * Run formatter * Run scalatest for both 2.11/2.12 * Add initial [ScalaWorker] for both 2.11/2.12 * import scalatest + scalactic for 2.12 * Add 2.12 versions of scalatest_runner and scalatest_reporter * Manually specify scalatest_reporter for scala_test rule * Update scalatest to 3.0.5 + remove defaults from ScalaWorker - rename scalac -> scalac_2_11 * Symlink scalac_worker sources to repo_rule workspace * Resolve scalatest_reporter version in rule - Pass both 2.11/2.12 versions as implicit attrs - Add "major_version" to [ScalaWorker] * Use new_scala_repository for default 2.11/2.12 * scala_repositories takes scala versions as parameters * improve naming * Use single scala version * Fix runfiles not being generated * Support multiple scala versions for tut and scrooge * Format .bzl and BUILD files * Tests passing with 2.11 * Make scala_proto work with 2.12 * Support specs2 for both 2.11/2.12 - remove unused attr major_version from ScalacProvider * Don't pass scalatest dependencies through provider * Pass _scalac through _implicit_deps * Remove temp test directory * Remove debugging println * Cleanup * Run formatter * Use inputs from resolve_command * Combine scalatest+scalactic to single target * Add utils - extract_major_version_underscore() - default_scala_version() - run formatter * Increase scala_mvn_artifact usage, add shas * Add default_major_scala_version() * Add scala_jar_shas dict - Specify only one version of scalatest/scalactic... getting the shas from scala_jar_shas * Fix aspect test * Use scala_maven_import_external for all imports specs2, tut, scrooge, protob * Add util_core to scrooge, fix aspect test * Supply shas to scala_library,compiler and reflect - User can add shas for custom scala versions - run formatter * namespace scala_default * Scala default version to 2.11.12 - correct spelling error * Lookup scala_extra_jar_shas[major_version] once, renaming * tut server_urls as parameter * Pass ScalacProvider as paramater * Replace pass classpaths instead of jars - Stop using ScalacProvider.scala_library etc. - Use ScalacProvider.default_compile_classpath etc. * linting * Lookup scala_jar_shas[major_version] only once * Run version specific tests in their own workspace - Copy version_specific_test_dir to its own folder - Add WORKSPACE file with scala version to be tested - Removed tests that don't need to be run for multiple versions * remove more non version-specific tests * Remove version from scala labels fix tests - Add deps required for third_party and tut tests * Use default_runtime_classpath for macros, fix aspect test * Run more tests in test_version.sh * Update naming, default_compile_classpath -> base_compile_classpath * Use base_classpath instead of base_compile.. + base_runtime... Using different base classpaths for compile/runtime requires changes in common.bzl: collect_jars() Use the same base_classpath for both to limit the scope of this PR * Add scala_reflect to default_classpath * scala_version and shas as on tuple paramter - Combine two parameters into one tuple to force the user the specify shas * Reduce amount of version specific junit tests * Run version specific tests * Run linter * Remove dynamic creation of scala_default ScalacProvider - Avoid having to symlink java sources for scalac_worker - Allows us to only have one scala version at a time * PR comments, clearer naming * Use ctx.attr._scala_provider instead of ..attr.scalalib, run linter * Address comments, clean up WORKSPACE.template * Remove unused code * Add section about different scala versions to the readme
- Loading branch information