| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Include 828a892 Merge pull request #5753
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`scala.color` now has 3 states: `true`, `false` and `auto`
(the default). `auto` allows colors if not on windows and if the shell
is interactive (as in, both stdin and stdout are a tty).
The autodetect works as expected when run via SBT too, and it can always
be overriden on the CLI or via JAVA_OPTS.
|
| |
| |
| |
| |
| |
| | |
This reverts commit 656162bb48fbbd703790a2c94d4563e40ddfdfc2.
Adding new APIs is not possible until a major release.
|
|\ \
| | |
| | | |
SI-9750 scala.util.Properties.isJavaAtLeast works with JDK9
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Don't assume spec is just major, but allow arbitrary version
number for both spec value and user value to check.
Only the first three dot-separated fields are considered,
after skipping optional leading value "1" in legacy format.
Minimal validity checks of user arg are applied. Leading three
fields, if present, must be number values, but subsequent
fields are ignored.
Note that a version number is not a version string, which
optionally includes pre and build info, `9-ea+109`.
|
| | |
| | |
| | |
| | |
| | | |
A good opportunity to simplify the API. Versions are strings,
but a spec version is just a number.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Leaves the error string as is, but adds test to show how it looks.
Java calls it a version number. `Not a version: 1.9`.
Don't strip `1.` prefix recursively. (That was Snytt's fault.)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The utility method compares javaSpecVersion, which has the
form "1.8" previously and "9" going forward.
The method accepts "1.n" for n < 9. More correctly, the string
argument should be a single number.
Supports JEP-223.
|
|/ /
| |
| |
| | |
Also consistently use "LAMP/EPFL" and not "EPFL LAMP".
|
| | |
|
|\ \
| |/
|/| |
Added Properties.isLinux to compliment the isWin and isMac methods
|
| | |
|
|/ |
|
|
|
|
|
|
|
| |
a little piece of #4644 I missed. fixes this:
% scala -version
Scala code runner version 2.11.7 -- Copyright 2002-2013, LAMP/EPFL
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, if we wanted to override the shell.prompt property, we had
to modify compiler.properties in the jar. This change lets us do the
following, instead:
scala -Dscala.shell.prompt="$(echo -e "\npuffnfresh> ")"
All properties previously loaded from compiler.properties now fall back
to "scala." in the system properties when not found.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes all first sentences of library functions which
contain `i.e.` or `e.g.` and adds a `,` to prevent that the scaladoc
summary sentence is cut after this abbreviation.
This is possible as pull/3824 fixed how Scaladoc parses the first
sentence of a method description into a sumary sentence(now the first
sentence has to end with a dot followed by whitespace).
Only docs in the core library are changed (src/library/**/*.scala)
and only if they occur in the first sentence.
Review by @heathermiller
(cherry picked from commit 72721ff5dd06dea1235ecb71acae0bd61aee4814)
|
|
|
|
|
|
|
|
|
|
|
| |
And the Scala runner exits with 0 for info settings.
Producing the version string is consolidated.
The compiler driver uses the default settings hook to
short-circuit on -version. That's to avoid creating
the compiler; really it should check shouldStopWithInfo
first, as the runner does.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One last flurry with the broom before I leave you slobs to code
in your own filth. Eliminated all the trailing whitespace I
could manage, with special prejudice reserved for the test cases
which depended on the preservation of trailing whitespace.
Was reminded I cannot figure out how to eliminate the trailing
space on the "scala> " prompt in repl transcripts. At least
reduced the number of such empty prompts by trimming transcript
code on the way in.
Routed ConsoleReporter's "printMessage" through a trailing
whitespace stripping method which might help futureproof
against the future of whitespace diseases. Deleted the up-to-40
lines of trailing whitespace found in various library files.
It seems like only yesterday we performed whitespace surgery
on the whole repo. Clearly it doesn't stick very well. I suggest
it would work better to enforce a few requirements on the way in.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make this and related properties public, because they
are useful.
This change ought to have been committed at 2.11 and then
backported with restrictions, rather than vice-versa.
Note that they are defined in the order, version, vendor
and name, which is the order from the underlying javadoc.
It would be a neat feature of the PR validator, as previously
imagined, to run a "pending" test and then, on success and
merge, to move it automatically to the canonical suite.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
bincompat-backward.whitelist.conf
bincompat-forward.whitelist.conf
src/compiler/scala/reflect/reify/phases/Reshape.scala
src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
src/compiler/scala/tools/nsc/transform/Mixin.scala
src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/library/scala/concurrent/impl/Promise.scala
src/reflect/scala/reflect/internal/StdAttachments.scala
test/files/neg/macro-override-macro-overrides-abstract-method-b.check
test/files/run/t7569.check
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The test for isJavaAtLeast uses the specification.version.
The method argument must have the form "major.minor".
The scaladoc is updated to reflect the new reality and a
test is added under junit.
Note that this implementation aims to be a simple
compromise between the functional and imperative camps,
that is, to be free of both closures and while loops.
And to elicit no cruft like regexes and wrappers for strings.
No doubt even more could be done in this department, but we
don't wish to spoil the fun on codegolf.stackexchange.com.
However, we might decide to sponsor a new site:
codereviewpingpong.com
For 2.10.x, javaSpecVersion is provided as a private member.
The active test is under `run` and the `junit` test must
bide its time in `pending`.
For 2.11, the private members can be public and the app test
replaced with the unit test.
|
| |
| |
| |
| |
| | |
... so that the different results of the test on Avian
can be specified in the check file.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* pr/merge-2.10.2:
SI-7375 ClassTag for value class aliases
SI-7507 Fix lookup of private[this] member in presence of self type.
SI-7532 Fix regression in Java inner classfile reader
SI-7517 Fix higher kinded type inference regression
SI-7516 Revert "SI-7234 Make named args play nice w. depmet types"
A test case for a recent LUB progression.
SI-7421 remove unneeded extra-attachement in maven deploy
SI-7486 Regressions in implicit search.
SI-7509 Avoid crasher as erronous args flow through NamesDefaults
SI-6138 Centralize and refine detection of `getClass` calls
SI-7497 Fix scala.util.Properties.isMac
SI-7473 Bad for expr crashes postfix
Increase build.number to 2.10.3
SI-7391 Always use ForkJoin in Scala actors on ... ... Java 6 and above (except when the porperty actors.enableForkJoin says otherwise)
Reimplementing much of the DefaultPromise methods Optimizations: 1) Avoiding to call 'synchronized' in tryComplete and in tryAwait 2) Implementing blocking by using an optimized latch so no blocking ops for non-blockers 3) Reducing method size of isCompleted to be cheaper to inline 4) 'result' to use Try.get instead of patmat
c.typeCheck(silent = true) now suppresses ambiguous errors
Conflicts:
bincompat-backward.whitelist.conf
bincompat-forward.whitelist.conf
src/compiler/scala/reflect/macros/contexts/Typers.scala
src/compiler/scala/reflect/reify/package.scala
src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/compiler/scala/tools/reflect/ToolBoxFactory.scala
src/library/scala/concurrent/impl/Promise.scala
src/reflect/scala/reflect/internal/Types.scala
|
| |
| |
| |
| |
| |
| |
| |
| | |
It returned wrong values because it used the java.vendor
property instead of os.name.
See http://mail.openjdk.java.net/pipermail/macosx-port-dev/2012-November/005148.html
for the reason why we don't follow developer.apple.com/library/mac/#technotes/tn2002/tn2110.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The logic in partest for snooping around for tools.jar
is moved to PathResolver, and ILoop uses it from there.
If JAVA_HOME is toolless, check out java.home.
The use case was that Ubuntu installs with `java` at
version 6 and `javac` at version 7; it's easy to wind
up with JAVA_HOME pointing at the version 6 JRE, as
I discovered. It's confusing when that happens.
In future, partest might run under 7 and fork tests
under 6, but those permutations are downstream.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Confusing, now-it-happens now-it-doesn't mysteries lurk
in the darkness. When scala packages are declared like this:
package scala.collection.mutable
Then paths relative to scala can easily be broken via the unlucky
presence of an empty (or nonempty) directory. Example:
// a.scala
package scala.foo
class Bar { new util.Random }
% scalac ./a.scala
% mkdir util
% scalac ./a.scala
./a.scala:4: error: type Random is not a member of package util
new util.Random
^
one error found
There are two ways to play defense against this:
- don't use relative paths; okay sometimes, less so others
- don't "opt out" of the scala package
This commit mostly pursues the latter, with occasional doses
of the former.
I created a scratch directory containing these empty directories:
actors annotation ant api asm beans cmd collection compat
concurrent control convert docutil dtd duration event factory
forkjoin generic hashing immutable impl include internal io
logging macros man1 matching math meta model mutable nsc parallel
parsing partest persistent process pull ref reflect reify remote
runtime scalap scheduler script swing sys text threadpool tools
transform unchecked util xml
I stopped when I could compile the main src directories
even with all those empties on my classpath.
|
|
|
|
|
|
|
|
| |
The .scala header files had the right copyright dates
but properties used to generate the information in
e.g. "scala -version" hadn't been updated.
review @adriaanm
|
| |
|
|
|
|
|
|
|
| |
Conflicts:
build.xml
tools/get-scala-revision.bat
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
lib/scala-compiler.jar.desired.sha1
lib/scala-library-src.jar.desired.sha1
lib/scala-library.jar.desired.sha1
src/compiler/scala/reflect/internal/Definitions.scala
src/compiler/scala/reflect/internal/Importers.scala
src/compiler/scala/reflect/internal/Symbols.scala
src/compiler/scala/reflect/internal/Trees.scala
src/compiler/scala/reflect/internal/Types.scala
src/compiler/scala/tools/nsc/Global.scala
src/compiler/scala/tools/nsc/transform/Erasure.scala
src/compiler/scala/tools/nsc/transform/LiftCode.scala
src/compiler/scala/tools/nsc/transform/UnCurry.scala
src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
test/files/run/programmatic-main.check
test/files/speclib/instrumented.jar.desired.sha1
|
| |
| |
| |
| |
| |
| |
| | |
Removed all the trailing whitespace to make eugene happier.
Will try to keep it that way by protecting at the merge level.
Left the tabs in place because they can't be uniformly changed
to spaces, some are 2, some are 4, some are 8, whee.
|
|/ |
|
|
|
|
|
| |
Attempting to make the repl find it based on fewer clues so
all can enjoy the javap goodness.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
output generation (but only then, since otherwise we're not creating the
jar):
1) -Xmain-class foo.Bar will give the jar a Main-Class of foo.Bar 2)
Alternatively, if there is only one runnable program, that will be
the Main-Class 3) Always, the jar's manifest will have an entry for
Scala-Compiler-Version.
Not very relatedly, a warning is now issued when a module has a main
method but a runnable program will not be generated. Closes SI-4861.
This represents an opening step toward automatically recognizing
mismatched bytecode situations: coarse, but useful and safe. Review by
mirco.
|
| |
|
| |
|
|
|
|
|
|
| |
Added releaseVersion and developmentVersion to Properties so people
don't all have to parse the versionString. No review.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
consistently, and remove things which are not being used anywhere
in the visible universe. Beyond general polish here are some of the
feature-like additions I can remember:
* -Xshow-phases now includes descriptions of the phases.
* -Xshow-class and -Xshow-object did not work as far as I could tell:
if they didn't, now they do. If they did, now they work better.
And you don't have to give it a fully qualified name anymore.
* -Xprint-icode will generate *.icode files (don't also have to say -Xprint:icode)
* counts of deprecation and unchcked warnings are given
* More documentation of what global is doing.
I tried not to break anything which might be using Global, but let me
know if I overshot somewhere. No review.
|
|
|
|
|
| |
Removed more than 3400 svn '$Id' keywords and related junk.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduces scala.tools.cmd providing command line tool infrastructure.
For a quick look at what can be done, see
scala.tools.cmd.Demo
For a more involved, potentially eye-straining look, see
scala.tools.partest.PartestSpec
To experience it through the eyes of Joe Partest User, run
test/partest
Review by community.
|
|
|
|
|
|
| |
More support code for the big partest patch I'm working on to finally
finish classpaths for good. No review.
|
|
|
|
|
|
|
| |
Undid my awful code which had broken the thread scheduler selection.
Further unbroke it beyond that unbreaking hopefully to the point where
java 1.6 on OSX is recognized as such. Review by haller.
|
|
|
|
|
|
|
|
|
| |
Some much needed housecleaning regarding system properties. If you can
possibly resist the temptation, it'd be great if people could try to
go through the properties classes to get and set them, and also to set
property values somewhere fixed rather than using strings directly.
Review by community.
|
|
|
|
|
|
| |
Some hardening in the repl, and removing some functions which now exist
in the standard library. No review.
|
|
|
|
|
|
|
| |
Noticed that all the system properties were being read into vals so they
didn't notice changes. Determined this was not correct, and changed them
into defs. No review.
|
|
|
|
|
|
|
| |
A few compiler IO lib bits I have been needing: some basic conveniences
for directories and sockets, and some cleanups in CompileSocket. Review
by community.
|