Skip to content

Skip dynamic constant namespaces in class definitions - #471

Open
Hashim1999164 wants to merge 1 commit into
Shopify:mainfrom
Hashim1999164:fix/skip-dynamic-namespace-in-class-defs
Open

Skip dynamic constant namespaces in class definitions#471
Hashim1999164 wants to merge 1 commit into
Shopify:mainfrom
Hashim1999164:fix/skip-dynamic-namespace-in-class-defs

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Aug 18, 2026

Copy link
Copy Markdown

Fixes #402

Packwerk crashed with TypeError when a class used a dynamic namespace such as module_parent::Base. The inspector already skipped that pattern for ordinary constant lookups. The class definition path did not.

This change treats both paths the same. Packwerk skips the reference instead of aborting the run.

Tests cover a dynamic superclass and a dynamic class name.

@Hashim1999164
Hashim1999164 requested a review from a team as a code owner August 18, 2026 19:47
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.

[Bug Report] Packwerk::NodeHelpers::TypeError when using module_parent in a class definition

1 participant