Rework ScalaPlatform.

Review Request #3779 — Created April 29, 2016 and submitted

benjyw
pants
pants-reviews
molsen, patricklaw, stuhood

- Uses naming conventions instead of boilerplate.
- New design clarifies the difference between named versions and
the 'custom' version mechanism.
- Now supports the two roles of the compiler jar: as a tool, and as a
runtime library that certain code (namely scalac plugins) needs
to have injected as a dep.
- Allows us to get rid of the ugly hack in zinc_compile.py where
we brute-force add the runtime and compiler jars to all classpaths.
The runtime was already added by ScalaLibrary, and now the compiler
is added by ScalacPlugin (the only thing that needs it, currently).
So the entire hack is unnecessary.

Gets rid of the --runtime-spec option, as it was incongruous to have
this only for the runtime lib but not the compiler, repl or scalastyle
tool, and this incongruity is emphasized now that the compiler can also
be a runtime lib, as well as a tool.

One particular repo may need this option in the future , and if so
we'll restore it, but I'm currently exploring other options with
that repo owner.

Also renames some vars in inner functions, to avoid shadowing.

CI passes: https://travis-ci.org/pantsbuild/pants/builds/126547899

  1. Thanks for doing this!

    (bit distracted today with 1.0.0, but will look over the weekend)

  2. 
      
  1. We chatted on slack about the variable name changes. Would you mind updating the description to talk about the variable changes.

  2. 
      
Review request changed

Status: Closed (submitted)

Change Summary:

52bdf4efd596a7458e364a0f9f5a393aed94df15

Loading...