-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix rake benchmarks:run
#1974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix rake benchmarks:run
#1974
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the broken rake benchmarks:run task by refactoring the ThemeRunner class to properly handle theme loading, template compilation, and rendering. The changes address issues with file path resolution, method naming, and data structure initialization that were preventing the benchmark suite from running.
- Refactored ThemeRunner to use hash-based test storage instead of positional parameters
- Added support for strictness parameters and improved file system handling
- Fixed YAML formatting issues in test data and updated benchmark/profile scripts
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| performance/theme_runner.rb | Major refactor of test loading, compilation, and rendering logic with improved error handling |
| performance/shopify/vision.database.yml | Fixed YAML formatting by converting multi-line strings to single-line format |
| performance/shopify/database.rb | Added missing database fields and reorganized initialization order |
| performance/profile.rb | Enhanced profiling output with better file organization and reporting |
| performance/benchmark.rb | Updated method calls to match refactored ThemeRunner API |
| @compiled_tests ||= compile_all_tests | ||
| @compiled_tests.each do |test| |
Copilot
AI
Jul 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The memoization of @compiled_tests will cause issues if render_all is called multiple times, because the previous bug on line 108 modifies the layout objects in place. The compiled tests should be recompiled or the layout modification should be avoided.
| @compiled_tests ||= compile_all_tests | |
| @compiled_tests.each do |test| | |
| compiled_tests = compile_all_tests | |
| compiled_tests.each do |test| |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Yea so those were totally broken. That makes it hard to actually work on the performance.