Uh oh!
There was an error while loading. Please reload this page.
Expose all built-in options for getConstructor - #1050
Merged
justin808 merged 1 commit intoOct 19, 2022
Merged
Conversation
hibachrach
marked this pull request as ready for review
January 10, 2020 21:04
justin808
commented
Aug 17, 2022
Collaborator
@HarrisonB can you rebase this on master? |
hibachrach
commented
Aug 17, 2022
ContributorAuthor
Sure! I'll hopefully get to it in the next week or two |
hibachrachforce-pushed
the
add-additional-options-for-getConstructor
branch
from
August 18, 2022 04:25
ee7a0f4 to
332667dComparehibachrach
commented
Aug 26, 2022
ContributorAuthor
@justin808 updated! |
justin808
commented
Aug 26, 2022
Collaborator
@HarrisonB can you confirm that all unit tests run locally? Currently, we don't have CI working. We need to move to GH Actions. |
hibachrach
commented
Aug 30, 2022
ContributorAuthor
Having some trouble--See #1198 (comment) |
justin808
commented
Sep 27, 2022
Collaborator
@hibachrach is this ready for merge? |
hibachrach
commented
Sep 29, 2022
ContributorAuthor
yes, though we should have it trigger CI to make sure it passes. is there a way to do that on your end? |
justin808
commented
Sep 30, 2022
Collaborator
@hibachrach did you rebase on master where the github actions are defined? |
Quoting reactjs#264 (comment) > Regarding `Encountered error "#<ExecJS::ProgramError: Invariant > Violation: Element type is invalid: ...`: > > I think one of the core issues is that [module lookup uses > `try...catch`](https://github.com/reactjs/react-rails/blob/master/react_ujs/src/getConstructor/fromRequireContextWithGlobalFallback.js#L11-L23). > While the errors are logged to the console shim, that typically doesn't > help as a later error (such as the invariant violation) will lead to a > fatal error (triggering a 500). If that could be refactored to be a bit > more intentional based on environment (instead of just reacting based on > exceptions, or at the very least, throwing if the caught exception isn't > very specific) This enables us to easily override `getConstructor` to not use global fallback, avoiding the all-consuming `try...catch`.
hibachrachforce-pushed
the
add-additional-options-for-getConstructor
branch
from
September 30, 2022 15:16
332667d to
9aabc79Comparehibachrach
commented
Oct 1, 2022
ContributorAuthor
Tests are now passing! |
alkesh26
commented
Oct 7, 2022
Collaborator
@justin808 The PR is good to go if we have no review comments. |
justin808
commented
Oct 19, 2022
Collaborator
Thanks @hibachrach! |
This file contains hidden or 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
Sign up for freeto 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.
Summary
This enables us to easily override
getConstructorto not use globalfallback, avoiding the all-consuming
try...catch.Other Information
Here's the context:
Quoting #264 (comment)