-
Notifications
You must be signed in to change notification settings - Fork 186
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
cli_3.x.y: support external 2.13 rules along rules_3.x.y & publish #2034
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 tasks
bjaglin
force-pushed
the
integration3
branch
8 times, most recently
from
August 14, 2024 00:30
502fcbe
to
e13cc8d
Compare
bjaglin
changed the title
Refactor integration tests to run more with Scala 3
Overhaul integration tests to enable more on Scala 3
Aug 14, 2024
bjaglin
force-pushed
the
integration3
branch
11 times, most recently
from
August 16, 2024 22:50
3519cdb
to
6aa8071
Compare
bjaglin
force-pushed
the
integration3
branch
2 times, most recently
from
August 18, 2024 08:21
be66960
to
97f58a0
Compare
bjaglin
changed the title
Overhaul integration tests to enable more on Scala 3
Support rules built against core_2.13 in cli_3
Aug 18, 2024
bjaglin
force-pushed
the
integration3
branch
2 times, most recently
from
August 18, 2024 08:33
e640545
to
bb9db52
Compare
bjaglin
changed the title
Support rules built against core_2.13 in cli_3
Support classloading rules built against core_2.13 in cli_3
Aug 18, 2024
Spread the tests in other test suites
Only java classes are exercised by this test, so it's enough to do test cli_X via expectX (not because cli_X is in the classpath but because it covers all possible values of X). Also, run test on Windows by fixing URI generation.
- Remove cosmetic need for sourcecode in internal classes - Inline metaprint & metaprint-pprint Scala 3 macros to front-run Scala 2 ones in the Scala 3 compilation classpath, without other classes so that the synthetic code compiles against the Scala 2.13 bytecode of metaconfig - Keep building core3 to avoid introducing changes that will make it harder to publish it later
Stop cross-testing Scala 3 projects with Scala 2.13 artifacts, since clients should now classload for their Scala binary version.
- avoid side effects & input duplication in ScalafixArgumentsSuite by using a fixture function - ExplicitResultsTypes -> RemoveUnused (available in Scala 3) - ProcedureSyntax (syntax not even supported in 3) -> RedundantSyntax - remove tests no longer relevant (Scala 3 is tested everywhere else) - run tests on windows by removing custom target root (tested elsewhere)
bjaglin
force-pushed
the
integration3
branch
6 times, most recently
from
August 21, 2024 22:15
f7079d6
to
0433009
Compare
bjaglin
changed the title
cli_3.x: support external 2.13 rules along rules_3.x & publish
cli_3.x.y: support external 2.13 rules along rules_3.x.y & publish
Aug 21, 2024
bjaglin
commented
Aug 21, 2024
Comment on lines
+101
to
+104
// alongside Scala 2 community rules. Since cli3 does not bring Scala 3 | ||
// artifacts other than rule3, the Scalafix runtime and the compiler | ||
// itself, there is almost no risk for conflicts between 2.13 and 3 | ||
// versions for artifacts brought by the user tool classpath. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
➜ ~ cs resolve ch.epfl.scala:scalafix-cli_3.3.4-RC1:0.12.1+76-1b25d3fb+20240821-1602-SNAPSHOT | grep _3
ch.epfl.scala:scalafix-cli_3.3.4-RC1:0.12.1+76-1b25d3fb+20240821-1602-SNAPSHOT:compile
ch.epfl.scala:scalafix-reflect_3.3.4-RC1:0.12.1+76-1b25d3fb+20240821-1602-SNAPSHOT:compile
ch.epfl.scala:scalafix-rules_3:0.12.1+76-1b25d3fb+20240821-1602-SNAPSHOT:compile
org.scala-lang:scala3-compiler_3:3.3.4-RC1:default
org.scala-lang:scala3-library_3:3.3.4-RC1:default
org.scala-lang:tasty-core_3:3.3.4-RC1:default
bjaglin
commented
Aug 21, 2024
s"all cli2_12/publishLocalTransitive cli2_13/publishLocalTransitive interfaces/publishLocal" :: | ||
def asSuffix(scalaVersion: String) = scalaVersion.replace(".", "_") | ||
|
||
s"all cli${asSuffix(scala212)}/publishLocalTransitive cli${asSuffix(scala213)}/publishLocalTransitive interfaces/publishLocal" :: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be updated later, when sbt-scalafix loads cli_3.x.y
- External rule had to be bumped since code expanded by the quasiquote macros is not backward-compatible. - ToolClasspathSuite assertions relied on scalatest being in the classpath, which is no longer the case (at least not the same binary version). This takes the opportunity to honor the toolclasspath both at compilation time and at runtime for compiled rules.
5 tasks
bjaglin
force-pushed
the
integration3
branch
3 times, most recently
from
August 22, 2024 07:29
7feccff
to
dd1b0a6
Compare
This changes the cross-publishing strategy for rules from binary to full, in order to have different artifacts for Scala 3. This will allow ExplicitResultTypes to bring in a different presentation compiler since there is no guarantee that LTS supports recent source syntax, nor that Next supports old one.
This was referenced Aug 22, 2024
This was referenced Sep 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Towards #1680
See commit messages (the most important is ecf27f8)
Follow ups