Skip to content

fix(migration): add missing rewrite scripts#2262

Merged
triceo merged 2 commits intoTimefoldAI:mainfrom
TomCools:fix/missing-migrations
Apr 24, 2026
Merged

fix(migration): add missing rewrite scripts#2262
triceo merged 2 commits intoTimefoldAI:mainfrom
TomCools:fix/missing-migrations

Conversation

@TomCools
Copy link
Copy Markdown
Contributor

@TomCools TomCools commented Apr 24, 2026

Found 2 missing migrations while upgrading the quickstarts again from 1.x to 2.0

  • Indictments calls on the constraintstream was removed, but if you had a test for this, the indictment calls were still there after migration.
  • ConstraintRef didn't have a package migration for some reason?

Copilot AI review requested due to automatic review settings April 24, 2026 07:55
@TomCools TomCools requested a review from triceo as a code owner April 24, 2026 07:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds missing OpenRewrite migrations to support upgrading projects from Timefold Solver 1.x to 2.0 by covering two previously unmigrated APIs.

Changes:

  • Add type migration from ai.timefold.solver.core.api.score.constraint.ConstraintRef to ai.timefold.solver.core.api.score.stream.ConstraintRef.
  • Add invocation removals for deprecated test API methods SingleConstraintAssertion.indictsWith*(...).
  • Extend/adjust corresponding OpenRewrite recipe tests to cover the new migrations.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tools/migration/src/main/java/ai/timefold/solver/migration/v2/GeneralTypeChangeMigrationRecipe.java Adds ChangeType entry for ConstraintRef package relocation.
tools/migration/src/test/java/ai/timefold/solver/migration/v2/GeneralTypeChangeMigrationRecipeTest.java Adds stub + a focused test verifying ConstraintRef import/type migration.
tools/migration/src/main/java/ai/timefold/solver/migration/v2/GeneralMethodDeleteInvocationMigrationRecipe.java Removes invocations of now-deleted indictsWith*(...) methods in the legacy test API package.
tools/migration/src/test/java/ai/timefold/solver/migration/v2/GeneralMethodDeleteInvocationMigrationRecipeTest.java Adds stubs and assertions ensuring the new method-invocation removals are applied.

@sonarqubecloud
Copy link
Copy Markdown

@triceo triceo changed the title Fix/missing migrations fix(migration): add missing rewrite scripts Apr 24, 2026
@triceo triceo merged commit 643db8e into TimefoldAI:main Apr 24, 2026
22 of 23 checks passed
@triceo triceo added this to the v2.0.1 milestone Apr 24, 2026
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.

3 participants