Skip to content

Merge 1.0.x to master #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Oct 27, 2016
Merged

Conversation

gourlaysama
Copy link
Contributor

Conflicts:

  • .travis.yml
  • build.sbt
  • project/plugins.sbt

liskin and others added 28 commits July 3, 2015 23:10
Building the index again and again for every OffsetPosition instance makes
very little sense.  So this makes it build it only once for a given source.

I'm not sure if this is the best way to implement it and I'm afraid that a
global synchronized map may be a performance bottleneck once the number of
processors goes into the hundreds, but I know very little Scala/Java to do
this properly. :-(

Fixes http://stackoverflow.com/questions/14707127/accessing-position-information-in-a-scala-combinatorparser-kills-performance
This fixes scala#45.

The problem was that whenever PagedSeqReader is constructed, source is
assigned seq (although lazily) but since PagedSeq is not a subclass of
java.lang.CharSequence, an implicit conversion takes place via
Predef#SeqCharSequence, creating a new object. The problem is that this
happens every time PagedSeqReader#rest or drop is called, breaking packrat
caching entirely.
Fix packrat caching with PagedSeqReader
Backport the README changes to 1.0.x branch (which is now the default)
Fixes https://issues.scala-lang.org/browse/SI-9010, see
https://issues.scala-lang.org/browse/SI-4929 for discussion.

The leak happened when parsers are used outside of phrase, which seems to be
not so common until one realizes that that's exactly how lexers are used in
Scanner, so every lexer leaked.  This should fix it.
This is extremely ugly (not only does it use reflection, is uses Java
reflection with hard-coded mangled symbol name because of a bug in Scala
reflection), but I don't know of a better solution.  :-(
…-linecontent2

Prevent OffsetPosition.lineContents from grabbing a newline
Also restrict 2.12 to jdk8 builds.
bump scala, sbt and scala-module-plugin versions
I'm not sure if this was intentionally left with `'` instead of ` in the closing apostrophe, but just in case it was not I made the PR.
Scala CLA has been signed.
Change apostrophe in error message
This commit backports the commit below, with two caveats:
 - the fix in scala#68 doesn't work with Scala.js, so it is only
   enabled on the JVM for now
 - the scalaVersion/crossScalaVersion madness breaks the sbt
   build in 1.0.x (it didn't in master for some reason),
   so the second backport commit below had to be squashed
   with this one

[backport] Add support for Scala.js, with cross-compilation.

Scala versions were upgraded to 2.11.7 and 2.12.0-M3.
2.12 is only used when running the build on JDK8 or later.

JavaTokenParsers.identifier was rewritten not to use a regexp,
but rather primitive parsers and
Character.isJavaIdentifier{Start,Part}. The regexp-based
implementation relies on Java-specific character ranges.

JavaTokenParsers.stringLiteral was slightly adapted with an
expansion of `\p{Cntrl}` into `[\x00-\x1F\x7F]`. The former
character range is Java-specific. We also removed an invalid
(and useless) `+` at the end of the regexp.

The test t4929.scala is JVM-only.

(Author: Sébastien Doeraene <[email protected]>)
(cherry picked from commit 98737a2)

---

[backport] set Scala version in a more dbuild-friendly way

having scalaVersion and crossScalaVersions set in different
places was confusing dbuild

needed to fix scala/community-build#215

(Author: Seth Tisue <[email protected]>)
(cherry picked from commit bde222c)
[backport] Scala.js support for 1.0.x
bump sbt, scala & dependency versions to latest
It used to be: only publish on JDK 6.

But now, 2.12.x requires Java 8. So we want the 2.11.x version to be
published on JDK 6, the 2.12.x version on JDK 8, and nothing on JDK
7.

Outside of publishing, we just run and test everything that can run on
the current JDK, like before.

This is inspired by Seth's commit at
scala/scala-xml@38fbbbe
Redo how cross-version publishing works
(The hostname workaround was replaced with the sudo-less variant since we
can't use sudo here.)

 Conflicts:
	.travis.yml
	build.sbt
	project/plugins.sbt
@SethTisue
Copy link
Member

I should know this, but what even is the difference between 1.0.x and master?

@gourlaysama
Copy link
Contributor Author

masteris the branch for the 1.1.0 version. Currently it only contains a few bug fixes that were not binary compatible. This is also where PagedSeq will have to be added.

@gourlaysama gourlaysama merged commit 8d2dab9 into scala:master Oct 27, 2016
@gourlaysama gourlaysama deleted the merge-1.0.x-master branch May 3, 2017 08:40
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.

5 participants