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

Scala 3/sbt 2 prep #259

Merged
merged 3 commits into from
Oct 17, 2024
Merged

Scala 3/sbt 2 prep #259

merged 3 commits into from
Oct 17, 2024

Conversation

BillyAutrey
Copy link
Collaborator

@BillyAutrey BillyAutrey commented Oct 17, 2024

Lots of scala 3 compatibility fixes. 1 of a series of PRs for sbt 2 compatibility.

  • Updates to sbt 1.10.2
  • Take out sbt crossbuild, in prep for scala 2/3 + format.
  • Update to scalafmt-native-action@v4
  • Add compatibility shims for colliding types
  • Update to scala 3 scalafmt for shim files
  • Switch to slash format in sbt files
  • Fix various warnings, errors when compiling in scala3 mode
  • Add -Xsource:3 in Scala 2.12 mode.

Note: This does not actually activate cross-builds. They won't work, still need to fix scripted tests.

Towards #255

import java.io.File

package object web {

/**
* Describes a string path relative to a base directory.
*/
type PathMapping = (File, String)
type PathMapping = (FileRef, String)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is necessary because Keys.mappings changed types in sbt 2. The type change creates significant type collisions in keys, mapping logic, and deduplicators.

Almost all of the type changes and FileConverter additions in SbtWeb.scala stem from this change.

Copy link
Member

@mkurz mkurz left a comment

Choose a reason for hiding this comment

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

one small comment.
Also please rebase, then we can merge.

Includes:
* Add compatibility shims for colliding types
* Switch to slash format in sbt files
* Fix various warnings, errors when compiling in scala3 mode
@BillyAutrey
Copy link
Collaborator Author

one small comment. Also please rebase, then we can merge.

Done and done.

@mkurz mkurz merged commit 2d95306 into sbt:main Oct 17, 2024
6 checks passed
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.

2 participants