camsaul / toucan2

Successor library to Toucan with a modern and more-extensible API, more consistent behavior, and support for different backends including non-JDBC databases and non-HoneySQL queries. Currently in active beta.
Eclipse Public License 1.0
81 stars 11 forks source link

Avoid copying plain map when converting to instance #165

Closed crisptrutski closed 4 months ago

crisptrutski commented 8 months ago

Closes https://github.com/camsaul/toucan2/issues/164

There's some speculation here, perhaps we need to protect against some other custom map classes.

The use of a protocol is for two reasons:

  1. Extensibility in the fringe case that toucan2's used in a application that implements custom maps from scratch.
  2. Avoiding reflection on the check. Given that toucan2 is low down the stack its worth avoiding worthless extra work.
crisptrutski commented 8 months ago

Looking at when the copying was first introduced, it was originally because we wanted to cast it to a "magic" map: diff

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 83.18%. Comparing base (0d8dd6b) to head (807bc96).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #165 +/- ## ========================================== + Coverage 83.08% 83.18% +0.10% ========================================== Files 37 37 Lines 2506 2516 +10 Branches 215 214 -1 ========================================== + Hits 2082 2093 +11 Misses 209 209 + Partials 215 214 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

crisptrutski commented 8 months ago

Kondo failure seems to be a permissions issue (403)

{"message":           "Resource not accessible by integration",
 "documentation_url": "https://docs.github.com/rest/checks/runs#create-a-check-run"}