Skip to content

Adapt to made's getAnnotation: Option[A] -> A | Null - #4

Merged
halotukozak merged 3 commits into
mainfrom
fix-made-0.3.0-compat
Aug 9, 2026
Merged

halotukozak merged 3 commits into
mainfrom
fix-made-0.3.0-compat

Conversation

@halotukozak

Copy link
Copy Markdown
Collaborator

Summary

mcodec is pinned (via mrpc's CI) to a made commit that predates a breaking API change: getAnnotation[A] now returns A | Null instead of Option[A]. deriveSum's flatten-tag lookup called .fold directly on the result, which only exists on Option.

  • Option(m.getAnnotation[mcodec.annotation.flatten]).fold("_case")(_.key) restores identical behavior (null -> None) and works regardless of -Yexplicit-nulls.

Test plan

  • Compiles against the real published made:0.3.0 (verified locally)
  • Full existing test suite passes against made:0.3.0 — 0 failures across all suites (verified locally)
  • CI green

🤖 Generated with Claude Code

…on[A]

made's getAnnotation[A] changed from Option[A] to A | Null (mcodec was
pinned to a made commit predating this change). deriveSum's flatten-tag
lookup called .fold directly on the result, which only exists on Option.
Wrapping in Option(...) restores identical behavior (null -> None) and
works regardless of the caller's -Yexplicit-nulls setting.

Verified: compiles and all existing tests pass (0 failures) against the
real published made:0.3.0.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
halotukozak added a commit to halotukozak-com/mrpc that referenced this pull request Aug 9, 2026
mcodec's old pinned commit predates made's getAnnotation Option[A] -> A |
Null change (same root cause as the made pin bump in the previous commit).
Repointing to the fix branch until halotukozak-com/mcodec#4 merges.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
halotukozak and others added 2 commits August 9, 2026 09:11
The Renovate PR bumping made alone fails CI (getAnnotation now returns
A | Null), and this branch's compat fix alone still pins made 0.1.3 so
never actually exercises the new API. Bump the dependency here so the
fix and the version move land together.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main       #4      +/-   ##
==========================================
- Coverage   81.45%   81.37%   -0.08%     
==========================================
  Files          18       18              
  Lines        1294     1294              
==========================================
- Hits         1054     1053       -1     
- Misses        240      241       +1     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@halotukozak
halotukozak merged commit ee00cbb into main Aug 9, 2026
4 checks passed
@halotukozak
halotukozak deleted the fix-made-0.3.0-compat branch August 9, 2026 07:43
halotukozak added a commit to halotukozak-com/mrpc that referenced this pull request Aug 9, 2026
mcodec's old pinned commit predates made's getAnnotation Option[A] -> A |
Null change (same root cause as the made pin bump in the previous commit).
Repointing to the fix branch until halotukozak-com/mcodec#4 merges.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
halotukozak added a commit to halotukozak-com/mrpc that referenced this pull request Aug 10, 2026
mcodec's old pinned commit predates made's getAnnotation Option[A] -> A |
Null change (same root cause as the made pin bump in the previous commit).
Repointing to the fix branch until halotukozak-com/mcodec#4 merges.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
halotukozak added a commit to halotukozak-com/mrpc that referenced this pull request Aug 10, 2026
mcodec's old pinned commit predates made's getAnnotation Option[A] -> A |
Null change (same root cause as the made pin bump in the previous commit).
Repointing to the fix branch until halotukozak-com/mcodec#4 merges.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant