Shopify / Shopify/type_toolkit

Enforce that `interface!` isn't called from a `class`

Open Beginner friendly
#4 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

Only modules can be interfaces.

These should raise:

class MyClass
  interface! # ❌
end

module MyInterface
  class << self
    interface! # ❌
  end
end

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

Locate the implementation of interface! and inspect how it is invoked for classes and modules. Reproduce both Ruby examples from the issue, then add or update coverage so each invalid call raises; done means interface! remains valid for modules and rejects both class cases.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.