diff options
author | Antonio Cunei <antonio.cunei@epfl.ch> | 2011-04-11 09:05:45 +0000 |
---|---|---|
committer | Antonio Cunei <antonio.cunei@epfl.ch> | 2011-04-11 09:05:45 +0000 |
commit | 825f3691fae26d3cc54dc04b4a559d197c46f780 (patch) | |
tree | 85ec520f743d57148ca2bd9b5c777832e4281e1e /test/scaladoc | |
parent | 74a967da857ead23ec5d976c6616ac98fb7c33ef (diff) | |
download | scala-825f3691fae26d3cc54dc04b4a559d197c46f780.tar.gz scala-825f3691fae26d3cc54dc04b4a559d197c46f780.tar.bz2 scala-825f3691fae26d3cc54dc04b4a559d197c46f780.zip |
Merged revisions 24573,24583-24584,24592-24604,...
Merged revisions
24573,24583-24584,24592-24604,24607-24612,24614-24646,24648,24651-24667,
24672-24706,24708-24717,24719-24724 via svnmerge from
https://lampsvn.epfl.ch/svn-repos/scala/scala/trunk
........
r24573 | dragos | 2011-03-24 18:48:14 +0100 (Thu, 24 Mar 2011) | 1 line
Added synchronous version of askStructure, needed by the IDE to avoid
deadlocks. review by odersky. ........ r24583 | magarcia | 2011-03-25
15:40:35 +0100 (Fri, 25 Mar 2011) | 3 lines
for Scala.NET bootstrapping. Given that flatten does not run in
forMSIL mode, there may be several recursive activations of the case
clause, and part of that activation state needs to be saved/restored.
forJVM behavior remains unchanged.
........
r24584 | extempore | 2011-03-25 15:49:31 +0100 (Fri, 25 Mar 2011) | 5 lines
I guess windows can show a < 500x difference and still give us
confidence there isn't a 100,000x difference. Testing situation
continues to confound and amaze. Trying to make 4279 not fail on
windows, one more time and I will delete it and burn the bodies. No
review. ........ r24592 | extempore | 2011-03-25 22:13:52 +0100 (Fri, 25
Mar 2011) | 3 lines
Figured out why -Ydebug has been such a deathtrap for a while. I'm
the culprit. Making -Ydebug less likely to kill a compile, no review.
........ r24593 | extempore | 2011-03-25 22:21:27 +0100 (Fri, 25 Mar
2011) | 2 lines
Fixed the "poor resilience to error conditions" crasher mentioned in
#3625, no review. ........ r24594 | kzys | 2011-03-25 23:55:19 +0100
(Fri, 25 Mar 2011) | 2 lines
[scaladoc] Stop wiki syntax parsing inside HTML. Review by pedrofurla.
........ r24595 | kzys | 2011-03-26 00:08:19 +0100 (Sat, 26 Mar 2011) |
2 lines
[scaladoc] Add a test for #4180. No review.
........
r24596 | kzys | 2011-03-26 01:39:35 +0100 (Sat, 26 Mar 2011) | 2 lines
[scaladoc] Fix wiki formatting to close #4359. Review by malayeri.
........ r24597 | kzys | 2011-03-26 02:25:13 +0100 (Sat, 26 Mar 2011) |
2 lines
[scaladoc] Closes #4371. Review by pedrofurla.
........
r24598 | kzys | 2011-03-26 04:26:40 +0100 (Sat, 26 Mar 2011) | 2 lines
[scaladoc] Cleanup tests. No review.
........
r24599 | extempore | 2011-03-26 17:05:14 +0100 (Sat, 26 Mar 2011) | 2 lines
Fix for cygwin: jline.UnixTerminal is now
scala.tools.jline.UnixTerminal. No review. ........ r24600 | extempore |
2011-03-26 19:22:27 +0100 (Sat, 26 Mar 2011) | 2 lines
Added some explanatory output when jline reader fails to create. No
review. ........ r24601 | extempore | 2011-03-26 20:42:25 +0100 (Sat, 26
Mar 2011) | 1 line
Some accumulated work and polish on classpath and jars. No review.
........ r24602 | extempore | 2011-03-26 20:42:44 +0100 (Sat, 26 Mar
2011) | 1 line
Cleaning up util.Tracer and its usage in Erasure. No review. ........
r24603 | extempore | 2011-03-26 20:43:00 +0100 (Sat, 26 Mar 2011) | 3
lines
Suppressed unnecessary checkcasts on Throwables which were letting
AnyRefs reach the backend. Looks like this was my doing when trying to
wake back up the icode checker. Closes #4393, no review. ........ r24604
| cunei | 2011-03-26 21:47:47 +0100 (Sat, 26 Mar 2011) | 4 lines
Introducing xz compression in nightly builds.
Also removed some obsolete targets related to the old 1.4 version.
........ r24607 | magarcia | 2011-03-27 16:41:46 +0200 (Sun, 27 Mar
2011) | 2 lines
needed when compiling the (jdk2ivkm'd) Scala library with Scala.NET,
and doesn't hurt in forJVM mode. ........ r24608 | extempore |
2011-03-27 17:37:15 +0200 (Sun, 27 Mar 2011) | 1 line
Made :javap less crashy on windows, no review.
........
r24609 | extempore | 2011-03-27 21:46:12 +0200 (Sun, 27 Mar 2011) | 18 lines
Fix for linked lists closes #4080 and proves my desire not to ship
obviously broken code is even greater than my will to hold out for any
help. I threw in a free fix for this which I noticed while in there.
scala> scala.collection.mutable.LinkedList[Int]().head
res0: Int = 0
Also was reminded how useless tests can be:
val ten = DoubleLinkedList(1 to 10: _*)
ten.insert(DoubleLinkedList(11))
// Post-insert position test
require(ten.last == 11)
Fortunately a test confirming buggy behavior still serves a purpose
by breaking when you fix the bug which allowed it to pass, thus letting
you fix the broken test too. Life's (very) little compensations. Linked
list code should still be presumed broken. No review. ........ r24610 |
extempore | 2011-03-28 01:27:05 +0200 (Mon, 28 Mar 2011) | 16 lines
Trying to get fsc doing the right thing with respect to absolute and
relative paths. My knowledge of the problem had heretofore been second
hand, and my understanding of it incomplete. The real problem I have
determined is that there are a bunch of different things which go
wrong if relative paths start being resolved from a different base,
each of which needs custom handling.
classpath-style options, e.g. fsc -cp ../foo.jar path-style options,
e.g. fsc -d ../mydir file arguments, e.g. fsc ../foo.scala
So it was more work than I had realized, or I probably wouldn't have
even touched it. But now it seems to be working as one would want. I
also poured some readability onto the fsc help output.
Closes #4395, no review, but community input would be great. ........
r24611 | extempore | 2011-03-28 05:10:44 +0200 (Mon, 28 Mar 2011) | 2
lines
A paltry 570 cases failing in -Xcheckinit due to some uninitialized
val or other. It is but a trifle! No review. ........ r24612 | extempore
| 2011-03-28 09:34:04 +0200 (Mon, 28 Mar 2011) | 4 lines
Learned an interesting lesson about having an implicit object with a
"def apply(x: Any): List[String]" method imported into power mode. Let's
just say this is not advised. This and other rough edges eliminated from
power mode, no review. ........ r24614 | magarcia | 2011-03-28 15:59:16
+0200 (Mon, 28 Mar 2011) | 1 line
(1) The msil library can now parse modreq and modopt, (2) bug fix in
GenMSIL. review by rytz. Updated msil.jar coming soon. ........ r24615 |
magarcia | 2011-03-28 18:00:13 +0200 (Mon, 28 Mar 2011) | 1 line
msil.jar updated with changeset 24614
........
r24616 | plocinic | 2011-03-28 18:21:52 +0200 (Mon, 28 Mar 2011) | 1 line
Don't analyse symbols with error types. can happen for java symbols
that are forced during the analysis. Partial fix for #1000238 in eclipse
ide, related issue is in #4402. no review ........ r24617 | kzys |
2011-03-28 18:58:54 +0200 (Mon, 28 Mar 2011) | 2 lines
[scaladoc] Remove whitespace around colon and parentheses. Closes
#4372. Review by pedrofurla. ........ r24618 | extempore | 2011-03-28
21:20:58 +0200 (Mon, 28 Mar 2011) | 3 lines
Added some implicitNotFound annotations to commonly used classes,
and some documentation to Manifest. (Said documentation is invisible
for the moment due to #4404.) No review. ........ r24619 | extempore |
2011-03-28 22:07:02 +0200 (Mon, 28 Mar 2011) | 2 lines
Expanding the test which tries to use the collections from java. No
review. ........ r24620 | extempore | 2011-03-28 23:44:33 +0200 (Mon, 28
Mar 2011) | 2 lines
Looks like another java5/java6 difference gets me on a test. At least
this time I was looking for that. No review. ........ r24621 | extempore
| 2011-03-28 23:53:12 +0200 (Mon, 28 Mar 2011) | 3 lines
Removed some bitrotted ant directives which were keeping us from
getting Manifest docs. Thanks to dmharrah. Also removed RichUnit, fare
thee well. Closes #4404, no review. ........ r24622 | extempore |
2011-03-28 23:57:47 +0200 (Mon, 28 Mar 2011) | 4 lines
Eliminated option -Xwarninit, which is warning about a change which
took place 2.5 years ago and is only likely to add to option confusion
at this point. No review. (But let me know if we still need this for
some reason: many more of our options should be culled.) ........ r24623
| extempore | 2011-03-29 00:45:53 +0200 (Tue, 29 Mar 2011) | 3 lines
Made ScalaRunTime.stringOf more general by separating out the part
which formats it for a repl result, and cleaned up some string functions
around the repl. No review. ........ r24624 | extempore | 2011-03-29
04:59:31 +0200 (Tue, 29 Mar 2011) | 26 lines
Polishing the programmatic interface to the repl and other bits
of machinery which we'll have to live with for a while. The repl
classloader now works more like you'd expect a classloader to, as seen
here:
% scala -Dscala.repl.power
scala> class Bippus extends Traversable[Int] { def foreach[U](f: Int => U) = () }
defined class Bippus
scala> intp.classLoader.getResourceAsStream("Bippus").bytes()
res0: Array[Byte] = Array(-54, -2, -70, ...
scala> res0.size
res1: Int = 23954
scala> case class Bippy(x: Int)
defined class Bippy
// classBytes is shorter way to say the same thing scala>
intp.classLoader.classBytes("Bippy").size
res2: Int = 2356
scala> intp.classLoader.classBytes("Bippy$").size
res3: Int = 1741
Closes #4399, no review.
........
r24625 | extempore | 2011-03-29 05:25:38 +0200 (Tue, 29 Mar 2011) | 1 line
And so my attempt to have a performance test draws the final curtain,
no review. ........ r24626 | kzys | 2011-03-29 16:55:30 +0200 (Tue, 29
Mar 2011) | 2 lines
[scaladoc] Add a test of colon and parentheses (#4372). No review.
........ r24627 | kzys | 2011-03-29 17:40:21 +0200 (Tue, 29 Mar 2011) |
2 lines
[scaladoc] Cleanup code. No review.
........
r24628 | kzys | 2011-03-29 18:21:02 +0200 (Tue, 29 Mar 2011) | 2 lines
[scaladoc] Don't create broken link to private companion object.
Closes #4374. Review by pedrofurla. ........ r24629 | extempore |
2011-03-29 20:41:08 +0200 (Tue, 29 Mar 2011) | 5 lines
A bunch of scaladoc cleanups. Tags with the wrong name, tags in the
wrong places, tags saying the wrong thing. I sorted types and values
so deprecated ones are at the end. I think they should be hidden by
default, but this is a big improvement. Leaving #3914 open so they can
be made invisible. No review. ........ r24630 | extempore | 2011-03-29
22:22:22 +0200 (Tue, 29 Mar 2011) | 2 lines
Disabled all the script tests. They're not run from ant and they're
breaking the distribution build. No review. ........ r24631 | extempore
| 2011-03-29 22:22:40 +0200 (Tue, 29 Mar 2011) | 2 lines
Fixing the scalap test rig to work like other test types so it doesn't
break the distribution build. No review. ........ r24632 | extempore |
2011-03-29 22:22:53 +0200 (Tue, 29 Mar 2011) | 2 lines
Transcript pastes now work with leading whitespace (such as my commit
message in r24624), no review. ........ r24633 | extempore | 2011-03-29
22:44:33 +0200 (Tue, 29 Mar 2011) | 2 lines
A change to a test to defend against output change when run with a
plugin enabled. No review. ........ r24634 | cunei | 2011-03-29 23:18:34
+0200 (Tue, 29 Mar 2011) | 2 lines
include files/specialized/*.txt in the set of files packaged in the
test sbp. ........ r24635 | cunei | 2011-03-29 23:39:29 +0200 (Tue, 29
Mar 2011) | 2 lines
Excluding presentation test from sbaz-packaged test suite. ........
r24636 | extempore | 2011-03-30 02:55:20 +0200 (Wed, 30 Mar 2011) | 11
lines
Wanting to deprecate -make, first I had to write a way to deprecate
-make. So there's that, now you can do
val s = SomeSetting(...) withDeprecationMessage "don't use this"
And it will do the usual deprecation things. And, deprecated -make.
And couldn't resist fixing a bug in -make, it would crash if you gave
it its own default option (i.e. -make:all.) Let's deprecate more!
I also did further cleaning up of our help outputs. Do I smell a
pulitzer in the making? No review. ........ r24637 | rytz | 2011-03-30
09:06:08 +0200 (Wed, 30 Mar 2011) | 1 line
fix get-scala-revision script for the case when svn prints some
warnings. no review ........ r24638 | extempore | 2011-03-30 22:40:46
+0200 (Wed, 30 Mar 2011) | 10 lines
Issue warning when doccomments have $variables which go unfulfilled.
Started with patch by dmharrah. Noticed expandVariables never
incremented its recursion guard and ended up rewriting it. To avoid
spurious warnings you can escape $'s, as in this comment:
/** The decoded name of the symbol, e.g. `==` instead of `\$eq\$eq`.
*/
The above will be ignored during expansion and translated to $eq$eq
for output. Closes #4412, no review. ........ r24639 | extempore |
2011-03-30 23:00:08 +0200 (Wed, 30 Mar 2011) | 2 lines
Addressing most of the warnings revealed by the patch to warn about
unknown scaladoc variables. Updated and reran genprod. No review.
........ r24640 | extempore | 2011-03-31 00:47:00 +0200 (Thu, 31 Mar
2011) | 3 lines
Warn about unqualified names in scaladoc links because they don't
work. I think it would be better to just make them work, but the way
things are structured it looks involved. Closes #3696, no review.
........ r24641 | kzys | 2011-03-31 01:38:18 +0200 (Thu, 31 Mar 2011) |
2 lines
[scaladoc] Scaladoc should expand macros recursively. Closes #3484.
Review by dubochet. ........ r24642 | extempore | 2011-03-31 05:59:42
+0200 (Thu, 31 Mar 2011) | 6 lines
Modified some typer logic to allow annotation arguments for constants
which don't have the form Literal(_). The current logic seems to be
avoided most of the time, but scaladoc breaks when it runs into it. This
closes #4301. I can't figure out from the ticket what the deal is with
#2764 and what is presently happening, but it seems like this patch
could only improve the situation. Review by rytz. ........ r24643 |
extempore | 2011-03-31 05:59:57 +0200 (Thu, 31 Mar 2011) | 2 lines
Incidental work on scaladoc while trying to figure out what is up with
usecases. Did a little rewrite of recent patch. No review. ........
r24644 | extempore | 2011-03-31 06:59:35 +0200 (Thu, 31 Mar 2011) | 2
lines
Making the scaladoc command line help look as pretty as all the
others ones do now. No review. ........ r24645 | extempore | 2011-03-31
07:58:01 +0200 (Thu, 31 Mar 2011) | 2 lines
Some minor sensibility improvements to previous patch, and tearing out
some obsolete pieces of scalap. No review. ........ r24646 | extempore |
2011-03-31 08:09:14 +0200 (Thu, 31 Mar 2011) | 2 lines
Fix for interpreter issue with missing newlines wreaking havoc. No
review. ........ r24648 | kzys | 2011-03-31 14:59:56 +0200 (Thu, 31 Mar
2011) | 2 lines
[scaladoc] Don't link to syntetic companion. Closes #4325. Review by
dubochet. ........ r24651 | dragos | 2011-03-31 16:36:38 +0200 (Thu, 31
Mar 2011) | 1 line
One breakage too many, this test is a pest -> disabled. no review.
........ r24652 | dragos | 2011-03-31 16:39:19 +0200 (Thu, 31 Mar 2011)
| 1 line
Fixed failing presentation compiler test. no review. ........ r24653 |
extempore | 2011-03-31 18:41:51 +0200 (Thu, 31 Mar 2011) | 1 line
Emptiness check in swing, closes #1578 no review. ........ r24654 |
extempore | 2011-03-31 18:42:05 +0200 (Thu, 31 Mar 2011) | 4 lines
Added some null checks in swing. I assumed the behavior when the input
verifier is null should be "assume it verifies" not "assume it doesn't"
but since I don't actually know anything about swing this guess could
be wrong. Closes #3783, review by imaier. ........ r24655 | odersky |
2011-03-31 18:46:48 +0200 (Thu, 31 Mar 2011) | 1 line
recommitted 24578: All compiler control methods now do something
sensible when called from presentation compiler thread itself. ........
r24656 | extempore | 2011-03-31 21:26:24 +0200 (Thu, 31 Mar 2011) | 3
lines
Printing refinement types in scaladoc. Actually only printing
one-member refinements, for bigger ones printing the number of members.
Should be improved. Closes #484, no review. ........ r24657 | extempore
| 2011-03-31 21:26:37 +0200 (Thu, 31 Mar 2011) | 3 lines
Fix for a little breakage which crept into power mode. This is
why real things with real types are better than generating code and
remembering to update your strings. No review. ........ r24658 |
extempore | 2011-03-31 22:44:29 +0200 (Thu, 31 Mar 2011) | 7 lines
Separated abstract and concrete value members in scaladoc. This looks
like such a runaway improvement to me that I'm just checking it
in, but if anyone feels differently say the word. I eliminated the
abstract/concrete filter entirely as it is extraneous once you can
just see which is which.
Closes #3831, review by malayeri.
........
r24659 | extempore | 2011-04-01 00:18:43 +0200 (Fri, 01 Apr 2011) | 2 lines
A quick fix for the weird string output one gets in the repl when
calling .par. No review. ........ r24660 | extempore | 2011-04-01
04:18:53 +0200 (Fri, 01 Apr 2011) | 5 lines
Working on the documentation of core classes. Trying to withdraw some
of the goodness I banked a while ago with the AnyVal types. Started on
what will culminate in the total elimination of SourcelessComments.
Cleaned up the docs on ancient classes like Product. More to come. No
review. ........ r24661 | extempore | 2011-04-01 07:02:30 +0200 (Fri, 01
Apr 2011) | 2 lines
A less ad hoc infrastructure for generating AnyVal sources. A few
more comments on said sources. No review. ........ r24662 | extempore |
2011-04-01 08:41:46 +0200 (Fri, 01 Apr 2011) | 1 line
Fix for parsing bug in scaladoc closes #4420, no review. ........
r24663 | extempore | 2011-04-01 18:00:50 +0200 (Fri, 01 Apr 2011) | 3
lines
Since somewhere before 2.8.0 shipped scalac has disgorged a stack
trace for the misdemeanor of specifying a non-existent directory for -d.
No more, no review. ........ r24664 | kzys | 2011-04-01 19:09:59 +0200
(Fri, 01 Apr 2011) | 2 lines
Put "\n" between superclass's comment and subclass's. Closes #4289.
Review by pedrofurla. ........ r24665 | extempore | 2011-04-01 19:18:34
+0200 (Fri, 01 Apr 2011) | 14 lines
Finding myself wanting a working -Ystop, I did the following.
-Ystop-after:phase works
-Ystop-before:phase works
-Ystop:phase is a backward compat alias for -Ystop-after
Until now -Ystop, although documented to "stop after phase", actually
stopped before phase, to the consternation of some. Furthermore the
programmatic way to influence the stop phase (protected def stopPhase in
Global#Run) involved returning true if you wanted to stop before the
phase. So now the command line option works as advertised, and the
method has the same semantics. The only potential loser is some script
which uses -Ystop: based on the actual behavior rather than the documented
behavior. Well, someone had to lose. No review.
........
r24666 | kzys | 2011-04-01 20:57:36 +0200 (Fri, 01 Apr 2011) | 2 lines
On Scaladoc, we should escape meta characters before compile regexp.
No review. ........ r24667 | extempore | 2011-04-02 01:55:01 +0200 (Sat,
02 Apr 2011) | 2 lines
A double completion whammy: crasher for edge condition and method
signatures not being cleaned of their $iws. Closes #4434, no review.
........ r24672 | malayeri | 2011-04-04 15:57:56 +0200 (Mon, 04 Apr
2011) | 1 line
[scaladoc] Add explicit link to show linear supertypes and known
subclasses. Closes #4416. Modifications to style sheets to reduce
number of colors and make the documentation more readable (includes
contributions from Ruediger Keller). No review. ........ r24673 |
malayeri | 2011-04-04 16:34:29 +0200 (Mon, 04 Apr 2011) | 1 line
[scaladoc] Add missing files.
........
r24674 | cunei | 2011-04-04 16:52:55 +0200 (Mon, 04 Apr 2011) | 2 lines
Fix for windows batch files. Closes #4439.
........
r24675 | malayeri | 2011-04-04 17:22:09 +0200 (Mon, 04 Apr 2011) | 1 line
[scaladoc] Minor CSS tweaks. No review.
........
r24676 | kzys | 2011-04-04 18:19:32 +0200 (Mon, 04 Apr 2011) | 2 lines
Every tag element (even @define and @usecase) end before the next
recognised tag. Closes #4409. Review by extempore. ........ r24677 |
odersky | 2011-04-04 18:34:02 +0200 (Mon, 04 Apr 2011) | 1 line
Fixed crashes in IDE on default parameters in constructors. ........
r24678 | malayeri | 2011-04-04 18:36:27 +0200 (Mon, 04 Apr 2011) | 1
line
[scaladoc] Change div id's of abstract and concrete members so that
"order by inheritance" action works properly. Fixes issue introduced in
r24658. Review by extempore. ........ r24679 | malayeri | 2011-04-04
18:37:51 +0200 (Mon, 04 Apr 2011) | 1 line
[scaladoc] Make object/template name be a link to the companion.
Closes #4411. Review by extempore to make sure the design makes sense.
........ r24680 | malayeri | 2011-04-04 18:38:11 +0200 (Mon, 04 Apr
2011) | 1 line
[scaladoc] Fix minor CSS issue. No review.
........
r24681 | odersky | 2011-04-04 19:35:19 +0200 (Mon, 04 Apr 2011) | 1 line
Some localized code cleanup.
........
r24682 | malayeri | 2011-04-04 20:17:26 +0200 (Mon, 04 Apr 2011) | 1 line
[scaladoc] Updated trait, package, class, and object icons. No review.
........ r24683 | extempore | 2011-04-05 03:48:11 +0200 (Tue, 05 Apr
2011) | 12 lines
Added a long overdue warning for when people define a class and then
an object or vice versa in the repl.
scala> object Bippy { implicit val myImplicitsDontWork = 5 }
defined module Bippy
scala> trait Bippy { val x = "hello" }
defined trait Bippy
warning: previously defined object Bippy is not a companion to trait Bippy.
Companions must be defined together; you may wish to use :paste mode for this.
No review.
........
r24684 | extempore | 2011-04-05 03:48:31 +0200 (Tue, 05 Apr 2011) | 6 lines
Enhancing the repl-testing code by turning it into a transcript
producing machine. "Here's some code." "Here's a transcript!" "Good
day to you, sir!" "No, good day to YOU!"
These changes are awesome. Look at the checkfile diffs for god's sake,
they'll make you weep with joy. No review. ........ r24685 | rytz |
2011-04-05 09:50:41 +0200 (Tue, 05 Apr 2011) | 1 line
make natives test run on win64. no review
........
r24686 | rytz | 2011-04-05 09:54:41 +0200 (Tue, 05 Apr 2011) | 1 line
svn property: mark the dll as binary. no review.
........
r24687 | malayeri | 2011-04-05 10:36:32 +0200 (Tue, 05 Apr 2011) | 1 line
[scaladoc] Fix failing test. No review.
........
r24688 | odersky | 2011-04-05 14:19:10 +0200 (Tue, 05 Apr 2011) | 1 line
Fixes #4298, by correcting doc comment
........
r24689 | dragos | 2011-04-05 18:19:45 +0200 (Tue, 05 Apr 2011) | 3 lines
Wrapped exceptions coming from calls to 'ask' in a FailedException.
This allows to get a stack trace from both the presentation compiler
thread and the calling thread. review by odersky. ........ r24690 |
odersky | 2011-04-05 18:22:21 +0200 (Tue, 05 Apr 2011) | 1 line
better handling of on-same-thread calls.
........
r24691 | dragos | 2011-04-05 19:03:51 +0200 (Tue, 05 Apr 2011) | 1 line
Forgot a import in the last commit. no review.
........
r24692 | extempore | 2011-04-06 01:19:26 +0200 (Wed, 06 Apr 2011) | 3 lines
Some accumulated cleanups around the interpreter loop commands as I
attempt to make my way all the way to the promised land of documenting
it. No review. ........ r24693 | extempore | 2011-04-06 06:33:15 +0200
(Wed, 06 Apr 2011) | 1 line
Fixed an edge case setting crasher, no review.
........
r24694 | extempore | 2011-04-06 06:33:27 +0200 (Wed, 06 Apr 2011) | 3 lines
Fixed a failure output regression I introduced working around a
process bug. Unrolled the code I'd put in to work around the now-fixed
process bug. No review. ........ r24695 | extempore | 2011-04-06
06:33:46 +0200 (Wed, 06 Apr 2011) | 1 line
Misc cleanups and crash avoidance, no review.
........
r24696 | malayeri | 2011-04-06 16:23:25 +0200 (Wed, 06 Apr 2011) | 1 line
Set "synthetic" flag for methods $asInstanceOf and $isInstanceOf.
Closes #4368. No review. ........ r24697 | malayeri | 2011-04-06
16:24:30 +0200 (Wed, 06 Apr 2011) | 1 line
[scaladoc] Reduce horizontal lines in html output, refactor
Template.css to improve readability. No review. ........ r24698 |
malayeri | 2011-04-06 16:28:41 +0200 (Wed, 06 Apr 2011) | 1 line
Update documentation of MutableList. Closes #4397. No review. ........
r24699 | odersky | 2011-04-06 16:32:32 +0200 (Wed, 06 Apr 2011) | 1 line
More refinements to avoid deadlocks systematically when asking from
presentation compiler thread ........ r24700 | extempore | 2011-04-06
20:48:15 +0200 (Wed, 06 Apr 2011) | 3 lines
The beautification of repl pasting had the problem that the new
beautiful output was not itself pastable. Now I have achieved "paste
idempotence". No review. ........ r24701 | extempore | 2011-04-07
09:30:38 +0200 (Thu, 07 Apr 2011) | 2 lines
Clamping down on some more breakage which snuck into power mode. I
really need some power tests. No review. ........ r24702 | extempore |
2011-04-07 09:31:02 +0200 (Thu, 07 Apr 2011) | 9 lines
Deleted SourcelessComments. Created source files for Any, AnyRef,
Nothing and Null with improved documentation of their particulars
and convinced scaladoc to parse them without leaving scalac
institutionalized. Now rather than seeing our hardcoded documentation
strings bitrot in a shadowy flight from classes which do not exist, we
are championing the cause of the innocent and powerless. Nothing and
Null aren't above the law!
So now any responsible party can fire up their text editor and go
to town on Nothing.scala. As I'm sure they will. Review by malayeri.
........ r24703 | extempore | 2011-04-07 09:31:14 +0200 (Thu, 07 Apr
2011) | 2 lines
Added a comment to Dynamic sharing that if you don't supply mr.
-Xexperimental, it won't work. No review. ........ r24704 | malayeri |
2011-04-07 15:34:14 +0200 (Thu, 07 Apr 2011) | 1 line
[scaladoc] Make links to classes and traits not be the entire line,
but just the template name. Closes #4444. No review. ........ r24705 |
malayeri | 2011-04-07 16:03:49 +0200 (Thu, 07 Apr 2011) | 1 line
[scaladoc] Don't generate an attributes block if its contents are
empty. No review. ........ r24706 | odersky | 2011-04-07 16:30:56 +0200
(Thu, 07 Apr 2011) | 1 line
Fixes #2808 without redefining what override means. Review by
extempore. ........ r24708 | extempore | 2011-04-07 19:43:41 +0200 (Thu,
07 Apr 2011) | 10 lines
Made power mode more configurable. Don't think of this as the
long-term configuration answer, but what I have any chance of doing
before 2.9 ships.
// file to interpret when entering power mode instead of default
-Dscala.repl.power.initcode=/path/to/file // file holding banner to
display instead of default -Dscala.repl.power.banner=/path/to/file
No review.
........
r24709 | magarcia | 2011-04-08 13:38:48 +0200 (Fri, 08 Apr 2011) | 1 line
[MSIL] handling of volatile fields. review by rytz. ........ r24710 |
malayeri | 2011-04-08 16:26:22 +0200 (Fri, 08 Apr 2011) | 1 line
[scaladoc] Separate sections for "linear supertype" and "known
subclasses" using patch provided by Ruediger Keller. Closes #4456.
Closes #4304. ........ r24711 | malayeri | 2011-04-08 17:10:32 +0200
(Fri, 08 Apr 2011) | 1 line
[scaladoc] Don't generate long comments if they are the same as the
short comment. Closes #4455. No review. ........ r24712 | odersky |
2011-04-08 18:31:26 +0200 (Fri, 08 Apr 2011) | 1 line
Closes #4431. Review by extempore.
........
r24713 | extempore | 2011-04-08 18:42:18 +0200 (Fri, 08 Apr 2011) | 2 lines
Factoring the imports related code out of the main Interpreter class,
no review. ........ r24714 | extempore | 2011-04-08 18:42:38 +0200 (Fri,
08 Apr 2011) | 1 line
Added :imports command, no review.
........
r24715 | extempore | 2011-04-10 04:17:28 +0200 (Sun, 10 Apr 2011) | 1 line
Made the reading of y/n a little more robust. No review. ........
r24716 | extempore | 2011-04-10 04:18:08 +0200 (Sun, 10 Apr 2011) | 2
lines
More fun with xml and elements not appearing equal. Closes #4387, no
review. ........ r24717 | extempore | 2011-04-10 04:18:32 +0200 (Sun, 10
Apr 2011) | 2 lines
Changed scala.io.Position into something other than a fixed object
which throws exceptions when the position overflows. Closes #4382, no
review. ........ r24719 | extempore | 2011-04-11 05:04:47 +0200 (Mon, 11
Apr 2011) | 2 lines
Improving the repl help infrastructure, and made the :wrap command
more robust. No review. ........ r24720 | extempore | 2011-04-11
07:01:17 +0200 (Mon, 11 Apr 2011) | 4 lines
Found there was still all kinds of detritus remaining from the
deceased IMPLICITMETHODtpe and ImplicitMethodType. Applied wrecking
ball, review by moors. (Can I do the same thing with DEBRUIJNINDEXtpe
and DeBruijnIndex?) ........ r24721 | eugenevigdorchik | 2011-04-11
08:42:47 +0200 (Mon, 11 Apr 2011) | 1 line
Tighten the visibility of interactive.Global. No review. ........
r24722 | odersky | 2011-04-11 09:01:55 +0200 (Mon, 11 Apr 2011) | 1 line
Closes #4396. No review.
........
r24723 | odersky | 2011-04-11 10:53:51 +0200 (Mon, 11 Apr 2011) | 1 line
Closes #4380. No review.
........
r24724 | odersky | 2011-04-11 10:56:57 +0200 (Mon, 11 Apr 2011) | 1 line
Deleted debug output that made it into previous commit. ........
Diffstat (limited to 'test/scaladoc')
-rw-r--r-- | test/scaladoc/resources/Trac3484.scala | 27 | ||||
-rw-r--r-- | test/scaladoc/resources/Trac4180.scala | 4 | ||||
-rw-r--r-- | test/scaladoc/resources/Trac4289.scala | 13 | ||||
-rw-r--r-- | test/scaladoc/resources/Trac4325.scala | 5 | ||||
-rw-r--r-- | test/scaladoc/resources/Trac4358.scala | 8 | ||||
-rw-r--r-- | test/scaladoc/resources/Trac4372.scala | 5 | ||||
-rw-r--r-- | test/scaladoc/resources/Trac4374.scala | 5 | ||||
-rw-r--r-- | test/scaladoc/resources/Trac4409.scala | 14 | ||||
-rw-r--r-- | test/scaladoc/resources/Trac4420.scala | 14 | ||||
-rw-r--r-- | test/scaladoc/resources/Trac484.scala | 18 | ||||
-rw-r--r-- | test/scaladoc/scala/html/HtmlFactoryTest.scala | 246 | ||||
-rw-r--r-- | test/scaladoc/scala/model/CommentFactoryTest.scala | 43 |
12 files changed, 342 insertions, 60 deletions
diff --git a/test/scaladoc/resources/Trac3484.scala b/test/scaladoc/resources/Trac3484.scala new file mode 100644 index 0000000000..9656ec268d --- /dev/null +++ b/test/scaladoc/resources/Trac3484.scala @@ -0,0 +1,27 @@ +class cbf[A, B, C] + +/** + * @define Coll Traversable + * @define bfreturn $Coll + */ +class Collection[A] { + /** What map does... + * + * $bfreturn + * @usecase def map[B](f: A => B): $bfreturn[B] + * + */ + def map[B, That](f: A => B)(implicit fact: cbf[Collection[A], B, That]) = + null +} + +/** + * @define b John + * @define a Mister $b + */ +class SR704 { + /** + * Hello $a. + */ + def foo = 123 +} diff --git a/test/scaladoc/resources/Trac4180.scala b/test/scaladoc/resources/Trac4180.scala new file mode 100644 index 0000000000..3d6922803b --- /dev/null +++ b/test/scaladoc/resources/Trac4180.scala @@ -0,0 +1,4 @@ +trait Trac4180 { + type A + object A +} diff --git a/test/scaladoc/resources/Trac4289.scala b/test/scaladoc/resources/Trac4289.scala new file mode 100644 index 0000000000..1644e18bd4 --- /dev/null +++ b/test/scaladoc/resources/Trac4289.scala @@ -0,0 +1,13 @@ +class Superclass { + /** + * @return 123 + */ + def foo = 123 +} + +class Subclass extends Superclass { + /** + * hello + */ + override def foo = 456 +} diff --git a/test/scaladoc/resources/Trac4325.scala b/test/scaladoc/resources/Trac4325.scala new file mode 100644 index 0000000000..ffb968d571 --- /dev/null +++ b/test/scaladoc/resources/Trac4325.scala @@ -0,0 +1,5 @@ +case class WithSynthetic + +case class WithObject +object WithObject + diff --git a/test/scaladoc/resources/Trac4358.scala b/test/scaladoc/resources/Trac4358.scala new file mode 100644 index 0000000000..961c82160e --- /dev/null +++ b/test/scaladoc/resources/Trac4358.scala @@ -0,0 +1,8 @@ +trait Trac4358 { + /** + * Implicit conversion that invokes the <code>expect</code> method on the <code>EasyMock</code> companion object (<em>i.e.</em>, the + * static <code>expect</code> method in Java class <code>org.easymock.EasyMock</code>). + * + */ + val foo = 123 +} diff --git a/test/scaladoc/resources/Trac4372.scala b/test/scaladoc/resources/Trac4372.scala new file mode 100644 index 0000000000..03da659eee --- /dev/null +++ b/test/scaladoc/resources/Trac4372.scala @@ -0,0 +1,5 @@ +class Trac4372 { + def method(n: Int) = n + def +:(n: Int) = n + val -: = 1 +} diff --git a/test/scaladoc/resources/Trac4374.scala b/test/scaladoc/resources/Trac4374.scala new file mode 100644 index 0000000000..4dd8ba2ae8 --- /dev/null +++ b/test/scaladoc/resources/Trac4374.scala @@ -0,0 +1,5 @@ +class WithPublic +object WithPublic + +class WithPrivate +private object WithPrivate diff --git a/test/scaladoc/resources/Trac4409.scala b/test/scaladoc/resources/Trac4409.scala new file mode 100644 index 0000000000..f93d3e238e --- /dev/null +++ b/test/scaladoc/resources/Trac4409.scala @@ -0,0 +1,14 @@ +/** + * @define xxx + * + * The value of xxx don't contain since tag. + * + * @since 1.0 + */ + +class Trac4409 { + /** + * $xxx + */ + def foo = 123 +} diff --git a/test/scaladoc/resources/Trac4420.scala b/test/scaladoc/resources/Trac4420.scala new file mode 100644 index 0000000000..dbe053f3da --- /dev/null +++ b/test/scaladoc/resources/Trac4420.scala @@ -0,0 +1,14 @@ +import java.io.File + +/** + * @define PP This class is an instance of XXX so it's members are not called directly. + * Instead these classes are instantiated via a driver's ''process''. See YYY for more details. */ +abstract class test + +/** + * TestA class + * + * this is a description. + * + * $PP */ +class TestA extends test diff --git a/test/scaladoc/resources/Trac484.scala b/test/scaladoc/resources/Trac484.scala new file mode 100644 index 0000000000..b4f81ae172 --- /dev/null +++ b/test/scaladoc/resources/Trac484.scala @@ -0,0 +1,18 @@ +class RefinementAndExistentials { + type Foo = { + type Dingus + def bippy(x: Int): String + def dingus(): String + } + type Bar = { + type Dingus <: T forSome { type T <: String } + } + def f(x: Foo) = 51 + def g(x: T forSome { type T <: String }) = x + def h(x: Float): { def quux(x: Int, y: Int): Int } = new { + def quux(x: Int, y: Int) = 55 + } + def hh(x: Float) = new { def quux(x: Int, y: Int) = 55 } + def j(x: Int): Bar = sys.error("") + def k(): AnyRef { type Dingus <: T forSome { type T <: String } } = sys.error("") +} diff --git a/test/scaladoc/scala/html/HtmlFactoryTest.scala b/test/scaladoc/scala/html/HtmlFactoryTest.scala index ecdbb3cf46..c0a3f1ad95 100644 --- a/test/scaladoc/scala/html/HtmlFactoryTest.scala +++ b/test/scaladoc/scala/html/HtmlFactoryTest.scala @@ -18,23 +18,6 @@ object XMLUtil { case _ => seq } } - - def attributeIs(key: String, value: String) = { - (element: Node) => { - element.attribute(key) match { - case Some(v) => - v.toString == value - case _ => - false - } - } - } - - def textIs(value: String) = { - (node: Node) => { - node.descendant.exists((n) => n.toString.trim == value) - } - } } object Test extends Properties("HtmlFactory") { @@ -52,18 +35,18 @@ object Test extends Properties("HtmlFactory") { (paths ++ morepaths).mkString(java.io.File.pathSeparator) } - def createTemplates(basename: String) = { - val result = scala.collection.mutable.Map[String, scala.xml.NodeSeq]() + def createFactory = { + val settings = new Settings({Console.err.println(_)}) + settings.classpath.value = getClasspath - val factory = { - val settings = new Settings({Console.err.println(_)}) - settings.classpath.value = getClasspath + val reporter = new scala.tools.nsc.reporters.ConsoleReporter(settings) + new DocFactory(reporter, settings) + } - val reporter = new scala.tools.nsc.reporters.ConsoleReporter(settings) - new DocFactory(reporter, settings) - } + def createTemplates(basename: String) = { + val result = scala.collection.mutable.Map[String, scala.xml.NodeSeq]() - factory.makeUniverse(List("test/scaladoc/resources/"+basename)) match { + createFactory.makeUniverse(List("test/scaladoc/resources/"+basename)) match { case Some(universe) => { val index = IndexModelFactory.makeIndex(universe) (new HtmlFactory(universe, index)).writeTemplates((page) => { @@ -76,19 +59,30 @@ object Test extends Properties("HtmlFactory") { result } - property("Trac #3790") = { - import XMLUtil._ + def createTemplate(scala: String) = { + val html = scala.stripSuffix(".scala") + ".html" + createTemplates(scala)(html) + } - val files = createTemplates("Trac3790.scala") - files("Trac3790.html") match { + def shortComments(root: scala.xml.Node) = + XMLUtil.stripGroup(root).descendant.flatMap { + case e: scala.xml.Elem => { + if (e.attribute("class").toString.contains("shortcomment")) { + Some(e) + } else { + None + } + } + case _ => None + } + + property("Trac #3790") = { + createTemplate("Trac3790.scala") match { case node: scala.xml.Node => { - val comments = (stripGroup(node) \\ "div").flatMap { - case e: scala.xml.Elem => Some(e) - case _ => None - }.filter { attributeIs("class", "fullcomment")(_) } + val comments = shortComments(node) - comments.filter(textIs("A lazy String")(_)).length == 1 && - comments.filter(textIs("A non-lazy String")(_)).length == 1 + comments.exists { _.toString.contains(">A lazy String\n</p>") } && + comments.exists { _.toString.contains(">A non-lazy String\n</p>") } } case _ => false } @@ -100,28 +94,176 @@ object Test extends Properties("HtmlFactory") { } property("Trac #4366") = { - val files = createTemplates("Trac4366.scala") - files("Trac4366.html") match { + createTemplate("Trac4366.scala") match { case node: scala.xml.Node => { - val comments = XMLUtil.stripGroup(node).descendant.flatMap { - case e: scala.xml.Elem => { - if (e.attribute("class").toString.contains("shortcomment")) { - Some(e) - } else { - None - } - } - case _ => None + shortComments(node).exists { n => { + val str = n.toString + str.contains("<code>foo</code>") && str.contains("</strong>") + } } + } + case _ => false + } + } + + property("Trac #4358") = { + createTemplate("Trac4358.scala") match { + case node: scala.xml.Node => + ! shortComments(node).exists { + _.toString.contains("<em>i.</em>") } + case _ => false + } + } + + property("Trac #4180") = { + createTemplate("Trac4180.scala") != None + } - comments.exists { - (e) => { - val s = e.toString - s.contains("<code>foo</code>") && s.contains("</strong>") - } + property("Trac #4372") = { + createTemplate("Trac4372.scala") match { + case node: scala.xml.Node => { + val html = node.toString + html.contains("<span class=\"name\">+:</span>\n") && + html.contains("<span class=\"name\">-:</span>\n") && + html.contains("""<span class="params">(<span name="n">n: <span name="scala.Int" class="extype">Int</span></span>)</span><span class="result">: <span name="scala.Int" class="extype">Int</span></span>""") + } + case _ => false + } + } + + property("Trac #4374 - public") = { + val files = createTemplates("Trac4374.scala") + files("WithPublic.html") match { + case node: scala.xml.Node => { + val s = node.toString + s.contains("""href="WithPublic$.html"""") && + files.get("WithPublic$.html") != None + } + case _ => false + } + } + + property("Trac #4374 - private") = { + val files = createTemplates("Trac4374.scala") + files("WithPrivate.html") match { + case node: scala.xml.Node => { + val s = node.toString + ! s.contains("""href="WithPrivate$.html"""") && + files.get("WithPrivate$.html") == None + } + case _ => false + } + } + + property("Trac #3484") = { + val files = createTemplates("Trac3484.scala") + + files("Collection.html") match { + case node: scala.xml.Node => { + val s = node.toString + s.contains("""<span class="result">: Traversable[B]</span>""") + } + case _ => false + } + } + + property("Trac #3484 - SR704") = { + val files = createTemplates("Trac3484.scala") + + files("SR704.html") match { + case node: scala.xml.Node => { + val s = node.toString + s.contains("Hello Mister John.") + } + case _ => false + } + } + + property("Trac #4325 - files") = { + val files = createTemplates("Trac4325.scala") + + files.get("WithSynthetic.html") != None && + files.get("WithSynthetic$.html") == None && + files.get("WithObject.html") != None && + files.get("WithObject$.html") != None + } + + property("Trac #4325 - Don't link to syntetic companion") = { + val files = createTemplates("Trac4325.scala") + + files("WithSynthetic.html") match { + case node: scala.xml.Node => { + val s = node.toString + ! s.contains("""href="WithSynthetic$.html"""") + } + case _ => false + } + } + + property("Trac #4325 - Link to companion") = { + val files = createTemplates("Trac4325.scala") + + files("WithObject.html") match { + case node: scala.xml.Node => { + val s = node.toString + s.contains("""href="WithObject$.html"""") + } + case _ => false + } + } + + property("Trac #4420 - no whitespace at end of line") = { + val files = createTemplates("Trac4420.scala") + + files("TestA.html") match { + case node: scala.xml.Node => { + val s = node.toString + s.contains("""See YYY for more details""") + } + case _ => false + } + } + + property("Trac #484 - refinements and existentials") = { + val files = createTemplates("Trac484.scala") + val lines = """ + |type Bar = AnyRef { type Dingus <: T forSome { type T <: String } } + |type Foo = AnyRef { ... /* 3 definitions in type refinement */ } + |def g (x: T forSome { type T <: String }): String + |def h (x: Float): AnyRef { def quux(x: Int,y: Int): Int } + |def hh (x: Float): AnyRef { def quux(x: Int,y: Int): Int } + |def j (x: Int): Bar + |def k (): AnyRef { type Dingus <: T forSome { type T <: String } } + """.stripMargin.trim.lines map (_.trim) + + files("RefinementAndExistentials.html") match { + case node: scala.xml.Node => { + val s = node.text.replaceAll("\\s+", " ") + lines forall (s contains _) + } + case _ => false + } + } + + property("Trac #4289") = { + val files = createTemplates("Trac4289.scala") + + files("Subclass.html") match { + case node: scala.xml.Node => { + node.toString.contains { + """<dt>returns</dt><dd class="cmt"><p>123</p></dd>""" } } case _ => false } } + + property("Trac #4409") = { + createTemplate("Trac4409.scala") match { + case node: scala.xml.Node => { + ! node.toString.contains("""<div class="block"><ol>since""") + } + case _ => false + } + } } diff --git a/test/scaladoc/scala/model/CommentFactoryTest.scala b/test/scaladoc/scala/model/CommentFactoryTest.scala index 25a91b1fa2..9f60d2a1b7 100644 --- a/test/scaladoc/scala/model/CommentFactoryTest.scala +++ b/test/scaladoc/scala/model/CommentFactoryTest.scala @@ -92,11 +92,9 @@ object Test extends Properties("CommentFactory") { * */""", Chain(List(Text(""), Text("\n"), - HtmlTag("<pre>"), Text("\n"), - Text("hello "), Chain(List(Text("^"), - Chain(List(Text("world"), - Text("\n"), - HtmlTag("</pre>"))))))) + + + HtmlTag("<pre>\nhello ^world\n</pre>"))) ) property("Trac #4366 - body") = { @@ -109,8 +107,7 @@ object Test extends Properties("CommentFactory") { ) body == Body(List(Paragraph(Chain(List( - Summary(Chain(List(Chain(List(HtmlTag("<strong>"), HtmlTag("<code>foo</code>"), Text(" has been deprecated and will be removed in a future version"))), Text(".")))), - Chain(List(Text(" Please call "), HtmlTag("<code>bar</code>"), Text(" instead."), HtmlTag("</strong>"), Text("\n"), Text(""))) + Summary(Chain(List(HtmlTag("<strong><code>foo</code> has been deprecated and will be removed in a future version. Please call <code>bar</code> instead.</strong>"), Text("\n"), Text("")))) ))))) } @@ -122,7 +119,37 @@ object Test extends Properties("CommentFactory") { */ """ ) + body.summary == Some(Chain(List(HtmlTag("<strong><code>foo</code> has been deprecated and will be removed in a future version. Please call <code>bar</code> instead.</strong>"), Text("\n"), Text("")))) + } - body.summary == Some(Chain(List(Chain(List(HtmlTag("<strong>"), HtmlTag("<code>foo</code>"), Text(" has been deprecated and will be removed in a future version"))), Text(".")))) + property("Trac #4358 - body") = { + factory.createBody( + """ + /** + * Implicit conversion that invokes the <code>expect</code> method on the <code>EasyMock</code> companion object (<em>i.e.</em>, the + * static <code>expect</code> method in Java class <code>org.easymock.EasyMock</code>). + */ + """ + ) match { + case Body(List(Paragraph(Chain(List(Summary(Chain(List(Chain(List( + Text("Implicit conversion that invokes the "), + HtmlTag("<code>expect</code>"), + Text(" method on the "), + HtmlTag("<code>EasyMock</code>"), + Text(" companion object ("), + HtmlTag("<em>i.e.</em>"), + Text(", the\nstatic "), + HtmlTag("<code>expect</code>"), + Text(" method in Java class "), + HtmlTag("<code>org.easymock.EasyMock</code>"), + Text(")") + )), Text(".")))), Text("\n")))))) => + true + case other => { + println(other) + false + } + } } + } |