Add Fallback[T] for AsRaw/AsReal/AsRawReal/RpcMetadataCompanion (D17) - #4
Closed
halotukozak wants to merge 3 commits into
Closed
Add Fallback[T] for AsRaw/AsReal/AsRawReal/RpcMetadataCompanion (D17)#4halotukozak wants to merge 3 commits into
halotukozak wants to merge 3 commits into
Conversation
Mirrors commons Fallback[T]: wraps a value to lower its implicit priority below normal givens, via a fromFallback given at the bottom of each typeclass's priority chain. A Fallback-wrapped instance resolves only when nothing else does; a normal given always wins, no ambiguity. DIVERGENCES.md's D17 entry will be updated once the D9-D17 doc PR (#3) merges, since this branch predates it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 task
Removes the stray blank line in project.scala (fails scala-cli 1.16's directive formatter) and reformats FallbackSuite.scala, so the "Check formatting" CI step can pass on this branch. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
3 tasks
Same root cause as fix-wsafe-init-hang: the compiler thread gets stuck
for 10+ minutes inside dotty's init-safety checker on this codebase's
inline-derivation-heavy code. See that PR for the full thread-dump
writeup.
Note: this branch still fails to compile independently of this fix
("Not found: type Fallback" in AsRaw.scala/AsReal.scala) -- looks like
the Fallback[T] type this PR is meant to add was never committed here.
Not touched, since that's this branch's own in-progress feature work.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
halotukozak
force-pushed
the
fix-project-scala-fmt
branch
from
August 9, 2026 09:05
d41b9ca to
8aa52bc
Compare
halotukozak
changed the base branch from
fix-project-scala-fmt
to
fix-wsafe-init-hang
August 10, 2026 06:17
Collaborator
Author
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.
Summary
mrpc.Fallback[T], mirroring commonsFallback[T]: wraps a value to lower its implicit priority below normal givens.fromFallbackgiven at the bottom of the priority chain forAsRaw,AsReal,AsRawReal(below the existingfromSeparate), andRpcMetadataCompanion.Fallback-wrapped instance resolves via implicit search only when nothing else does; a normal given in scope still wins, with no ambiguity error.Part of the D9-D17 gap list from #3. This branch was cut from
masterbefore #3 merged, so it doesn't yet touchDIVERGENCES.md's D17 entry — that'll get a small follow-up update markingFallback[T]as implemented once #3 lands.Test plan
test/mrpc/conv/FallbackSuite.scala— both directions (fallback resolves alone; normal given wins over fallback) forAsRaw/AsReal/AsRawRealtest/mrpc/meta/MetadataFallbackSuite.scala— same forRpcMetadataCompanionmrpc.conv.*/mrpc.meta.*suites🤖 Generated with Claude Code