Skip to content

Add type-protocols and protocols-with-method#402

Merged
bbatsov merged 1 commit into
masterfrom
protocol-xref
Jun 24, 2026
Merged

Add type-protocols and protocols-with-method#402
bbatsov merged 1 commit into
masterfrom
protocol-xref

Conversation

@bbatsov

@bbatsov bbatsov commented Jun 24, 2026

Copy link
Copy Markdown
Member

Follow-on to #401, backing the reverse-lookup and method-search protocol commands in CIDER.

  • orchard.xref/type-protocols returns the protocols a class implements - both extend/extend-type/extend-protocol and inline defrecord/deftype (found by testing each loaded protocol's interface).
  • orchard.xref/protocols-with-method returns the protocols whose :sigs declare a method of the given name.

Both scan the loaded protocols, so only loaded code is visible - consistent with the rest of orchard.xref.

orchard.xref/type-protocols returns the protocols a class implements - both
extend/extend-type/extend-protocol and inline defrecord/deftype - by scanning
the loaded protocols and testing each. orchard.xref/protocols-with-method
returns the protocols declaring a method of a given name.

These back the reverse-lookup and method-search variants of CIDER's protocol
exploration, the counterpart to protocol-impls/who-implements.
@bbatsov bbatsov merged commit ff7eae2 into master Jun 24, 2026
12 checks passed
@alexander-yakushev alexander-yakushev deleted the protocol-xref branch July 4, 2026 18:00
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