Update to Scala 2.13, drop Scala 2.12 support - #557
Open
lolgab wants to merge 3 commits into
Open
Conversation
Bumps scalaVersion/scalaBinaryVersion to 2.13, removes cross-building and 2.12-only compiler flags, and fixes the resulting 2.13 breakage: removed collection APIs (breakOut, .to[X], mapValues), parallel collections moved to a separate module, and guardrail bumped to 1.0.0-M1 (0.75.2's akka-http codegen emits invalid Scala under 2.13). case-app is bumped to 2.1.0 (no 2.13 build exists below that) and CLIApp's CLI parsing is rewritten off the removed case-app 1.x Command/CommandParser API onto the 2.x Parser/Help API, with Analyze's option case class split into an AdvancedOptions group to keep it under case-app's field-count ceiling. Known issue: case-app 2.1.0's Parser/Help derivation macro crashes scalac 2.13 (LambdaLift, "key not found: package command") whenever derivation for two or more distinct option types occurs in the same compiled package - reproduced in isolation, unrelated to code shape, and unaffected by bumping to 2.13.18. The cli module does not compile as a result; core, model, toolRepository-remote and codacy-api-client all build clean on 2.13.
Up to standards ✅🟢 Issues
|
| Category | Results |
|---|---|
| ErrorProne | 1 high |
| Comprehensibility | 2 minor |
🟢 Metrics 4 duplication
Metric Results Duplication 4
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
…ashes Core: replace removed 2.13 collection APIs in tests (.to[X], breakOut). Cli: case-app's Parser/Help derivation macro crashes scalac 2.13 in two distinct, previously undiagnosed ways: - "key not found: package command" (LambdaLift) when the annotated case class is a bare top-level member of a package. - "assertion failed: static" (delambdafy) when Parser[X]/Help[X] are derived from a different object than the one X is declared in. Both fixed by nesting the option case classes in an Options object and declaring their derived Parser/Help vals right there, reused by the parsing objects instead of re-deriving. Also adds the missing CLIApp.parseCommand used by CLISpec since the case-app 2.x rewrite, and fixes tests still constructing Analyze with fields that moved into the nested AdvancedOptions group.
This file contains hidden or 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
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.
Summary
scalaVersion/scalaBinaryVersionto 2.13, drops cross-building and 2.12-only compiler flags.core,toolRepository-remote, andcli(breakOut,.to[X],mapValues, parallel collections module).guardrailto1.0.0-M1(0.75.2's akka-http codegen emits invalid Scala under 2.13) and pins scalameta to keep the meta-build classpath consistent.case-appto2.1.0(no 2.13 build exists below that) and rewritesCLIApp's CLI parsing off the removed case-app 1.xCommand/CommandParserAPI onto the 2.xParser/HelpAPI. SplitsAnalyze's option case class into anAdvancedOptionsgroup to stay under case-app's field-count ceiling.Known issue - cli module does not compile
case-app 2.1.0's
Parser/Helpderivation macro crashes scalac 2.13 (LambdaLift,NoSuchElementException: key not found: package command) whenever derivation for two or more distinct option case classes happens in the same compiled package. Reproduced in isolation across many code shapes (nested/top-level, generic/non-generic, reduced field count, explicit/automatic derivation) - it is not fixable by restructuring this codebase. Also confirmed on Scala 2.13.18, so it isn't a scalac patch-version bug either.Since the CLI needs to parse both
analyzeandvalidate-configuration, this blocks theclimodule specifically.core,model,toolRepository-remote, andcodacy-api-clientall compile clean on 2.13.Opening this to see what CI reports; the
climodule build is expected to fail until case-app is replaced or the upstream bug is fixed.Test plan
climodule compile failure, other modules green)