ref(routing)!: Adopt upstream improvement parameter object - #9
Merged
Merged
Conversation
Co-authored-by: Eric Kreutzer <eric@lugg.com>
Merge upstream improvement-limit bindings and remove the fork-specific hash interface. BREAKING CHANGE: Configure improvement limits through the returned parameter object.
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.
Sync upstream's implementation of improvement limits from ankane#85 and adopt its parameter-object API. The old fork-specific hash getter and setter are removed so they cannot override the upstream binding.
Configure limits through
limits = search_parameters.improvement_limit_parameters, then setlimits.improvement_rate_coefficientandlimits.improvement_rate_solutions_distance. The getter returns a mutable parameter object rather than nil or a hash; hash assignment is no longer supported. The README and parameter tests now use the upstream interface. Callers must set valid values for both fields before solving when they enable this optional limit.The returned parameter object retains its parent search parameters through Rice's return-value lifetime annotation. A regression demonstrates that retaining the child alone must keep the parent alive across garbage collection.
The other Lugg routing extensions remain intact: solution tracing, piecewise cumul costs, callback-aware GVL release, and restoration time limits. The API currently has no callers of the removed hash interface, and adopting this gem does not enable improvement-rate stopping in the planner. Merge with a merge commit to preserve upstream ancestry.