Skip to content
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

[backport] Scala.js support for 1.0.x #83

Merged
merged 1 commit into from Sep 21, 2016

Conversation

gourlaysama
Copy link
Member

This commit backports the commit below, with two caveats:

  • the fix in Speed up line/column in OffsetPosition #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.

(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

(cherry picked from commit bde222c)

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 <sjrdoeraene@gmail.com>)
(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 <seth@tisue.net>)
(cherry picked from commit bde222c)
Copy link
Member

@sjrd sjrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gourlaysama gourlaysama merged commit 151ef0d into scala:1.0.x Sep 21, 2016
@gourlaysama gourlaysama deleted the backports1 branch September 22, 2016 13:36
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.

None yet

2 participants