Shopify / Shopify/type_toolkit

Enforce that `abstract` methods aren't defined on an interface's singleton class

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue
Dominant language
Ruby
Stars
3
Forks
5
Avg merge
8d 23h
Merged PRs (30d)
8

Description

This should raise:

module MyInterface
  interface!

  class << self
    abstract def foo; end # ❌
  end
end

See:

  1. https://sorbet.org/docs/abstract#abstract-singleton-methods
  2. Abstract singleton class methods are an abomination

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The entry points named are interface! and abstract; begin by reading the linked Sorbet documentation and tracing where those declarations are handled. Done means the shown singleton-class declaration raises; no repository file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.