Skip to content

[rework] Modularized scaladoc and presentation compiler.#2226

Merged
adriaanm merged 11 commits intoscala:masterfrom
adriaanm:pr-2208-rework
Mar 10, 2013
Merged

[rework] Modularized scaladoc and presentation compiler.#2226
adriaanm merged 11 commits intoscala:masterfrom
adriaanm:pr-2208-rework

Conversation

@adriaanm
Copy link
Contributor

@adriaanm adriaanm commented Mar 9, 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.

rework of #2208

paulp added 2 commits March 9, 2013 11: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.
@ghost ghost assigned paulp Mar 9, 2013
@paulp
Copy link
Contributor

paulp commented Mar 9, 2013

I owe you 1 (or 11.) I'm still thoroughly out of commission.

paulp added 9 commits March 9, 2013 11:59
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.
@adriaanm
Copy link
Contributor Author

adriaanm commented Mar 9, 2013

Can I pick my own unit?

@paulp
Copy link
Contributor

paulp commented Mar 9, 2013

You know Unit is defined as (). We may be able to make allowances for RichUnit or BoxedUnit, although supplies of those are limited. Here: () () () () () () () () () () ().

@paulp
Copy link
Contributor

paulp commented Mar 10, 2013

LGTM by the way.

@adriaanm
Copy link
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.
@adriaanm adriaanm merged commit b380f9e into scala:master Mar 10, 2013
@retronym
Copy link
Member

We should reflect the new structure in src/{eclipse, intellij}, too.

@retronym retronym mentioned this pull request Mar 10, 2013
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.
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.

4 participants