Repository navigation
fix(transpiler): put case class's [derive(Eq, Show)] on its own line - #81
Merged
Merged
Conversation
The attribute was written into the trailing trivia of Scala's `case` keyword, which is just a single space, so `class` stayed on the same line. It now forces a newline and reproduces the original indentation instead. Regenerated the affected transpile snapshots and the self-hosted pnc/src tree, which is itself transpiled output. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
kthompson
enabled auto-merge (rebase)
September 9, 2026 04:34
scalafmt flagged the doc comment on the new currentLineIndentation helper; reformatting it also required regenerating pnc/src/Transpiler.pn to match. TranspilerTests.scala asserted the old same-line [derive(Eq, Show)] format inline, separately from the snapshot suite, and needed the same newline update. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
[derive(Eq, Show)]was written into the trailing trivia of Scala'scasekeyword (a single space), so it stayed on the same line asclass. It now emits a newline plus the original indentation instead.derive.pn,generics.pn) and the self-hostedpnc/srctree, since that's itself transpiled output that used the old one-line style.Test plan
sbt "test/testOnly TranspileSnapshotTests"passes (4/4)sbt "pnc/compile"'s pre-existing 10 diagnostics are unrelated to this change (reproduced identically on the unmodified baseline via a temporary stash)🤖 Generated with Claude Code