Skip to content

Fix false-positive DAP018 (and rev deps/TFMs) - #174

Merged
mgravell merged 4 commits into
mainfrom
marc/fix_dap018
May 16, 2026
Merged

mgravell merged 4 commits into
mainfrom
marc/fix_dap018

Conversation

@mgravell

Copy link
Copy Markdown
Member

@mgravell
mgravell merged commit 795cfa8 into main May 16, 2026
2 checks passed
@mgravell
mgravell deleted the marc/fix_dap018 branch August 18, 2026 08:56
mgravell added a commit that referenced this pull request Aug 20, 2026
…203)

Npgsql 10 changed reader.GetValue() for a 'date' column to return DateOnly
rather than DateTime; DateOnly does not implement IConvertible, so the
As<DateTime[?]> fallback through Convert.ToDateTime threw InvalidCastException.
Bisected empirically: the DateOnlyTimeOnly Postgres tests pass on Npgsql 9.0.2
and fail on 10.0.2, which arrived with #174 - unseen because the Postgres
integration tests need local Docker.

As<DateTime[?]> now converts via ToDateTime(TimeOnly.MinValue), and
As<TimeOnly[?]> answers default for a date - the same answer a zero-time
DateTime gives, which is the contract the integration test documents. New
docker-free unit tests cover the matrix directly, so this coverage no longer
depends on a live container.

Fixes #202
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.

Parameters missing?

1 participant