Skip to content

Fix reloading engine in dev mode#3318

Merged
tvdeyen merged 4 commits intomainfrom
fix-reloading
Jul 14, 2025
Merged

Fix reloading engine in dev mode#3318
tvdeyen merged 4 commits intomainfrom
fix-reloading

Conversation

@tvdeyen
Copy link
Copy Markdown
Member

@tvdeyen tvdeyen commented Jul 13, 2025

What is this pull request for?

Two fixes that make developer lives easier:

  1. Fix reloading of definition files
  2. Do not cache storage adapter

Checklist

tvdeyen added 2 commits July 13, 2025 20:12
`engine_name` does not seem to be available during reloading
the app in all envs.
The storage adapter lives in a autoload folder (app), which reloads
the class during dev mode, leading to undefined constants errors.
@tvdeyen tvdeyen added this to the 8.0 milestone Jul 13, 2025
@tvdeyen tvdeyen requested a review from a team as a code owner July 13, 2025 18:16
tvdeyen added 2 commits July 14, 2025 10:16
We do not need multiple `config.to_prepare` blocks.
The storage adapter shoul be set once during load and everytime
we reload the app in dev mode. This way we have the same instance
everywhere, but still get a new class instance during reloads, what
we need for the class reloading to work in dev mode.
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 14, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 97.02%. Comparing base (59d6533) to head (5f84b44).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
lib/alchemy/engine.rb 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3318      +/-   ##
==========================================
- Coverage   97.02%   97.02%   -0.01%     
==========================================
  Files         274      274              
  Lines        7169     7168       -1     
==========================================
- Hits         6956     6955       -1     
  Misses        213      213              

☔ 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.

@tvdeyen tvdeyen merged commit 70fc958 into main Jul 14, 2025
16 of 18 checks passed
@tvdeyen tvdeyen deleted the fix-reloading branch July 14, 2025 08:41
@alchemycms-bot alchemycms-bot bot mentioned this pull request Feb 4, 2026
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.

1 participant