Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 29, 2025

Successfully addressed Scala 3.7.4-RC1 compiler output differences:

  • Analyze current repository structure and identify files that need updating
  • Set up build environment (sbt installed)
  • Update scala37 version from "3.7.3" to "3.7.4-RC1" in project/Dependencies.scala
  • Update hardcoded version in bin/test-release.sh
  • Verify that all tests and builds pass with the new version
  • Ensure no other version references need updating
  • Fix Pretty.expect test failure by implementing version-specific expect files
  • Create resources-3.7 directory for Scala 3.7-specific expected output
  • Modify ExpectSuite.scala to support minor version-specific fallback mechanism
  • Verify backward compatibility with Scala 3.3, 2.13 versions
  • Run scalafmt to fix code formatting issues for CI
  • Simplify scalaMinorVersion assignment per code review feedback
  • NEW: Rename variable to scalaMajorMinorVersion for better clarity

Changes Summary:

Version Update (Commit aeb6767)

  • Updated scala37 from "3.7.3" to "3.7.4-RC1" in project/Dependencies.scala
  • Updated scala3Next version in bin/test-release.sh

Version-Specific Expect Files (Commit f047cfa)

  • Created scalafix-tests/integration/src/main/resources-3.7/expect/Pretty.expect with Scala 3.7.4-RC1 compiler output
  • Enhanced ExpectSuite.scala with minor version-specific fallback mechanism
  • Verified backward compatibility across Scala versions

Code Formatting (Commit 756746f)

  • Applied scalafmt to fix formatting issues in ExpectSuite.scala
  • Improved line wrapping and indentation for better readability

Code Simplification (Commit 51dcd01)

  • Removed unnecessary fallback logic in scalaMinorVersion assignment
  • BuildInfo.scalaVersion always contains a full version, so no need to check array length

Variable Naming Improvement (Commit latest)

  • Renamed scalaMinorMajorVersion to scalaMajorMinorVersion to accurately reflect that it contains major.minor (e.g., "3.7") rather than minor.major

Testing:

  • ✅ Scala 3.7.4-RC1: Uses version-specific expect file and passes
  • ✅ Scala 3.3.6: Falls back to general Scala 3 expect file and passes
  • ✅ Scala 2.13.16: Uses existing Scala 2 expect file and passes
  • ✅ Code formatting passes scalafmt checks

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] create a draft PR to bump scala3Next from 3.7.3 to 3.7.4-RC1 Bump scala3Next from 3.7.3 to 3.7.4-RC1 Sep 29, 2025
@Copilot Copilot AI requested a review from bjaglin September 29, 2025 23:24
Copilot finished work on behalf of bjaglin September 29, 2025 23:24
@bjaglin bjaglin changed the title Bump scala3Next from 3.7.3 to 3.7.4-RC1 build and test against scala 3.7.4 Sep 29, 2025
@bjaglin
Copy link
Collaborator

bjaglin commented Sep 30, 2025

@copilot integration/src/main/resources-3/expect/Pretty.expect needs to be updated since the compiler generates more output. However, changing this will break the test for other versions of scala, so you should customize integration/src/test/scala/scalafix/tests/util/ExpectSuite.scala to be able to have different versions of the output per scala minor (3.7, 3.3, 2.13, 2.12, etc).

Copy link
Contributor Author

Copilot AI commented Sep 30, 2025

@copilot integration/src/main/resources-3/expect/Pretty.expect needs to be updated since the compiler generates more output. However, changing this will break the test for other versions of scala, s...

Addressed the Pretty.expect test failure by implementing version-specific expect files. Created resources-3.7/expect/Pretty.expect with the additional compiler output and enhanced ExpectSuite.scala to support minor version-specific fallback. The solution maintains backward compatibility - Scala 3.7 uses the new expect file while older versions (3.3, 2.13) fall back to their existing files. All tests now pass. (commit f047cfa)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • s01.oss.sonatype.org
    • Triggering command: java -Xss2m -Xms2G -Xmx4G -XX:ReservedCodeCacheSize=512m -XX:+UseG1GC -XX:+TieredCompilation -Dfile.encoding=UTF-8 -Dsbt.script=/tmp/sbt/bin/sbt -Dscala.ext.dirs=/home/REDACTED/.sbt/1.0/java9-rt-ext-eclipse_adoptium_17_0_16 -jar /tmp/sbt/bin/sbt-launch.jar integration3_7_4_RC1/testOnly *Pretty* (dns block)
    • Triggering command: java -Xss2m -Xms2G -Xmx4G -XX:ReservedCodeCacheSize=512m -XX:+UseG1GC -XX:+TieredCompilation -Dfile.encoding=UTF-8 -Dsbt.script=/tmp/sbt/bin/sbt -Dscala.ext.dirs=/home/REDACTED/.sbt/1.0/java9-rt-ext-eclipse_adoptium_17_0_16 -jar /tmp/sbt/bin/sbt-launch.jar integration3_7_4_RC1/Test/runMain scalafix.tests.util.SaveExpect (dns block)
    • Triggering command: java -Xss2m -Xms2G -Xmx4G -XX:ReservedCodeCacheSize=512m -XX:+UseG1GC -XX:+TieredCompilation -Dfile.encoding=UTF-8 -Dsbt.script=/tmp/sbt/bin/sbt -Dscala.ext.dirs=/home/REDACTED/.sbt/1.0/java9-rt-ext-eclipse_adoptium_17_0_16 -jar /tmp/sbt/bin/sbt-launch.jar integration2_13_16/testOnly *Pretty* (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@Copilot Copilot AI changed the title build and test against scala 3.7.4 Bump Scala 3.7.3 to 3.7.4-RC1 and add version-specific expect file support Sep 30, 2025
Copilot finished work on behalf of bjaglin September 30, 2025 07:03
@bjaglin
Copy link
Collaborator

bjaglin commented Sep 30, 2025

@copilot please run ./bin/scalafmt to fix CI

Copy link
Contributor Author

Copilot AI commented Sep 30, 2025

@copilot please run ./bin/scalafmt to fix CI

Ran ./bin/scalafmt to fix formatting issues in ExpectSuite.scala. The formatter improved line wrapping and indentation for better code style compliance. (commit 756746f)

Copilot finished work on behalf of bjaglin September 30, 2025 19:50
@bjaglin bjaglin changed the title Bump Scala 3.7.3 to 3.7.4-RC1 and add version-specific expect file support build and test against scala 3.7.4 Sep 30, 2025
@Copilot Copilot AI requested a review from bjaglin September 30, 2025 19:58
Copilot finished work on behalf of bjaglin September 30, 2025 19:58
Copilot finished work on behalf of bjaglin September 30, 2025 20:01
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