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

Update sbt-scalajs, scalajs-compiler, ... to 1.8.0 #734

Merged
merged 8 commits into from
Jan 21, 2022

Conversation

47erbot
Copy link
Contributor

@47erbot 47erbot commented Dec 13, 2021

Updates

from 1.7.1 to 1.8.0.
GitHub Release Notes - Version Diff

I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.

If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.

Configure Scala Steward for your repository with a .scala-steward.conf file.

Have a fantastic day writing Scala!

Files still referring to the old version number

The following files still refer to the old version number (1.7.1).
You might want to review and update them manually.

CHANGELOG.md
microsite/docs/changelog.md
Ignore future updates

Add this to your .scala-steward.conf file to ignore future updates of this dependency:

updates.ignore = [ { groupId = "org.scala-js" } ]

labels: library-update, early-semver-minor, semver-spec-minor, old-version-remains

@fedefernandez fedefernandez force-pushed the update/sbt-scalajs-1.8.0 branch from 452e93e to 9a1b632 Compare December 21, 2021 08:46
Comment on lines +7 to +24
object TestContext {
// Why is this context distinct from the global execution context that Scala provides
// out of the box?
// In short, because browsers / JS are _very different_ from the JVM. Copying / pasting
// from the macrotask executor's explanation of why that library exists in its README:
// (https://github.com/scala-js/scala-js-macrotask-executor/tree/v1.0.0)
//
// "Unless you have some very, very specific and unusual requirements, this is the optimal
// ExecutionContext implementation for use in any Scala.js project.
// If you're using ExecutionContext and not using this project, you likely have some serious
// bugs and/or performance issues waiting to be discovered."
//
// This library goes through the trouble of providing this special execution context and
// reorganizing just to provide that context in tests to make it more obvious for downstream
// JS consumers what to fix / how to make a pretty menacing warning go away.

val context: ExecutionContext = Implicits.global
}
Copy link

@jisantuc jisantuc Jan 21, 2022

Choose a reason for hiding this comment

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

This is the meat of the change -- you can see the README for more details. Scala.js 1.8.0 introduced warnings about using Scala's global execution context: https://www.scala-js.org/news/2021/12/10/announcing-scalajs-1.8.0/

This happened only in tests but still required repair. The warning could have been suppressed, but then downstream consumers of the JS lib would have had to figure it out on their own. This seems better, though the cost is pretty high -- CrossProject.Pure was no longer sufficient since we know have platform-specific code.

@jisantuc jisantuc self-assigned this Jan 21, 2022
@47erbot 47erbot merged commit e625e8a into main Jan 21, 2022
@47erbot 47erbot deleted the update/sbt-scalajs-1.8.0 branch January 21, 2022 21:56
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.

3 participants