Skip to content

JVM & JS disagree whether \u00a0 matches /\s/ #3959

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

Closed
japgolly opened this issue Feb 12, 2020 · 2 comments · Fixed by #4455
Closed

JVM & JS disagree whether \u00a0 matches /\s/ #3959

japgolly opened this issue Feb 12, 2020 · 2 comments · Fixed by #4455
Labels
duplicate Duplicate of another issue. Closed.
Milestone

Comments

@japgolly
Copy link
Contributor

If you run 160.toChar.toString.matches("\\s") in both JVM and JS, you can that they return different results.

  • JVM = false
  • JS = true
@sjrd
Copy link
Member

sjrd commented Feb 12, 2020

I'm afraid that's just one of the zillion cases where the JS engine differs from the JVM one. The fact that they're different is already tracked as #1201, so I'm going to close this issue as a duplicate.

@sjrd sjrd closed this as completed Feb 12, 2020
@sjrd sjrd added the duplicate Duplicate of another issue. Closed. label Feb 12, 2020
@japgolly
Copy link
Contributor Author

Ha! And raised by me nonetheless. I'd completely forgotten. Thanks @sjrd

@sjrd sjrd linked a pull request Mar 28, 2021 that will close this issue
4 tasks
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 16, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical fullOpt output is approximately 12 KB.

The source of `PatternCompiler` contains an extensive explanation
of the design of the compiler, and of how it compiles each kind of
Java pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 17, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical fullOpt output is approximately 12 KB.

The source of `PatternCompiler` contains an extensive explanation
of the design of the compiler, and of how it compiles each kind of
Java pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 17, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical fullOpt output is approximately 12 KB.

The source of `PatternCompiler` contains an extensive explanation
of the design of the compiler, and of how it compiles each kind of
Java pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 17, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical fullOpt output is approximately 12 KB.

The source of `PatternCompiler` contains an extensive explanation
of the design of the compiler, and of how it compiles each kind of
Java pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 18, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical fullOpt output is approximately 12 KB.

The source of `PatternCompiler` contains an extensive explanation
of the design of the compiler, and of how it compiles each kind of
Java pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 18, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical fullOpt output is approximately 12 KB.

The source of `PatternCompiler` contains an extensive explanation
of the design of the compiler, and of how it compiles each kind of
Java pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 18, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical fullOpt output is approximately 12 KB.

The source of `PatternCompiler` contains an extensive explanation
of the design of the compiler, and of how it compiles each kind of
Java pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 19, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 19, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 20, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 21, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 21, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 22, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 22, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 23, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 25, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 25, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 26, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 26, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Apr 26, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue May 2, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue May 6, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue May 19, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue May 22, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Jun 9, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Jun 10, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Jun 10, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Jun 14, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Jun 24, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Jun 28, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Jul 6, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
sjrd added a commit to sjrd/scala-js that referenced this issue Jul 7, 2021
Previously, `java.util.regex.Pattern` was implemented without much
concern for correctness wrt. the Java semantics of regular
expressions. Patterns were passed through to the native `RegExp`
with minimal preprocessing.

This could cause several kinds of incompatibilities:

- Throwing `ParseError`s for features not supported by JS regexes,
- Or worse, silently compile with different semantics.

In this commit, we correctly implement virtually all the features
of Java regular expressions by compiling Java patterns down to JS
patterns with the same semantics.

This change introduces a significant code size regression for code
bases that were already using `Pattern` and/or Scala's `Regex`.
Therefore, we went to great lengths to optimize the compiler for
code size, in particular in the default ES 2015 configuration. This
means that some code is not as idiomatic as it could be. The impact
of this commit on a typical output is approximately 65 KB for
fastOpt and 12 KB for fullOpt.

The `README.md` file contains an extensive explanation of the
design of the compiler, and of how it compiles each kind of Java
pattern.

In addition to fixing the mega-issue scala-js#1201, this commit fixes the
smaller issues scala-js#105, scala-js#1677, scala-js#1847, scala-js#2082 and scala-js#3959, which had been
closed as duplicates of scala-js#1201.
@sjrd sjrd added this to the v1.7.0 milestone Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Duplicate of another issue. Closed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants