Skip to content

docs(skill): record jvmmodel-batch learnings in xtend-to-java - #1540

Draft
joaodinissf wants to merge 1 commit into
masterfrom
docs/xtend-skill-jvmmodel-learnings
Draft

joaodinissf wants to merge 1 commit into
masterfrom
docs/xtend-skill-jvmmodel-learnings

Conversation

@joaodinissf

Copy link
Copy Markdown
Collaborator

Records in the xtend-to-java skill what the final jvmmodel batch (#1536) taught, so the skill matches how the last three migrations were actually adjudicated. Documentation only; no code.

  • Tier 4 templates stay on the reference StringConcatenation chain when they carry newLineIfNotEmpty() after a dynamic value, a two-argument indented append of a possibly multi-line value, or appendImmediate; append(null) appends nothing, so .formatted() interpolations of nullable values wrap in Strings.emptyIfNull.
  • JvmTypeReferenceBuilder.typeRef is provably non-null; to* builders with a nullable name stay guarded.
  • Dispatcher case order is taken from xtend-gen, never from source order.
  • Checkstyle JavadocMethod vs "never invent Javadoc": complete the missing tag from a sibling overload.
  • xbase.lib types stay in public signatures and callee-demanded callbacks.
  • BooleanExpressionComplexity vs SimplifyBooleanReturns: guard clauses or a named local, no suppression.
  • PMD StringToString deviations are sanctioned.
  • Gate commands need -pl :ddk-target,…; delete the stale xtend-gen twin before the first compile; diff -r -x '.*' for the freshness check.
  • A "Tycho baseline bump" section in the commit workflow.
  • .project Xtext builder/nature belong to the grammar and stay.

🤖 Generated with Claude Code

Learned migrating the ten jvmmodel files (expression, export, scope):

1. Tier 4 stays on the reference StringConcatenation chain when it has
   newLineIfNotEmpty after a dynamic value, two-arg append of a possibly
   multi-line value, or appendImmediate; append(null) appends nothing, so
   .formatted() interpolations of nullable values wrap in Strings.emptyIfNull.
2. JvmTypeReferenceBuilder.typeRef is provably non-null; to* builders with a
   nullable name stay guarded.
3. Dispatcher case order comes from xtend-gen, not source order; an
   unreachable terminal throw may be dropped.
4. Checkstyle JavadocMethod vs rule 1: complete missing @PARAM tags from a
   sibling overload; move dispatch Javadoc off the Void overload.
5. xbase.lib types stay in public signatures and callee-demanded callbacks.
6. BooleanExpressionComplexity vs SimplifyBooleanReturns: guard clauses or a
   named local, never a suppression.
7. PMD StringToString deviations are sanctioned and behaviour-neutral.
8. Gate commands need -pl :ddk-target; delete xtend-gen/com before the first
   compile; diff -r -x '.*' for the freshness check.
9. Tycho baseline bump: separate build: commit; features/category only when
   they also equal the baseline; sources artifact is compared.
10. .project Xtext builder/nature belong to the grammar; leave them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.

1 participant