-
Notifications
You must be signed in to change notification settings - Fork 759
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
Expose all built-in options for getConstructor
#1050
Expose all built-in options for getConstructor
#1050
Conversation
@HarrisonB can you rebase this on master? |
Sure! I'll hopefully get to it in the next week or two |
ee7a0f4
to
332667d
Compare
@justin808 updated! |
@HarrisonB can you confirm that all unit tests run locally? Currently, we don't have CI working. We need to move to GH Actions. |
Having some trouble--See #1198 (comment) |
@hibachrach is this ready for merge? |
yes, though we should have it trigger CI to make sure it passes. is there a way to do that on your end? |
@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`.
332667d
to
9aabc79
Compare
Tests are now passing! |
@justin808 The PR is good to go if we have no review comments. |
Thanks @hibachrach! |
Summary
This enables us to easily override
getConstructor
to not use globalfallback, avoiding the all-consuming
try...catch
.Other Information
Here's the context:
Quoting #264 (comment)