Skip to content

Document further commons RPC gaps (D9-D17) + reject inert @tagged/@methodTag/@paramTag (D10) - #3

Closed
halotukozak wants to merge 2 commits into
fix-project-scala-fmtfrom
d10-tag-guard-compile-error
Closed

Document further commons RPC gaps (D9-D17) + reject inert @tagged/@methodTag/@paramTag (D10)#3
halotukozak wants to merge 2 commits into
fix-project-scala-fmtfrom
d10-tag-guard-compile-error

Conversation

@halotukozak

Copy link
Copy Markdown
Collaborator

Summary

  • Extends DIVERGENCES.md with D9-D17: a feature-by-feature comparison against the actual AVSystem/scala-commons rpc/meta source (fully generic raw-method framework, tag-driven routing, interceptors, @tried, ADT metadata, reflective metadata richness, Fallback/MacroInstances).
  • Closes the D10 landmine: @tagged/@methodTag/@paramTag used to compile and silently do nothing under mrpc's fixed fire/call/get RawRpc (no tag-selection branch exists to steer, per D9). They're now a compile error instead, via hasAnnotation[X[?]] guards in Plans.materialize (trait-level @methodTag/@paramTag) and OpPlan.materialize/ParamPlan.encodingOf (method-/param-level @tagged).
  • Adds test/mrpc/parity/TagAnnotationsRejectedSuite.scala locking in the new compile-error behavior for all three annotations, at both method and param position.

Real tag-driven routing still needs the generic raw-method framework (D9); this only closes the silent-no-op landmine, not the underlying gap. Next candidates from the D9-D17 list can follow as separate PRs.

Test plan

  • CI green (Run CI workflow)
  • scala-cli test . --test-only 'mrpc.parity.TagAnnotationsRejectedSuite' passes locally
  • No regression in existing mrpc.parity.* / mrpc.derive.* / mrpc.annotation.* suites

🤖 Generated with Claude Code

halotukozak and others added 2 commits August 9, 2026 11:05
Ported a feature-by-feature comparison against the actual AVSystem/scala-commons
rpc/meta source (fully generic raw-method framework, tag-driven routing,
interceptors, @tried, ADT metadata, reflective metadata richness, Fallback/
MacroInstances) and catalogued each confirmed gap the same way D1-D8 already do.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
They compiled and silently did nothing under mrpc's fixed fire/call/get
RawRpc (no tag-selection branch exists to steer, D9) — a landmine, not a
no-op. hasAnnotation[X[?]] guards in Plans.materialize (trait-level
@methodTag/@paramTag) and OpPlan.materialize/ParamPlan.encodingOf
(method-/param-level @tagged) turn that into a compile error instead. The
wildcard type arg matches every instantiation despite these annotations
being invariant in their type parameter.

Real tag-driven routing still needs the generic raw-method framework (D9);
this closes only the silent-no-op landmine, not the underlying gap.

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

Copy link
Copy Markdown
Collaborator Author

Superseded by #20 — GitHub blocked retargeting this PR's base branch ("part of a stack") after the fmt/version-mismatch/wsafe-init fixes moved to #16. Same content, rebased.

halotukozak added a commit that referenced this pull request Aug 10, 2026
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>
halotukozak added a commit that referenced this pull request Aug 10, 2026
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>
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