Modularized scaladoc and presentation compiler.#2208
Modularized scaladoc and presentation compiler.#2208paulp wants to merge 11 commits intoscala:masterfrom paulp:pr/extraction
Conversation
|
Review by @adriaanm, @dragos, @VladUreche |
|
I'll go take away the kitten's ball of yarn and put it to work. the rebuild command should never be necessary |
|
CC @vigdorchik |
|
I will probably have a thorough look at this on Friday, until then I'm fully booked. |
|
Oh good, the stability test. Now I really start paying for the inept ant build. |
|
/cc @huitseeker as well |
|
There are no change to these commits since the previous push, except I removed the last one (the one which made the stability test pass in the last commit) and rebased on top of #2209, which I hope will let all of them pass. |
There is no reason to be stability testing every piece of
bytecode we've ever encountered. If the compilation products
are unstable, then testing 20,000 classfiles will reveal it.
Or it won't; either way, we can stop there. So I cut a gordian
knot and focused the stability test solely on the contents of:
library reflect compiler
Next I cut the "custom ant task" cord. There's a tool for
diffing files, it's decades old, it's called diff. It does
the entire job we need. If it doesn't work on windows, it
doesn't matter. The stability test is not something which
needs to run in every environment. Either the classfiles
are stable or they aren't.
Generated the ant xml for building quick.{lib,reflect,comp}
and strap.{lib,reflect,comp} so they are identical modulo the
compiler used to build them, probably for the first time ever.
I'm sure they won't stay that way, but it's a step.
This is a non-behaviorally-changing setup commit which re-routes bits of code through avenues which can more easily be influenced by subclasses of Global.
This change is not externally visible. It moves the scaladoc sources into src/scaladoc and adds an ant target for building them. The compilation products are still packaged into scala-compiler.jar as before, but with a small change to build.xml a separate jar can be created instead.
As with the preceding commit, this has build-internal effects only.
Some new partest abilities which were necessary to deal with additional standard jars. These new abilities aren't yet put to the test because scaladoc and interactive are still going into the compiler jar. No longer need each jar or classes directory be named directly for partest to find them.
Separate from (and larger than) pack.classpath. Then take the opportunity to lower the comic/tragic level of duplication in build.xml.
% ant test.interactive
This leverages the preceding several commits to push scaladoc specific code into src/scaladoc. It also renders some scanner code more comprehensible.
As with scaladoc, pushes presentation compiler specific code into its separate source area.
This is the commit which brings it all together. The booleans forInteractive and forScaladoc are now deprecated and are not inspected for any purpose. All behavioral changes formerly accomplished via tests of those flags are embodied in the globals built specifically for those tasks.
|
It will take us some time to get the IDE on top of this (not necessarily because of the changes here, but the 2.11 branch broke some code in scala-refactoring too). @huitseeker is on it, and I hope I can put some time tomorrow into it. |
|
Awesome. Thanks, guys! We are under some time pressure for 2.11.0-M2, which On Thu, Mar 7, 2013 at 1:19 PM, Iulian Dragos notifications@github.comwrote:
|
|
I've verified that the IDE builds after merging this PR and #2216. I had to skip the tests, though, as they seemed to run out of memory/hang. Not sure why that is, but I don't think we should let that stop us from merging this PR. I also verified that the stability tests pass for all commits once I then foolishly proceeded to trying to fix the test/presentation/doc failure in ed57fbf and 4526490 (fixed in ff6d503). I now think this is doomed. The clean separation in ed57fbf and 4526490 of the refactoring seems preferable to squashing all of the above three, which is the only way I see to fix that test (as it's an integration test of scaladoc and the presentation compiler). |
|
How about moving the test into pending for three commits. |
|
I dig it. |
They are now separately built targets and are not privileged from the standpoint of the rest of the compiler. There is no change to build products: they are still bundlled into scala-compiler.jar, but it would now be easy to create a scaladoc.jar and an interactive.jar should we be so inclined.