refactor: remove remaining deprecation from public API#2124
Open
triceo wants to merge 3 commits intoTimefoldAI:mainfrom
Open
refactor: remove remaining deprecation from public API#2124triceo wants to merge 3 commits intoTimefoldAI:mainfrom
triceo wants to merge 3 commits intoTimefoldAI:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the remaining deprecated elements from the public domain annotations (pinning filter and legacy “difficulty/strength/nullable” sorting attributes) and updates the internal descriptor processing plus test domains to use the non-deprecated replacement APIs.
Changes:
- Removed deprecated public API elements:
PinningFilter,PlanningEntity.pinningFilter,PlanningVariable.nullable, and legacy difficulty/strength sorting attributes. - Updated
EntityDescriptor/BasicVariableDescriptorto stop interpreting deprecated annotation attributes and to rely on the moderncomparator*andallowsUnassignedproperties. - Refactored/trimmed test domains and tests that exercised the deprecated APIs (including removing entire legacy test models).
Reviewed changes
Copilot reviewed 56 out of 56 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| core/src/main/java/ai/timefold/solver/core/api/domain/entity/PinningFilter.java | Removed deprecated pinning-filter API. |
| core/src/main/java/ai/timefold/solver/core/api/domain/entity/PlanningEntity.java | Removed deprecated pinningFilter/difficulty* attributes; keeps comparator-based sorting. |
| core/src/main/java/ai/timefold/solver/core/api/domain/variable/PlanningVariable.java | Removed deprecated nullable/strength* attributes. |
| core/src/main/java/ai/timefold/solver/core/impl/domain/entity/descriptor/EntityDescriptor.java | Removed pinningFilter handling and legacy difficulty* sorting handling. |
| core/src/main/java/ai/timefold/solver/core/impl/domain/variable/descriptor/BasicVariableDescriptor.java | Removed nullable and legacy strength* sorting handling; uses allowsUnassigned() directly. |
| core/src/test/java/ai/timefold/solver/core/impl/constructionheuristic/DefaultConstructionHeuristicPhaseTest.java | Updated pinned-entity constructions; removed tests tied to deprecated strength/difficulty APIs. |
| core/src/test/java/ai/timefold/solver/core/impl/constructionheuristic/placer/entity/QueuedEntityPlacerFactoryTest.java | Switched test domain used for entity sorting to a comparator-based solution descriptor. |
| core/src/test/java/ai/timefold/solver/core/impl/domain/entity/descriptor/EntityDescriptorTest.java | Removed tests covering deprecated pinningFilter-based movable filters. |
| core/src/test/java/ai/timefold/solver/core/impl/exhaustivesearch/DefaultExhaustiveSearchPhaseTest.java | Updated pinned-entity constructions to the new pinned model. |
| core/src/test/java/ai/timefold/solver/core/impl/localsearch/DefaultLocalSearchPhaseTest.java | Updated pinned-entity constructions to the new pinned model. |
| core/src/test/java/ai/timefold/solver/core/impl/solver/DefaultSolverTest.java | Updated pinned-entity constructions to the new pinned model. |
| core/src/test/java/ai/timefold/solver/core/testdomain/comparable/TestdataDifficultyComparingEntity.java | Migrated from legacy difficulty/strength comparator attributes to comparatorClass. |
| core/src/test/java/ai/timefold/solver/core/testdomain/difficultyweight/TestdataDifficultyFactory.java | Deleted legacy difficulty-weight factory test domain. |
| core/src/test/java/ai/timefold/solver/core/testdomain/difficultyweight/TestdataDifficultyWeightEntity.java | Deleted legacy difficulty-weight entity test domain. |
| core/src/test/java/ai/timefold/solver/core/testdomain/difficultyweight/TestdataDifficultyWeightSolution.java | Deleted legacy difficulty-weight solution test domain. |
| core/src/test/java/ai/timefold/solver/core/testdomain/difficultyweight/TestdataDifficultyWeightValue.java | Deleted legacy difficulty-weight value test domain. |
| core/src/test/java/ai/timefold/solver/core/testdomain/inheritance/entity/single/baseannotated/classes/pinned/TestdataExtendedPinningFilter.java | Deleted legacy pinningFilter-based pinning test domain. |
| core/src/test/java/ai/timefold/solver/core/testdomain/inheritance/entity/single/baseannotated/classes/pinned/TestdataExtendedPinnedEntity.java | Updated to remove pinningFilter-based fields/constructors; relies on @PlanningPin. |
| core/src/test/java/ai/timefold/solver/core/testdomain/list/sort/comparator/TestdataListSortableEntity.java | Migrated from legacy difficulty comparator attribute to comparatorClass. |
| core/src/test/java/ai/timefold/solver/core/testdomain/list/sort/factory/TestdataListFactorySortableEntity.java | Migrated from legacy difficulty weight factory attribute to comparatorFactoryClass. |
| core/src/test/java/ai/timefold/solver/core/testdomain/list/valuerange/sort/comparator/TestdataListSortableEntityProvidingEntity.java | Migrated from legacy difficulty comparator attribute to comparatorClass. |
| core/src/test/java/ai/timefold/solver/core/testdomain/list/valuerange/sort/factory/TestdataListFactorySortableEntityProvidingEntity.java | Migrated from legacy difficulty weight factory attribute to comparatorFactoryClass. |
| core/src/test/java/ai/timefold/solver/core/testdomain/mixed/multientity/TestdataMixedMultiEntityFirstEntity.java | Migrated from legacy difficulty comparator attribute to comparatorClass. |
| core/src/test/java/ai/timefold/solver/core/testdomain/mixed/multientity/TestdataMixedMultiEntitySecondEntity.java | Migrated from legacy strength comparator attribute to comparatorClass. |
| core/src/test/java/ai/timefold/solver/core/testdomain/mixed/singleentity/TestdataMixedEntity.java | Migrated from legacy difficulty/strength comparator attributes to comparatorClass. |
| core/src/test/java/ai/timefold/solver/core/testdomain/pinned/TestdataPinnedEntity.java | Removed legacy pinningFilter/locked state; pinning now only via @PlanningPin. |
| core/src/test/java/ai/timefold/solver/core/testdomain/pinned/TestdataPinningFilter.java | Deleted legacy pinningFilter test helper. |
| core/src/test/java/ai/timefold/solver/core/testdomain/pinned/unassignedvar/TestdataAllowsUnassignedPinningFilter.java | Deleted legacy pinningFilter test helper. |
| core/src/test/java/ai/timefold/solver/core/testdomain/pinned/unassignedvar/TestdataPinnedAllowsUnassignedEntity.java | Removed legacy pinningFilter/locked state; pinning via @PlanningPin. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/comparatordifficulty/OneValuePerEntityDifficultyEasyScoreCalculator.java | Deleted legacy difficulty/strength sorting test domain. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/comparatordifficulty/TestdataDifficultySortableEntity.java | Deleted legacy difficulty/strength sorting test domain. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/comparatordifficulty/TestdataDifficultySortableSolution.java | Deleted legacy difficulty/strength sorting test domain. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/comparator/TestdataComparatorSortableSolution.java | Updated solution descriptor construction to reflect simplified descriptor building. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/comparator/TestdataComparatorSortableEntityProvidingEntity.java | Migrated planning entity/variable sorting attributes to comparatorClass. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/factory/TestdataFactorySortableEntityProvidingEntity.java | Migrated planning entity sorting attribute to comparatorFactoryClass. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/factorydifficulty/OneValuePerEntityDifficultyFactoryEasyScoreCalculator.java | Deleted legacy difficulty/strength sorting test domain. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/factorydifficulty/TestdataDifficultyFactorySortableEntity.java | Deleted legacy difficulty/strength sorting test domain. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/factorydifficulty/TestdataDifficultyFactorySortableSolution.java | Deleted legacy difficulty/strength sorting test domain. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/TestdataInvalidMixedComparatorSortableEntity.java | Package adjusted to match remaining invalid-sort test model organization. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/TestdataInvalidMixedComparatorSortableSolution.java | Package adjusted to match remaining invalid-sort test model organization. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/mixed/strength/TestdataInvalidMixedStrengthSortableEntity.java | Deleted invalid test model tied to removed strength APIs. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/mixed/strength/TestdataInvalidMixedStrengthSortableSolution.java | Deleted invalid test model tied to removed strength APIs. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/twocomparator/entity/TestdataInvalidTwoEntityComparatorSortableEntity.java | Deleted invalid test model tied to removed legacy comparator attributes. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/twocomparator/entity/TestdataInvalidTwoEntityComparatorSortableSolution.java | Deleted invalid test model tied to removed legacy comparator attributes. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/twocomparator/value/TestdataInvalidTwoValueComparatorSortableEntity.java | Deleted invalid test model tied to removed legacy comparator attributes. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/twocomparator/value/TestdataInvalidTwoValueComparatorSortableSolution.java | Deleted invalid test model tied to removed legacy comparator attributes. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/twofactory/entity/TestdataInvalidTwoEntityFactorySortableEntity.java | Deleted invalid test model tied to removed legacy factory attributes. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/twofactory/entity/TestdataInvalidTwoEntityFactorySortableSolution.java | Deleted invalid test model tied to removed legacy factory attributes. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/twofactory/value/TestdataInvalidTwoValueFactorySortableEntity.java | Deleted invalid test model tied to removed legacy factory attributes. |
| core/src/test/java/ai/timefold/solver/core/testdomain/sort/invalid/twofactory/value/TestdataInvalidTwoValueFactorySortableSolution.java | Deleted invalid test model tied to removed legacy factory attributes. |
| core/src/test/java/ai/timefold/solver/core/testdomain/valuerange/sort/comparatorstrength/OneValuePerEntityStrengthRangeEasyScoreCalculator.java | Deleted legacy strength-range test domain. |
| core/src/test/java/ai/timefold/solver/core/testdomain/valuerange/sort/comparatorstrength/TestdataStrengthSortableEntityProvidingEntity.java | Deleted legacy strength-range test domain. |
| core/src/test/java/ai/timefold/solver/core/testdomain/valuerange/sort/comparatorstrength/TestdataStrengthSortableEntityProvidingSolution.java | Deleted legacy strength-range test domain. |
| core/src/test/java/ai/timefold/solver/core/testdomain/valuerange/sort/factorystrength/OneValuePerEntityStrengthFactoryRangeEasyScoreCalculator.java | Deleted legacy strength-range test domain. |
| core/src/test/java/ai/timefold/solver/core/testdomain/valuerange/sort/factorystrength/TestdataStrengthFactorySortableEntityProvidingEntity.java | Deleted legacy strength-range test domain. |
| core/src/test/java/ai/timefold/solver/core/testdomain/valuerange/sort/factorystrength/TestdataStrengthFactorySortableEntityProvidingSolution.java | Deleted legacy strength-range test domain. |
core/src/test/java/ai/timefold/solver/core/impl/localsearch/DefaultLocalSearchPhaseTest.java
Show resolved
Hide resolved
core/src/test/java/ai/timefold/solver/core/impl/localsearch/DefaultLocalSearchPhaseTest.java
Show resolved
Hide resolved
...mefold/solver/core/testdomain/pinned/unassignedvar/TestdataPinnedAllowsUnassignedEntity.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/impl/domain/lookup/LookUpManager.java
Outdated
Show resolved
Hide resolved
|
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.



No description provided.