Remove deprecated ParserSettings.apply/create (since Akka HTTP 10.2.0)#1126
Merged
Conversation
SettingsCompanion requires apply/create(config: Config) and apply/create(configOverrides: String) which were removed as deprecated. Replace with direct apply/create methods delegating to forServer.
Motivation: ParserSettings no longer extends SettingsCompanion, so the apply(config: Config) method is no longer available. Modification: Replace ParserSettings(config) with ParserSettings.forServer, which uses the implicit ActorSystem. Remove unused @nowarn annotation and import. Result: Test compiles and runs correctly with the updated ParserSettings API.
…on removal Motivation: ParserSettings no longer extends SettingsCompanion, so ParserSettings(system) now creates server-specific settings (via forServer). Two tests relied on the old generic behavior. MiMa also reports IncompatibleMethTypeProblem, IncompatibleResultTypeProblem, and MissingTypesProblem from the SettingsCompanion removal. Modification: - ServerSettingsSpec: use ParserSettings.forClient to get client-specific settings that correctly fail when used with ServerSettings - ClientConnectionSettingsSpec: use ParserSettings.forServer explicitly - Add MiMa filters for ParserSettings$ type changes Result: Tests pass with the updated ParserSettings API and MiMa checks succeed.
Motivation: With SettingsCompanion removed from ParserSettings, there is no longer a way to create 'generic' (non-scoped) parser settings. The tests that verified early failure when using generic settings with scoped settings objects are no longer applicable. Modification: Remove the 'fail early' tests from ClientConnectionSettingsSpec and ServerSettingsSpec. Both forServer and forClient produce complete settings with max-content-length defined. Result: Remaining tests pass without the inapplicable scenario.
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.
Motivation
ParserSettings.applyandParserSettings.createwere deprecated since Akka HTTP 10.2.0 in favor offorServerandforClient.Modification
Removed deprecated
applymethods from Scala API andcreatemethods from Java API. Updated test to useforServer(). Added MiMa filters.Result
Deprecated API removed. Users should use
ParserSettings.forServer()orParserSettings.forClient().