[rework] Modularized scaladoc and presentation compiler.#2226
Merged
adriaanm merged 11 commits intoscala:masterfrom Mar 10, 2013
Merged
[rework] Modularized scaladoc and presentation compiler.#2226adriaanm merged 11 commits intoscala:masterfrom
adriaanm merged 11 commits intoscala:masterfrom
Conversation
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.
Contributor
|
I owe you 1 (or 11.) I'm still thoroughly out of commission. |
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.
Contributor
Author
|
Can I pick my own unit? |
Contributor
|
You know Unit is defined as (). We may be able to make allowances for RichUnit or BoxedUnit, although supplies of those are limited. Here: () () () () () () () () () () (). |
Contributor
|
LGTM by the way. |
Contributor
Author
|
I think we've done our due diligence. The IDE builds, the SBT interface builds, all the tests pass, and I've had a pretty close look at the code in the course of my rework. Merging. |
adriaanm
added a commit
that referenced
this pull request
Mar 10, 2013
[rework] Modularized scaladoc and presentation compiler.
Member
|
We should reflect the new structure in |
Merged
gourlaysama
added a commit
to gourlaysama/scala
that referenced
this pull request
Nov 15, 2014
They disappeared in dc1cd96 when `scala.tools.nsc.doc.DocParser` lost its `override def forScaladoc = true`, which used to trigger whether to parse `DocDef` nodes. This was deprecated in favor of a custom global when scaladoc was modularized out (scala#2226), but `DocParser` didn't get it since it didn't override `forScaladoc` anymore... I added back `forScaladoc` in `DocParser` for consistency with `ScaladocGlobal`, although it doesn't do anything anymore.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
rework of #2208