| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The reset and replay commands take arbitrary command line args.
When settings args are supplied, the compiler is recreated.
For uniformity, the settings command performs only the usual
arg parsing: use -flag:true instead of +flag, and clearing a
setting is promoted to the command line, so that -Xlint: is not
an error but clears the flags.
```
scala> maqicode.Test main null
<console>:8: error: not found: value maqicode
maqicode.Test main null
^
scala> :reset -classpath/a target/scala-2.11/sample_2.11-1.0.jar
Resetting interpreter state.
Forgetting all expression results and named terms: $intp
scala> maqicode.Test main null
Hello, world.
scala> val i = 42
i: Int = 42
scala> s"$i is the loneliest numbah."
res1: String = 42 is the loneliest numbah.
scala> :replay -classpath ""
Replaying: maqicode.Test main null
Hello, world.
Replaying: val i = 42
i: Int = 42
Replaying: s"$i is the loneliest numbah."
res1: String = 42 is the loneliest numbah.
scala> :replay -classpath/a ""
Replaying: maqicode.Test main null
<console>:8: error: not found: value maqicode
maqicode.Test main null
^
Replaying: val i = 42
i: Int = 42
Replaying: s"$i is the loneliest numbah."
res1: String = 42 is the loneliest numbah.
```
Clearing a clearable setting:
```
scala> :reset -Xlint:missing-interpolator
Resetting interpreter state.
scala> { val i = 42 ; "$i is the loneliest numbah." }
<console>:8: warning: possible missing interpolator: detected interpolated identifier `$i`
{ val i = 42 ; "$i is the loneliest numbah." }
^
res0: String = $i is the loneliest numbah.
scala> :reset -Xlint:
Resetting interpreter state.
Forgetting this session history:
{ val i = 42 ; "$i is the loneliest numbah." }
scala> { val i = 42 ; "$i is the loneliest numbah." }
res0: String = $i is the loneliest numbah.
```
|
|
|
|
|
| |
All those old-timey methods whose melodies have become
unfashionable.
|
|
|
|
| |
This reverts commit 951fc3a486.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I want to get this commit into the history because
the tests pass here, which demonstrates that every commented
out method is not only unnecessary internally but has zero
test coverage. Since I know (based on the occasional source
code comment, or more often based on knowing something about
other source bases) that some of these can't be removed
without breaking other things, I want to at least record
a snapshot of the identities of all these unused and
untested methods.
This commit will be reverted; then there will be another
commit which removes the subset of these methods which I
believe to be removable. The remainder are in great need of
tests which exercise the interfaces upon which other
repositories depend.
|
|
|
|
|
|
| |
If x startsWith "-" it seems unlikely that x == "".
Free with purchase: test case with 100 argument permutations.
That's only a smidgen shy of infinity.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These things are killing me. Constructions like
package scala.foo.bar.baz
import foo.Other
DO NOT WORK in general. Such files are not really in the
"scala" package, because it is not declared
package scala
package foo.bar.baz
And there is a second problem: using a relative path name means
compilation will fail in the presence of a directory of the same
name, e.g.
% mkdir reflect
% scalac src/reflect/scala/reflect/internal/util/Position.scala
src/reflect/scala/reflect/internal/util/Position.scala:9: error:
object ClassTag is not a member of package reflect
import reflect.ClassTag
^
src/reflect/scala/reflect/internal/util/Position.scala:10: error:
object base is not a member of package reflect
import reflect.base.Attachments
^
As a rule, do not use relative package paths unless you have
explicitly imported the path to which you think you are relative.
Better yet, don't use them at all. Unfortunately they mostly work
because scala variously thinks everything scala.* is in the scala
package and/or because you usually aren't bootstrapping and it
falls through to an existing version of the class already on the
classpath.
Making the paths explicit is not a complete solution -
in particular, we remain enormously vulnerable to any directory
or package called "scala" which isn't ours - but it greatly
limts the severity of the problem.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are the regexp replacements performed:
Sxcala
-> Scala
Copyright (\d*) LAMP/EPFL
-> Copyright $1-2012 LAMP/EPFL
Copyright (\d*)-(\d*)(,?) LAMP/EPFL
-> Copyright $1-2012 LAMP/EPFL
Copyright (\d*)-(\d*) Scala Solutions and LAMP/EPFL
-> Copyright $1-2012 Scala Solutions and LAMP/EPFL
\(C\) (\d*)-(\d*) LAMP/EPFL
-> (C) $1-2012 LAMP/EPFL
Copyright \(c\) (\d*)-(\d*)(.*?)EPFL
-> Copyright (c) $1-2012$3EPFL
The last one was needed for two HTML-ified copyright notices.
Here's the summarized diff:
Created using
```
git diff -w | grep ^- | sort | uniq | mate
git diff -w | grep ^+ | sort | uniq | mate
```
```
- <div id="footer">Scala programming documentation. Copyright (c) 2003-2011 <a href="http://www.epfl.ch" target="_top">EPFL</a>, with contributions from <a href="http://typesafe.com" target="_top">Typesafe</a>.</div>
- copyright.string=Copyright 2002-2011, LAMP/EPFL
- <meta name="Copyright" content="(C) 2002-2011 LAMP/EPFL"/>
- * Copyright 2002-2011 LAMP/EPFL
- * Copyright 2004-2011 LAMP/EPFL
- * Copyright 2005 LAMP/EPFL
- * Copyright 2005-2011 LAMP/EPFL
- * Copyright 2006-2011 LAMP/EPFL
- * Copyright 2007 LAMP/EPFL
- * Copyright 2007-2011 LAMP/EPFL
- * Copyright 2009-2011 Scala Solutions and LAMP/EPFL
- * Copyright 2009-2011 Scxala Solutions and LAMP/EPFL
- * Copyright 2010-2011 LAMP/EPFL
- * Copyright 2012 LAMP/EPFL
-# Copyright 2002-2011, LAMP/EPFL
-* Copyright 2005-2011 LAMP/EPFL
-/* NSC -- new Scala compiler -- Copyright 2007-2011 LAMP/EPFL */
-rem # Copyright 2002-2011, LAMP/EPFL
```
```
+ <div id="footer">Scala programming documentation. Copyright (c) 2003-2012 <a href="http://www.epfl.ch" target="_top">EPFL</a>, with contributions from <a href="http://typesafe.com" target="_top">Typesafe</a>.</div>
+ copyright.string=Copyright 2002-2012 LAMP/EPFL
+ <meta name="Copyright" content="(C) 2002-2012 LAMP/EPFL"/>
+ * Copyright 2002-2012 LAMP/EPFL
+ * Copyright 2004-2012 LAMP/EPFL
+ * Copyright 2005-2012 LAMP/EPFL
+ * Copyright 2006-2012 LAMP/EPFL
+ * Copyright 2007-2012 LAMP/EPFL
+ * Copyright 2009-2012 Scala Solutions and LAMP/EPFL
+ * Copyright 2010-2012 LAMP/EPFL
+ * Copyright 2011-2012 LAMP/EPFL
+# Copyright 2002-2012 LAMP/EPFL
+* Copyright 2005-2012 LAMP/EPFL
+/* NSC -- new Scala compiler -- Copyright 2007-2012 LAMP/EPFL */
+rem # Copyright 2002-2012 LAMP/EPFL
```
|
| |
|
|
|
|
|
| |
A couple low impact cleanups/optimizations, no review.
|
|
|
|
|
|
|
| |
Renamed scala.reflect.common to scala.reflect.internal to better
emphasize that it is not API. (The brush was overly broad, and some
files now need to be rescued from being internal.) No review.
|
|
|
|
|
|
| |
And the remainder of the scala.reflect refactoring (think of it like a
"balloon payment") no review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Undoing some much too hacky code to implement a -jar option and then
following wherever that led me. Tangible results include:
* much beautified scala -help, including documenting some things
never before documented in this plane of existence
* an improved Jar abstraction
* further systemization of system properties
In addition, the jars created by -savecompiled are given the right
manifest so the jar is runnable. That means you can:
scala -savecompiled bippy.scala arg1 arg2
scala -jar bippy.scala.jar arg1 arg2
And both lines should yield the same result. No review.
|
|
|
|
|
| |
Partial revert of r24325; tryToSetFromPropertyValue is used by Eclipse.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
default. The -toolcp option now works. -D and -J options are passed
as arguments to the runner program as well as to the underlying JVM,
because they may be needed for such things as fsc talking to a server
compiler. Added a new Settings type for -D and -J options. Deleted some
dead settings code.
There are dummy settings for -toolcp and -nobootcp so they can be seen
in the help output, which needs a big cleanup.
No review.
|
|
|
|
|
|
|
|
|
| |
Created invisible setting to expose empty package members outside of the
empty package, so the repl can use packages without going blind to the
empty package. This commit also eliminates a deadlock which hits when
the compiler starts logging before a lazy val has pulled its head from
the noose. Closes #4228, review by odersky.
|
|
|
|
|
|
|
|
|
| |
for me anyway, with this commit scripts will occasionally reuse a
compiler instance, instead of never. Since any tests I write will fail
on platforms which aren't mine, there are no tests. I might have to
start a platform-specific testing area to break some ice around these
huge untested zones. No review.
|
| |
|
|
|
|
|
|
|
|
| |
Cleaned up and brought up to date the help text for -X and -Y options.
Made some enhancements to PhasesSetting, which are documented if you
run scalac -X or -Y. (Try it!) Disabled some dead settings and renamed
others to reflect their current purpose. No review.
|
|
|
|
|
|
|
|
| |
way it was, but this is the obvious fix for now. Review by odersky
(perhaps you could point out where my logic fails, in that I expected
the concrete return type of withHelpSyntax to contain a setter for
value.)
|
|
|
|
|
|
| |
Tweaked help output a little further so -Y isn't visible except to those
who consider themselves advanced. No review.
|
|
|
|
|
|
| |
Remedied accidental obscuring of -X, -Y, and -P in the standard help
output. No review.
|
|
|
|
|
|
| |
More support code for the big partest patch I'm working on to finally
finish classpaths for good. No review.
|
| |
|
|
|
|
|
|
| |
More progress toward immutable Settings, and various cleanups
encountered along the way. No review.
|
|
One minute too many trying to figure out where some partest classpath
mutation was disappearing on me, and I snapped and started the process
of creating an immutable Settings. This commit is for the most part
infrastructure to enable its smooth and uneventful entrance. Review by
community.
|