summaryrefslogtreecommitdiff
path: root/src/library/scala/util/Properties.scala
Commit message (Collapse)AuthorAgeFilesLines
* Merge 2.11.x into 2.12.xAdriaan Moors2017-04-071-1/+1
|\ | | | | | | Include 828a892 Merge pull request #5753
| * bump copyright year to 2017Philippus Baalman2017-03-021-1/+1
| |
* | SD-256 enable colored output by default on unixAntoine Gourlay2017-02-211-0/+6
| | | | | | | | | | | | | | | | | | `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.
* | Revert "SI-9750 isJavaAtLeast(Int)"Jason Zaugg2016-11-161-6/+0
| | | | | | | | | | | | This reverts commit 656162bb48fbbd703790a2c94d4563e40ddfdfc2. Adding new APIs is not possible until a major release.
* | Merge pull request #5276 from som-snytt/issue/9750Seth Tisue2016-10-261-17/+49
|\ \ | | | | | | SI-9750 scala.util.Properties.isJavaAtLeast works with JDK9
| * | SI-9750 Spec check major.minor.securitySom Snytt2016-07-211-21/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
| * | SI-9750 isJavaAtLeast(Int)Som Snytt2016-07-151-0/+2
| | | | | | | | | | | | | | | A good opportunity to simplify the API. Versions are strings, but a spec version is just a number.
| * | SI-9750 Tweak tests for what is a numberSom Snytt2016-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | 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.)
| * | SI-9750 scala.util.Properties.isJavaAtLeast works with JDK9Pavel Petlinsky2016-07-131-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Including Lightbend in `-version` message.Adriaan Moors2016-09-271-1/+1
|/ / | | | | | | Also consistently use "LAMP/EPFL" and not "EPFL LAMP".
* | Use System.lineSeparator, rather than sys.propsJason Zaugg2016-03-291-1/+1
| |
* | Merge pull request #4934 from Shadow53/2.12.xSeth Tisue2016-03-011-0/+2
|\ \ | |/ |/| Added Properties.isLinux to compliment the isWin and isMac methods
| * Added Properties.isLinux to compliment the isWin and isMac methodsShadow532016-01-301-0/+2
| |
* | bump copyright year to 2016Seth Tisue2016-02-031-1/+1
|/
* bump copyright year in `scala -version`Seth Tisue2015-09-181-2/+2
| | | | | | | a little piece of #4644 I missed. fixes this: % scala -version Scala code runner version 2.11.7 -- Copyright 2002-2013, LAMP/EPFL
* Make compiler.properties fall back to prefixedBrian McKenna2014-09-221-3/+3
| | | | | | | | | | | 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.
* [backport] Fixes cut sentences in the generated scaladocsDominik Gruntz2014-08-111-1/+1
| | | | | | | | | | | | | | | | | 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)
* SI-8503 -version is info settingSom Snytt2014-05-291-2/+5
| | | | | | | | | | | 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.
* SI-7680 Update the ScalaDoc entry page of the Scala librarySimon Ochsenreither2013-12-191-1/+1
|
* Cull extraneous whitespace.Paul Phillips2013-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | 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.
* SI-7265 javaSpecVersion, adjust isJava... testsSom Snytt2013-08-011-4/+3
| | | | | | | | | | | | | | | 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.
* Merge remote-tracking branch 'scala/2.10.x' into merge-2.10.xGrzegorz Kossakowski2013-07-291-10/+25
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * SI-7265 General test for spec versionSom Snytt2013-07-041-10/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | SI-7479 Add avian option to partest's diff filter...Simon Ochsenreither2013-06-061-0/+3
| | | | | | | | | | ... so that the different results of the test on Avian can be specified in the check file.
* | Merge branch 'pr/merge-2.10.2' into masterPaul Phillips2013-06-041-5/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * SI-7497 Fix scala.util.Properties.isMacSimon Ochsenreither2013-05-231-7/+9
| | | | | | | | | | | | | | | | 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.
* | SI-7410 REPL uses improved tools.jar locatorSom Snytt2013-05-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Absolutized paths involving the scala package.Paul Phillips2013-05-031-3/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* SI-6915 Updates copyright properties to 2002-2013James Iry2013-01-041-1/+1
| | | | | | | | 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
* Brings all copyrights (in comments) up-to-date, from 2011/12 to 2013Heather Miller2012-11-021-1/+1
|
* Finished migrating to new versioning schemeJosh Suereth2012-03-161-2/+1
| | | | | | | Conflicts: build.xml tools/get-scala-revision.bat
* properties loading is now maven/osgi version aware. yippie.Josh Suereth2012-03-161-14/+13
|
* Merge branch 'master' into merge-inlinePaul Phillips2012-03-141-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Whitespace commit.Paul Phillips2012-02-291-1/+1
| | | | | | | | | | | | | | 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.
* | Mostly eliminated ScalaObject.Paul Phillips2012-02-031-1/+1
|/
* Better hunting for tools.jar.Paul Phillips2011-12-301-0/+5
| | | | | Attempting to make the repl find it based on fewer clues so all can enjoy the javap goodness.
* Working on jar creation infrastructure.Paul Phillips2011-08-011-0/+10
| | | | | | | | | | | | | | | | | | 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.
* Formatting fixes for scala.util.Kato Kazuyoshi2011-06-181-4/+4
|
* Revised that last botched commit. No review.Paul Phillips2011-04-171-11/+23
|
* Added releaseVersion and developmentVersion to ...Paul Phillips2011-04-171-4/+23
| | | | | | Added releaseVersion and developmentVersion to Properties so people don't all have to parse the versionString. No review.
* Updated copyright notices to 2011Antonio Cunei2011-01-201-2/+2
|
* An overhaul of Global.Paul Phillips2010-11-071-0/+1
| | | | | | | | | | | | | | | | | | 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 r...Antonio Cunei2010-05-121-1/+0
| | | | | Removed more than 3400 svn '$Id' keywords and related junk.
* Introduces scala.tools.cmd providing command li...Paul Phillips2010-04-111-0/+1
| | | | | | | | | | | | | | | | | | 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...Paul Phillips2010-03-131-0/+1
| | | | | | 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...Paul Phillips2010-02-261-3/+11
| | | | | | | 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...Paul Phillips2010-02-231-35/+64
| | | | | | | | | 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 f...Paul Phillips2010-02-041-1/+0
| | | | | | 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 bei...Paul Phillips2010-02-041-16/+16
| | | | | | | 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:...Paul Phillips2010-01-291-2/+4
| | | | | | | 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.