Skip to content

Skip dynamic constant namespaces in class definitions - #471

Merged
rafaelfranca merged 1 commit into
Shopify:mainfrom
Hashim1999164:fix/skip-dynamic-namespace-in-class-defs
Aug 26, 2026
Merged

Skip dynamic constant namespaces in class definitions#471
rafaelfranca merged 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
Contributor

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
@rafaelfranca
rafaelfranca force-pushed the fix/skip-dynamic-namespace-in-class-defs branch from b0d0d68 to 32d8f28 Compare August 26, 2026 01:18
@rafaelfranca
rafaelfranca merged commit c4f2cc4 into Shopify:main Aug 26, 2026
10 checks passed
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

2 participants