Skip to content

Conversation

@AlistairNorman
Copy link
Contributor

Summary

Prepending a configurable class runs into all kinds of trouble with load order. If the patch is loaded before the configuration changes, the newly configured class won't have the patch applied.

This shows up fairly often in tests, but could also be an issue in other environments if the config is not set to run before all of the code is eager loaded.

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

Prepending a configurable class runs into all kinds of trouble with load
order. If the patch is loaded before the configuration changes, the
newly configured class won't have the patch applied.

This shows up fairly often in tests, but could also be an issue in other
environments if the config is not set to run before all of the code is
eager loaded.

Co-authored-by: Jared Norman <[email protected]>
Co-authored-by: Noah Silvera <[email protected]>
Co-Authored-By: Sofia Besenski <[email protected]>
Co-Authored-By: Chris Todorov <[email protected]>
Co-Authored-By: Alistair Norman <[email protected]>
@AlistairNorman AlistairNorman requested a review from a team as a code owner November 20, 2025 18:46
@github-actions github-actions bot added the changelog:solidus_promotions Changes to the solidus_promotions gem label Nov 20, 2025
@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.45%. Comparing base (54f1c9e) to head (c72e46c).
⚠️ Report is 55 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6376      +/-   ##
==========================================
+ Coverage   89.37%   89.45%   +0.07%     
==========================================
  Files         961      974      +13     
  Lines       20200    20322     +122     
==========================================
+ Hits        18054    18179     +125     
+ Misses       2146     2143       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mamhoff mamhoff mentioned this pull request Nov 20, 2025
5 tasks
@adammathys adammathys merged commit 9f9753c into solidusio:main Nov 25, 2025
39 checks passed
@adammathys adammathys deleted the make-patch-prepend-explicit branch November 25, 2025 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:solidus_promotions Changes to the solidus_promotions gem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants