Skip to content

Conversation

gwynne
Copy link
Member

@gwynne gwynne commented May 11, 2023

Previously working code which uses the now-deprecated PostgresConfiguration type with the .postgres factory methods (rather than its replacement, SQLPostgresConfiguration) while specifying neither a data encoder or decoder was throwing compiler errors. Such code now issues the intended deprecation warning instead, while continuing to work as before.

Fixes #211

…y working code using the old postgres configuration methods, while setting it up so the compiler correctly defaults to the new ones in ambiguous cases.
@gwynne gwynne added bug Something isn't working semver-patch Internal changes only labels May 11, 2023
@gwynne gwynne requested a review from 0xTim May 11, 2023 17:33
@gwynne gwynne self-assigned this May 11, 2023
@codecov-commenter
Copy link

codecov-commenter commented May 11, 2023

Codecov Report

Merging #212 (034271f) into main (c7e3976) will decrease coverage by 15.06%.
The diff coverage is 46.19%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #212       +/-   ##
===========================================
- Coverage   76.55%   61.49%   -15.06%     
===========================================
  Files           7        8        +1     
  Lines         354      348        -6     
===========================================
- Hits          271      214       -57     
- Misses         83      134       +51     
Impacted Files Coverage Δ
...s/FluentPostgresDriver/DatabaseID+PostgreSQL.swift 0.00% <0.00%> (ø)
...tions/FluentPostgresConfiguration+Deprecated.swift 0.00% <0.00%> (ø)
...ntPostgresDriver/FluentPostgresConfiguration.swift 36.76% <43.47%> (-7.50%) ⬇️
...uentPostgresDriver/PostgresConverterDelegate.swift 72.54% <66.66%> (ø)
.../FluentPostgresDriver/FluentPostgresDatabase.swift 84.81% <78.18%> (-7.01%) ⬇️
...es/FluentPostgresDriver/PostgresRow+Database.swift 85.71% <85.71%> (-4.03%) ⬇️
...es/FluentPostgresDriver/FluentPostgresDriver.swift 100.00% <100.00%> (+15.38%) ⬆️

... and 1 file with indirect coverage changes

@gwynne gwynne force-pushed the fix-deprecations branch from 9053eb5 to 034271f Compare May 11, 2023 17:58
@@ -0,0 +1,18 @@
API breakage: func DatabaseConfigurationFactory.postgres(configuration:maxConnectionsPerEventLoop:connectionPoolTimeout:encodingContext:decodingContext:sqlLogLevel:) has removed default argument from parameter 3
Copy link

Choose a reason for hiding this comment

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

Shouldn't this file be passed to the api-breakage CI using the --breakage-allowlist-path flag (or i see there is an option for it in the reusable CI) ?

Copy link

Choose a reason for hiding this comment

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

Or at second glance, i think you've made the re-useable CI default to this path, so this should be no issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

The reusable breakage check option looks for a file named for the branch being checked

@gwynne gwynne merged commit bb3ab8e into main May 11, 2023
@gwynne gwynne deleted the fix-deprecations branch May 11, 2023 18:37
@VaporBot
Copy link

These changes are now available in 2.7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working semver-patch Internal changes only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DatabaseConfigurationFactory build error in 2.7.0
4 participants