Generates invalid output with certain properties
See original GitHub issueThe React team encountered an issue with Closure Compiler when compiling the React DOM bundle. It’s quite specific, but it seems to somehow confuse the compiler into re-using a variable that is not safe to use given a given scenario.
https://github.com/facebook/react/pull/18670#issuecomment-623481140
Reproduction steps:
- Git clone React from https://github.com/facebook/react
- Checkout branch from https://github.com/facebook/react/pull/18670#issuecomment-623481140
- Run
yarn install
- Run
yarn build --type=NODE_PROD
- Run
yarn test-prod-build ReactDOMServerIntegrationTextarea
. This will run the Jest test which shows the error.
This error should be seen:
TypeError: Cannot read property 'focusedElem' of null
. It seems to be related to JSCompiler_inline_result
. Which incorrectly gets re-used from a null
value.
Specifically, the change that causes this is when we convert this logic:
function prepareForCommit(containerInfo) {
...
}
...
prepareForCommit(root.containerInfo);
to:
function prepareForCommit(containerInfo) {
...
return null;
}
...
prepareForCommit(root.containerInfo) || null;
These are the flags we use for this particular build:
compilation_level: 'SIMPLE'
language_in: 'ECMASCRIPT_2015'
language_out: 'ECMASCRIPT5_STRICT'
env: 'CUSTOM'
warning_level: 'QUIET'
apply_input_source_maps: false
use_types_for_optimization: false
process_common_js_modules: false
rewrite_polyfills: false
inject_libraries: false
assume_function_wrapper: true
Issue Analytics
- State:
- Created 3 years ago
- Comments:29 (26 by maintainers)
Top Results From Across the Web
The OutputPath property is not set for project - Stack Overflow
I got this error only when I was publishing my web project. I had mistakenly selected the wrong build configuration when setting up...
Read more >Invalid Property Value Error - OutSystems 10 Documentation
You have a mandatory property for which the value is no longer available or is invalid. For example, an Execute Action whose Action...
Read more >Resolve the error "unable to create input format" in Amazon ...
To resolve this error, use a data type that is supported by a built-in classifier. If the data format can't be classified by...
Read more >Azure Stream Analytics resource log data errors
This article explains the different input and output data errors that can occur when using Azure Stream Analytics.
Read more >xf-dev:entity-class-properties generates invalid output - XenForo
This function has entirely broken in XF 2.2.7. In PHP 7.4 it generates the following output: ErrorException: [E_DEPRECATED] Function...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, great, thanks for catching that!
Then the actual repro steps are:
And that does give the expected error, namely (several) failed tests with:
For posterity, here’s the likely cause: https://github.com/rollup/rollup/issues/4455