Skip to content

Modularized scaladoc and presentation compiler.#2208

Closed
paulp wants to merge 11 commits intoscala:masterfrom
paulp:pr/extraction
Closed

Modularized scaladoc and presentation compiler.#2208
paulp wants to merge 11 commits intoscala:masterfrom
paulp:pr/extraction

Conversation

@paulp
Copy link
Contributor

@paulp paulp commented Mar 6, 2013

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.

@paulp
Copy link
Contributor Author

paulp commented Mar 6, 2013

Review by @adriaanm, @dragos, @VladUreche

@adriaanm
Copy link
Contributor

adriaanm commented Mar 6, 2013

I'll go take away the kitten's ball of yarn and put it to work. the rebuild command should never be necessary

@VladUreche
Copy link
Contributor

CC @vigdorchik

@VladUreche
Copy link
Contributor

I will probably have a thorough look at this on Friday, until then I'm fully booked.

@paulp
Copy link
Contributor Author

paulp commented Mar 6, 2013

Oh good, the stability test. Now I really start paying for the inept ant build.

@adriaanm
Copy link
Contributor

adriaanm commented Mar 6, 2013

/cc @huitseeker as well

@paulp
Copy link
Contributor Author

paulp commented Mar 7, 2013

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.

paulp added 11 commits March 6, 2013 18:03
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.
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.
@dragos
Copy link
Contributor

dragos commented Mar 7, 2013

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.

@adriaanm
Copy link
Contributor

adriaanm commented Mar 7, 2013

Awesome. Thanks, guys! We are under some time pressure for 2.11.0-M2, which
is supposed to be tagged on Monday. I realize this is cutting it a bit
fine. Just wanted you to be aware. Progress here greatly appreciated! Also,
happy to help.

On Thu, Mar 7, 2013 at 1:19 PM, Iulian Dragos notifications@github.comwrote:

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 https://github.com/huitseeker is on
it, and I hope I can put some time tomorrow into it.


Reply to this email directly or view it on GitHubhttps://github.com//pull/2208#issuecomment-14586779
.

@adriaanm
Copy link
Contributor

adriaanm commented Mar 9, 2013

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 tools/stability-test.sh is changed along the lines of:

+for dir in library reflect compiler; do
+  # feel free to replace by a more elegant approach -- don't know how
+  if diff -rw -x '*.css' \
+              -x '*.custom' \
+              -x '*.gif' \
+              -x '*.js' \
+              -x '*.layout' \
+              -x '*.png' \
+              -x '*.properties' \
+              -x '*.tmpl' \
+              -x '*.tooltip' \
+              -x '*.txt' \
+              -x '*.xml' \
+              build/{quick,strap}/classes/$dir
+  then

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).

@paulp
Copy link
Contributor Author

paulp commented Mar 9, 2013

How about moving the test into pending for three commits.

@adriaanm
Copy link
Contributor

adriaanm commented Mar 9, 2013

I dig it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants