Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.

Mixed Java/Scala compilation like sbt's "Mixed" compileOrder #69

Merged
merged 1 commit into from
Dec 19, 2016

Conversation

lrytz
Copy link
Member

@lrytz lrytz commented Dec 16, 2016

Partest used to follow an old recommendation for mixed
compilation: first all files are passed to scalac, then
the Java files to javac (with the Scala classfiles on the
classpath), and finally the Scala files again to the Scala
compiler (with the existing classfiles on the classpath).

SBT and the other build tools stop after the second round,
so it makes sense for our partest to do the same by default.

Separate compilation (Java then Scala) can still be tested
using filename groups (_N).

Partest used to follow an old recommendation for mixed
compilation: first all files are passed to scalac, then
the Java files to javac (with the Scala classfiles on the
classpath), and finally the Scala files again to the Scala
compiler (with the existing classfiles on the classpath).

SBT and the other build tools stop after the second round,
so it makes sense for our partest to do the same by default.

Separate compilation (Java then Scala) can still be tested
using filename groups (`_N`).
@lrytz
Copy link
Member Author

lrytz commented Dec 16, 2016

Review by @SethTisue. I'm planning to push a v1.0.18 tag once this is merged.

@SethTisue
Copy link
Member

LGTM (though, I don't really know my way around this repo)

@SethTisue
Copy link
Member

I'll take care of the needed test case updates in scala/scala as part of scala/scala#5661

@lrytz
Copy link
Member Author

lrytz commented Jan 25, 2017

Oh, i actually did that here: scala/scala@5ae79fb

Haven't submitted it, as this PR was put on hold.

@SethTisue
Copy link
Member

SethTisue commented Jan 25, 2017

@lrytz sweeeeet, I was just starting to realize this was actually going to be work :-)

thanks, I'll pull that in over in scala/scala

@lrytz
Copy link
Member Author

lrytz commented Jan 25, 2017

Glad we didn't duplicate the work, I should have pulled that out of the PR and submitted it.

SethTisue pushed a commit to SethTisue/scala that referenced this pull request Jan 25, 2017
scala/scala-partest#69
changed the mode for mixed compilation, which used to be

  1. scalac *.java *.scala -d o
  2. javac  *.java         -d o -cp o
  3. scalac        *.scala -d o -cp o

Now the third step is skipped. This required some adjustments to existing
tests.

  - t7014 is split in two groups, the fix is for separate compilation.
  - t7582 is also split. It tests inliner warnings when inling code that accesses
    Java-defined package-private code. Inlining from Java only works in separate
    compilation (no bytecode available in mixed compilation).
  - Java compiler warnings of "run" tests were not reported in the old scheme,
    now they are. Deprecation / unchecked warnings were removed from t6240, t8786,
    varargs.
  - t4788 required a .check file update to pass, which hints at a bug. I will
    re-open SI-4788 and investigate later.
SethTisue pushed a commit to SethTisue/scala that referenced this pull request Jan 27, 2017
upgrades partest from 1.0.17 to 1.1.0

scala/scala-partest#69
changed the mode for mixed compilation, which used to be

  1. scalac *.java *.scala -d o
  2. javac  *.java         -d o -cp o
  3. scalac        *.scala -d o -cp o

Now the third step is skipped. This required some adjustments to existing
tests.

  - t7014 is split in two groups, the fix is for separate compilation.
  - t7582 is also split. It tests inliner warnings when inling code that accesses
    Java-defined package-private code. Inlining from Java only works in separate
    compilation (no bytecode available in mixed compilation).
  - Java compiler warnings of "run" tests were not reported in the old scheme,
    now they are. Deprecation / unchecked warnings were removed from t6240, t8786,
    varargs.
  - t4788 required a .check file update to pass, which hints at a bug. I will
    re-open SI-4788 and investigate later.
lrytz added a commit to lrytz/scala-partest that referenced this pull request May 9, 2018
Mixed Java/Scala compilation like sbt's "Mixed" compileOrder
lrytz added a commit to lrytz/scala-partest that referenced this pull request May 9, 2018
Mixed Java/Scala compilation like sbt's "Mixed" compileOrder
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.

2 participants