Skip to content

[Scala 3] port SourceInfo.here macro#876

Closed
halotukozak wants to merge 2 commits into
AVSystem:scala-3from
halotukozak:05-00-miscmacros-foundation
Closed

[Scala 3] port SourceInfo.here macro#876
halotukozak wants to merge 2 commits into
AVSystem:scala-3from
halotukozak:05-00-miscmacros-foundation

Conversation

@halotukozak

@halotukozak halotukozak commented Jun 2, 2026

Copy link
Copy Markdown
Member

Slice 02-02 (partial) / Phase 2 leaf debug/source macros.

Port SourceInfo.here from Scala 2 macro stub (???) to a real Scala 3 inline implicit def backed by Position.ofMacroExpansion + Symbol.spliceOwner.owner enclosing-symbol walk.

Diff:

  • core/src/main/scala/com/avsystem/commons/misc/SourceInfo.scalahere wired to ${ hereImpl }; private[misc] def hereImpl(using Quotes): Expr[SourceInfo] added.
  • MIGRATION.md — backlog row for SourceInfo.here removed; §3 entry under core — misc SourceInfo (slice 02-02 partial) added.

Public API: unchanged. SourceInfo.here remains an implicit def returning SourceInfo; callers untouched.

Out of scope: positioned.here ships in a follow-up slice covering the rest of 02-02.

Base: scala-3 (upstream/scala-3).

@halotukozak halotukozak added this to the Scala 3 milestone Jun 2, 2026
@halotukozak halotukozak force-pushed the 05-00-miscmacros-foundation branch from c45c95d to 887b70f Compare June 2, 2026 09:44
@halotukozak halotukozak changed the title [Scala 3] port MiscMacros foundation bundle [Scala 3] port SourceInfo.here macro Jun 2, 2026
Wire SourceInfo.here to inline implicit def backed by Position.ofMacroExpansion + Symbol.spliceOwner.owner enclosing walk. Replaces Phase-1 ??? stub. Public signature unchanged.
Add §3 entry under core — misc SourceInfo (slice 02-02 partial). Remove SourceInfo.here backlog row.
@halotukozak halotukozak force-pushed the 05-00-miscmacros-foundation branch from 887b70f to 5c3f495 Compare June 2, 2026 10:43
@halotukozak halotukozak changed the base branch from 04-05-meta-annotations to scala-3 June 2, 2026 10:43
@halotukozak

Copy link
Copy Markdown
Member Author

Duplicate of #865 (broader scope: positioned.here + SourceInfo.here, with tests). Closing this one.

@halotukozak halotukozak closed this Jun 2, 2026
@halotukozak halotukozak deleted the 05-00-miscmacros-foundation branch June 2, 2026 11:04
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