Skip to content

Upgrade to Scala.js 1.3.0. #10013

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 3 commits into from
Oct 17, 2020
Merged

Upgrade to Scala.js 1.3.0. #10013

merged 3 commits into from
Oct 17, 2020

Conversation

sjrd
Copy link
Member

@sjrd sjrd commented Oct 15, 2020

No description provided.

Copy link
Member

@dottybot dottybot left a comment

Choose a reason for hiding this comment

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

Hello, and thank you for opening this PR! 🎉

All contributors have signed the CLA, thank you! ❤️

Commit Messages

We want to keep history, but for that to actually be useful we have
some rules on how to format our commit messages (relevant xkcd).

Please stick to these guidelines for commit messages:

  1. Separate subject from body with a blank line
  2. When fixing an issue, start your commit message with Fix #<ISSUE-NBR>:
  3. Limit the subject line to 72 characters
  4. Capitalize the subject line
  5. Do not end the subject line with a period
  6. Use the imperative mood in the subject line ("Add" instead of "Added")
  7. Wrap the body at 80 characters
  8. Use the body to explain what and why vs. how

adapted from https://chris.beams.io/posts/git-commit

Have an awesome day! ☀️

@sjrd
Copy link
Member Author

sjrd commented Oct 16, 2020

@liufengyun There's one test failing on the Windows CI although it works locally for me. Apparently an expected multiline string literal contains an extra new line that shouldn't be there. Could it be that the Windows CI's git is configured to "checkout Windows-style"? If yes, that should be changed to "checkout as is".

@liufengyun
Copy link
Contributor

@liufengyun There's one test failing on the Windows CI although it works locally for me. Apparently an expected multiline string literal contains an extra new line that shouldn't be there. Could it be that the Windows CI's git is configured to "checkout Windows-style"? If yes, that should be changed to "checkout as is".

@sjrd To fix the problem once for all Windows, we can try .gitattributes:

https://docs.github.com/en/free-pro-team@latest/github/using-git/configuring-git-to-handle-line-endings#per-repository-settings

@sjrd
Copy link
Member Author

sjrd commented Oct 16, 2020

That's not really going to help, because it's for sources of Scala.js that are cloned through a JGit command. So adding .gitattributes in this repo won't help.

I've pushed an attempt at working around the issue by forcing autocrlf=false at the JGit level. We'll see whether that works.

@sjrd
Copy link
Member Author

sjrd commented Oct 16, 2020

@anatoliykmetyuk In the community build, for cats-effects-2, I errors like:

2020-10-15T17:04:21.4501775Z [error] org.scalajs.ir.IRVersionNotSupportedException: Failed to deserialize a file compiled with Scala.js 1.3 (supported up to: 1.2): /__w/dotty/dotty/community-build/community-projects/cats-effect-2/laws/js/target/scala-0.28/test-classes/cats/effect/ResourceTests.sjsir
2020-10-15T17:04:21.4504067Z [error] You may need to upgrade the Scala.js sbt plugin to version 1.3 or later.

So we're running the JS tests of cats-effects-2 in the community build? If yes we should force it to use sbt-scalajs 1.3.0 instead of the 1.2.0 that it declares in its project/plugins.sbt. How can I do that?

@liufengyun
Copy link
Contributor

That's not really going to help, because it's for sources of Scala.js that are cloned through a JGit command. So adding .gitattributes in this repo won't help.

I've pushed an attempt at working around the issue by forcing autocrlf=false at the JGit level. We'll see whether that works.

Can you put it in the Scala.js repo?

@sjrd
Copy link
Member Author

sjrd commented Oct 16, 2020

I could, but it would only work when the next version comes out, so no upgrading for 2 months.

Having anything but autocrlf=false globally on Windows is asking for trouble. Nobody does that on their own Windows machine.

@liufengyun
Copy link
Contributor

I could, but it would only work when the next version comes out, so no upgrading for 2 months.

Having anything but autocrlf=false globally on Windows is asking for trouble. Nobody does that on their own Windows machine.

I agree. I already changed the setting on the machine:

PS C:\actions-runner2> git config --global core.autocrlf false
PS C:\actions-runner2> git config --list
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
http.sslbackend=openssl
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
core.autocrlf=true
core.fscache=true
core.symlinks=false
pull.rebase=false
credential.helper=manager
core.autocrlf=false

To ease maintainability, I think it is better to minimize external configurations that are not managed by git.

@anatoliykmetyuk
Copy link
Contributor

So we're running the JS tests of cats-effects-2 in the community build? If yes we should force it to use sbt-scalajs 1.3.0 instead of the 1.2.0 that it declares in its project/plugins.sbt. How can I do that?

To override a plugin, you can modify the command with which SBT is started for that test. The following line, e.g., tells each test to use the locally-published SBT Dotty plugin, you can do the same with the Scala.js plugin.

https://github.com/lampepfl/dotty/blob/master/community-build/src/scala/dotty/communitybuild/projects.scala#L83

@sjrd
Copy link
Member Author

sjrd commented Oct 16, 2020

@anatoliykmetyuk Thanks, that worked! Would you mind reviewing the third commit, where I introduce that (Force-upgrade ...)?

Copy link
Contributor

@anatoliykmetyuk anatoliykmetyuk left a comment

Choose a reason for hiding this comment

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

3rd commit which forces the Scala.js plugin LGTM

@sjrd sjrd merged commit 0d1e330 into scala:master Oct 17, 2020
@sjrd sjrd deleted the scalajs-1.3.0 branch October 17, 2020 09:38
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