-
Notifications
You must be signed in to change notification settings - Fork 443
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
Avoid loading ActionView::Base during initialization #1659
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
joelhawksley
approved these changes
Feb 17, 2023
boardfish
added a commit
that referenced
this pull request
Jun 18, 2023
This reverts commit 01510f3.
boardfish
added a commit
that referenced
this pull request
Jun 21, 2023
This reverts commit 01510f3.
boardfish
added a commit
that referenced
this pull request
Jul 19, 2023
This reverts commit 01510f3.
camertron
added a commit
that referenced
this pull request
Aug 23, 2023
…1774) * Revert "Avoid loading ActionView::Base during initialization (#1659)" This reverts commit 01510f3. * Initialize ViewComponent::Config with defaults before framework load This commit introduces `ViewComponent::Config.current`, which should not be used directly by consumers of ViewComponent, but is used as the common thread from which `ViewComponent::Base` and `Rails.application.config.view_component` will load their config once each is ready. It'll make config available from the very start with the intent of not relying upon the framework to find these options - we can manually set anything reliant on Action View, for example, within app/engine config. * Only include URL helpers if app is loaded * Get this across the finish line --------- Co-authored-by: Cameron Dutro <camertron@gmail.com>
claudiob
pushed a commit
to claudiob/view_component
that referenced
this pull request
Dec 22, 2023
…iewComponent#1774) * Revert "Avoid loading ActionView::Base during initialization (ViewComponent#1659)" This reverts commit 01510f3. * Initialize ViewComponent::Config with defaults before framework load This commit introduces `ViewComponent::Config.current`, which should not be used directly by consumers of ViewComponent, but is used as the common thread from which `ViewComponent::Base` and `Rails.application.config.view_component` will load their config once each is ready. It'll make config available from the very start with the intent of not relying upon the framework to find these options - we can manually set anything reliant on Action View, for example, within app/engine config. * Only include URL helpers if app is loaded * Get this across the finish line --------- Co-authored-by: Cameron Dutro <camertron@gmail.com>
claudiob
pushed a commit
to claudiob/view_component
that referenced
this pull request
Jan 3, 2024
…iewComponent#1774) * Revert "Avoid loading ActionView::Base during initialization (ViewComponent#1659)" This reverts commit 01510f3. * Initialize ViewComponent::Config with defaults before framework load This commit introduces `ViewComponent::Config.current`, which should not be used directly by consumers of ViewComponent, but is used as the common thread from which `ViewComponent::Base` and `Rails.application.config.view_component` will load their config once each is ready. It'll make config available from the very start with the intent of not relying upon the framework to find these options - we can manually set anything reliant on Action View, for example, within app/engine config. * Only include URL helpers if app is loaded * Get this across the finish line --------- Co-authored-by: Cameron Dutro <camertron@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are you trying to accomplish?
This un-reverts the revert of #1528. I was unable to reproduce the Sorbet issue that caused us to revert, and there are a lot of good reasons to avoid loading
ActionView::Base
during initialization.All credit goes to @jdelStrother for the implementation.