start of a Pants-with-scala page

Review Request #1092 - Created Oct. 1, 2014 and submitted

Information
Larry Hosken
pants
26
cdfbf14...
Reviewers
pants-reviews
benjyw, tejal

start of a Pants-with-scala page

  • points out sample code

  • java_sources, circular java-scala deps

  • mentions 'goal repl'

rendered at http://pantsbuild.github.io/lahosken-demo/scala.html

Larry Hosken
Larry Hosken
Larry Hosken
Larry Hosken
Larry Hosken
Tejal Desai
Tejal Desai
Larry Hosken
Stu Hood
Larry Hosken
Larry Hosken
Review request changed

Status: Closed (submitted)

Patrick Lawson

I know I'm a little late to the party here, but we should really be discouraging people from using java_sources. It's a very hacky way of doing a non-pantsy thing (circular dependency) that can in most circumstances be avoided as long as you don't split your java and scala source trees. We should document it since it serves a purpose, but we should leave a giant warning sign hanging above it.

  1. that can in most circumstances be avoided as long
    as you don't split your java and scala source trees

    Are you saying that if I've got my inter-tangled *.scala and *.java in one dir, then there's some way to build them without using java_sources? What is it?

    (Or, if that's not what you're saying, then... more generally, what is the workaround?)

  2. Its just: scala_library(name='multi-lang', sources=globs('*.scala', '*.java')). I will point out that although Patrick is completely correct, the split source trees is pervasive since this is the maven standard way to lay out.

  3. aha. Thank you. Doc tweak on its way.

Loading...