Not sure whether this is the right place, but ran into got the following scenario and I at least want to mention it in case others run into the same problems:
I got this repo which is statically typed using Flow. Recently I decided to update some packages, including redux-immutable: from 3.0.9 to 3.0.10. Right after this update I got the following list of when kicking off my webpack build:
[1314] ./~/react-hot-loader/index.js 41 bytes {0} [built]
[1536] multi react-hot-loader/patch webpack-hot-middleware/client babel-polyfill ./src/index.js ./src/style/main.css 76 bytes {0} [built]
+ 1522 hidden modules
ERROR in node_modules/flow-runtime/src/TypeContext.js:128
128: [ParentSymbol]: ? TypeContext;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ computed property keys not supported
node_modules/flow-runtime/src/TypeContext.js:131
131: [NameRegistrySymbol]: NameRegistry = {};
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ computed property keys not supported
node_modules/flow-runtime/src/TypeContext.js:134
134: [TypePredicateRegistrySymbol]: TypePredicateRegistry = {};
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ computed property keys not supported
node_modules/flow-runtime/src/TypeContext.js:137
137: [TypeConstructorRegistrySymbol]: TypeConstructorRegistry = new Map();
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ computed property keys not supported
node_modules/flow-runtime/src/TypeContext.js:140
140: [InferrerSymbol]: TypeInferrer = new TypeInferrer(this);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ computed property keys not supported
node_modules/flow-runtime/src/TypeContext.js:143
143: [ModuleRegistrySymbol]: ModuleRegistry = {};
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ computed property keys not supported
node_modules/flow-runtime/src/TypeContext.js:146
146: [CurrentModuleSymbol]: ? ModuleDeclaration;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ computed property keys not supported
node_modules/flow-runtime/src/TypeContext.js:160
160: context[ParentSymbol] = this;
^^^^^^^^^^^^^^^^^^^^^ assignment of computed property/element. Indexable signature not found in
160: context[ParentSymbol] = this;
^^^^^^^ TypeContext
node_modules/flow-runtime/src/TypeContext.js:171
171: const inferrer = this[InferrerSymbol];
^^^^^^^^^^^^^^^^^^^^ access of computed property/element. Indexable signature not found in
171: const inferrer = this[InferrerSymbol];
^^^^ TypeContext
node_modules/flow-runtime/src/TypeContext.js:179
179: const item = this[NameRegistrySymbol][name];
^^^^^^^^^^^^^^^^^^^^^^^^ access of computed property/element. Indexable signature not found in
179: const item = this[NameRegistrySymbol][name];
^^^^ TypeContext
node_modules/flow-runtime/src/TypeContext.js:189
189: const parent = this[ParentSymbol];
^^^^^^^^^^^^^^^^^^ access of computed property/element. Indexable signature not found in
189: const parent = this[ParentSymbol];
^^^^ TypeContext
node_modules/flow-runtime/src/TypeContext.js:269
269: return input[TypeSymbol];
^^^^^^^^^^^^^^^^^ mixed. This type is incompatible with the expected return type of
266: getAnnotation <T> (input: T): ? Type<T> {
^^^^^^^ Type
node_modules/flow-runtime/src/TypeContext.js:269
269: return input[TypeSymbol];
^^^^^^^^^^ Symbol. This type is incompatible with
266: getAnnotation <T> (input: T): ? Type<T> {
^ string
node_modules/flow-runtime/src/TypeContext.js:316
316: const moduleRegistry: ModuleRegistry = (this: $FlowIssue<252>)[ModuleRegistrySymbol];
^^^^^^^^^^^^^^^ identifier `$FlowIssue`. Could not resolve name
node_modules/flow-runtime/src/TypeContext.js:325
325: const nameRegistry: NameRegistry = (this: $FlowIssue<252>)[NameRegistrySymbol];
^^^^^^^^^^^^^^^ identifier `$FlowIssue`. Could not resolve name
node_modules/flow-runtime/src/TypeContext.js:350
350: const nameRegistry: NameRegistry = (this: $FlowIssue<252>)[NameRegistrySymbol];
^^^^^^^^^^^^^^^ identifier `$FlowIssue`. Could not resolve name
node_modules/flow-runtime/src/TypeContext.js:357
357: const moduleRegistry: ModuleRegistry = (this: $FlowIssue<252>)[ModuleRegistrySymbol];
^^^^^^^^^^^^^^^ identifier `$FlowIssue`. Could not resolve name
node_modules/flow-runtime/src/TypeContext.js:364
364: const moduleRegistry: ModuleRegistry = (this: $FlowIssue<252>)[ModuleRegistrySymbol];
^^^^^^^^^^^^^^^ identifier `$FlowIssue`. Could not resolve name
node_modules/flow-runtime/src/TypeContext.js:380
380: const nameRegistry: NameRegistry = (this: $FlowIssue<252>)[NameRegistrySymbol];
^^^^^^^^^^^^^^^ identifier `$FlowIssue`. Could not resolve name
node_modules/flow-runtime/src/TypeContext.js:398
398: const handlerRegistry = this[TypeConstructorRegistrySymbol];
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ access of computed property/element. Indexable signature not found in
398: const handlerRegistry = this[TypeConstructorRegistrySymbol];
^^^^ TypeContext
node_modules/flow-runtime/src/TypeContext.js:411
411: const handlerRegistry = this[TypeConstructorRegistrySymbol];
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ access of computed property/element. Indexable signature not found in
411: const handlerRegistry = this[TypeConstructorRegistrySymbol];
^^^^ TypeContext
node_modules/flow-runtime/src/TypeContext.js:500
500: const typeParameters = subject[TypeParametersSymbol];
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ access of computed property/element. Computed property cannot be accessed with
500: const typeParameters = subject[TypeParametersSymbol];
^^^^^^^^^^^^^^^^^^^^ Symbol
node_modules/flow-runtime/src/TypeContext.js:517
517: innerContext[ParentSymbol] = this;
^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment of computed property/element. Indexable signature not found in
517: innerContext[ParentSymbol] = this;
^^^^^^^^^^^^ TypeContext
node_modules/flow-runtime/src/TypeContext.js:519
519: innerContext[CurrentModuleSymbol] = target;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ assignment of computed property/element. Indexable signature not found in
519: innerContext[CurrentModuleSymbol] = target;
^^^^^^^^^^^^ TypeContext
node_modules/flow-runtime/src/TypeContext.js:527
527: const currentModule: ModuleDeclaration = (this: $FlowIssue<252>)[CurrentModuleSymbol];
^^^^^^^^^^^^^^^ identifier `$FlowIssue`. Could not resolve name
node_modules/flow-runtime/src/TypeContext.js:778
778: const handlerRegistry = this[TypeConstructorRegistrySymbol];
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ access of computed property/element. Indexable signature not found in
778: const handlerRegistry = this[TypeConstructorRegistrySymbol];
^^^^ TypeContext
node_modules/flow-runtime/src/TypeContext.js:834
834: return makeReactPropTypes((type.unwrap(): $FlowIgnore));
^^^^^^^^^^^ identifier `$FlowIgnore`. Could not resolve name
node_modules/flow-runtime/src/TypeInferrer.js:55
55: else if (typeof input === 'symbol') {
^^^^^^^^ string literal `symbol`. This value is not a valid `typeof` return value
node_modules/flow-runtime/src/cache.js:50
50: return (subject: $FlowIgnore);
^^^^^^^^^^^ identifier `$FlowIgnore`. Could not resolve name
node_modules/flow-runtime/src/cache.js:93
93: (subject: $FlowIgnore).set(param, child);
^^^^^^^^^^^ identifier `$FlowIgnore`. Could not resolve name
node_modules/flow-runtime/src/declarations/ModuleDeclaration.js:30
30: get moduleType (): 'commonjs' | 'es6' {
^ Potentially unsafe get/set usage. Getters and setters with side effects are potentially unsafe and disabled by default. You may opt-in to using them anyway by putting `unsafe.enable_getters_and_setters=true` into the [options] section of your .flowconfig.
node_modules/flow-runtime/src/declarations/ModuleDeclaration.js:39
39: get isCommonJS (): boolean {
^ Potentially unsafe get/set usage. Getters and setters with side effects are potentially unsafe and disabled by default. You may opt-in to using them anyway by putting `unsafe.enable_getters_and_setters=true` into the [options] section of your .flowconfig.
node_modules/flow-runtime/src/declarations/ModuleDeclaration.js:43
43: get isES6 (): boolean {
^ Potentially unsafe get/set usage. Getters and setters with side effects are potentially unsafe and disabled by default. You may opt-in to using them anyway by putting `unsafe.enable_getters_and_setters=true` into the [options] section of your .flowconfig.
node_modules/flow-runtime/src/declarations/ModuleDeclaration.js:47
47: get declarations (): DeclarationDict {
^ Potentially unsafe get/set usage. Getters and setters with side effects are potentially unsafe and disabled by default. You may opt-in to using them anyway by putting `unsafe.enable_getters_and_setters=true` into the [options] section of your .flowconfig.
node_modules/flow-runtime/src/declarations/ModuleDeclaration.js:49
49: return (innerContext: $FlowIssue<252>)[NameRegistrySymbol];
^^^^^^^^^^^^^^^ identifier `$FlowIssue`. Could not resolve name
node_modules/flow-runtime/src/declarations/ModuleDeclaration.js:52
52: get modules (): ModuleDeclarationDict {
^ Potentially unsafe get/set usage. Getters and setters with side effects are potentially unsafe and disabled by default. You may opt-in to using them anyway by putting `unsafe.enable_getters_and_setters=true` into the [options] section of your .flowconfig.
node_modules/flow-runtime/src/declarations/ModuleDeclaration.js:54
54: return (innerContext: $FlowIssue<252>)[ModuleRegistrySymbol];
^^^^^^^^^^^^^^^ identifier `$FlowIssue`. Could not resolve name
node_modules/flow-runtime/src/declarations/TypeDeclaration.js:19
19: get type (): Type<T> {
^ Potentially unsafe get/set usage. Getters and setters with side effects are potentially unsafe and disabled by default. You may opt-in to using them anyway by putting `unsafe.enable_getters_and_setters=true` into the [options] section of your .flowconfig.
node_modules/flow-runtime/src/decorateFunction.test.js:63
63: return decorated('hello ', {nope: true});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function call
63: return decorated('hello ', {nope: true});
^^^^^^^^^^^^ object literal. This type is incompatible with
43: function adder <A: number | string, B: number | string> (a: A, b: B): A | B {
^^^^^^^^^^^^^^^ union: number | string
Member 1:
43: function adder <A: number | string, B: number | string> (a: A, b: B): A | B {
^^^^^^ number
Error:
63: return decorated('hello ', {nope: true});
^^^^^^^^^^^^ object literal. This type is incompatible with
43: function adder <A: number | string, B: number | string> (a: A, b: B): A | B {
^^^^^^ number
Member 2:
43: function adder <A: number | string, B: number | string> (a: A, b: B): A | B {
^^^^^^ string
Error:
63: return decorated('hello ', {nope: true});
^^^^^^^^^^^^ object literal. This type is incompatible with
43: function adder <A: number | string, B: number | string> (a: A, b: B): A | B {
^^^^^^ string
node_modules/flow-runtime/src/decorateFunction.test.js:63
63: return decorated('hello ', {nope: true});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function call
63: return decorated('hello ', {nope: true});
^^^^^^^^^^^^ object literal. This type is incompatible with
43: function adder <A: number | string, B: number | string> (a: A, b: B): A | B {
^^^^^^^^^^^^^^^ union: number | string
Member 1:
43: function adder <A: number | string, B: number | string> (a: A, b: B): A | B {
^^^^^^ number
Error:
63: return decorated('hello ', {nope: true});
^^^^^^^^^^^^ object literal. This type is incompatible with
43: function adder <A: number | string, B: number | string> (a: A, b: B): A | B {
^^^^^^ number
Member 2:
43: function adder <A: number | string, B: number | string> (a: A, b: B): A | B {
^^^^^^ string
Error:
63: return decorated('hello ', {nope: true});
^^^^^^^^^^^^ object literal. This type is incompatible with
43: function adder <A: number | string, B: number | string> (a: A, b: B): A | B {
^^^^^^ string
node_modules/flow-runtime/src/decorateGeneratorFunction.js:34
34: return result;
^^^^^^^^^^^^^^ Generator. This type is incompatible with the expected return type of
18: const decorated = function *decorated (...args: any[]): G {
^ some incompatible instantiation of `G`
node_modules/flow-runtime/src/errorReporting/__tests__/makeJSONError.test.js:259
259: @t.decorate(IThing)
^^^^^^^^^^^^^^^^^^ Experimental decorator usage. Decorators are an early stage proposal that may change. Additionally, Flow does not account for the type implications of decorators at this time.
node_modules/flow-runtime/src/errorReporting/__tests__/makeJSONError.test.js:264
264: @t.decorate(IInvalid)
^^^^^^^^^^^^^^^^^^^^ Experimental decorator usage. Decorators are an early stage proposal that may change. Additionally, Flow does not account for the type implications of decorators at this time.
node_modules/flow-runtime/src/typed.test.js:221
221: @t.decorate(t.object(
^ Experimental decorator usage. Decorators are an early stage proposal that may change. Additionally, Flow does not account for the type implications of decorators at this time.
node_modules/flow-runtime/src/typed.test.js:237
237: @t.decorate(t.object(
^ Experimental decorator usage. Decorators are an early stage proposal that may change. Additionally, Flow does not account for the type implications of decorators at this time.
node_modules/flow-runtime/src/types/ParameterizedFunctionType.js:20
20: get partial (): PartialType<(...params: P[]) => R> {
^ Potentially unsafe get/set usage. Getters and setters with side effects are potentially unsafe and disabled by default. You may opt-in to using them anyway by putting `unsafe.enable_getters_and_setters=true` into the [options] section of your .flowconfig.
node_modules/flow-runtime/src/types/ParameterizedFunctionType.js:28
28: get typeParameters (): TypeParameter<X>[] {
^ Potentially unsafe get/set usage. Getters and setters with side effects are potentially unsafe and disabled by default. You may opt-in to using them anyway by putting `unsafe.enable_getters_and_setters=true` into the [options] section of your .flowconfig.
node_modules/flow-runtime/src/types/ParameterizedFunctionType.js:32
32: get params (): FunctionTypeParam<P>[] {
^ Potentially unsafe get/set usage. Getters and setters with side effects are potentially unsafe and disabled by default. You may opt-in to using them anyway by putting `unsafe.enable_getters_and_setters=true` into the [options] section of your .flowconfig.
node_modules/flow-runtime/src/types/ParameterizedFunctionType.js:36
36: get rest (): ? FunctionTypeRestParam<P> {
^ Potentially unsafe get/set usage. Getters and setters with side effects are potentially unsafe and disabled by default. You may opt-in to using them anyway by putting `unsafe.enable_getters_and_setters=true` into the [options] section of your .flowconfig.
node_modules/flow-runtime/src/types/ParameterizedFunctionType.js:40
40: get returnType (): Type<R> {
^ Potentially unsafe get/set usage. Getters and setters with side effects are potentially unsafe and disabled by default. You may opt-in to using them anyway by putting `unsafe.enable_getters_and_setters=true` into the [options] section of your .flowconfig.
... 9 more errors (only 50 out of 59 errors displayed)
To see all errors, re-run Flow with --show-all-errors
I downgraded every single package until the version bump of redux-immutable was the only one left. Globally scrolling through the commits done for 3.0.10 I'm not sure why this suddenly occurs.
Not sure whether this is the right place, but ran into got the following scenario and I at least want to mention it in case others run into the same problems:
I got this repo which is statically typed using Flow. Recently I decided to update some packages, including redux-immutable: from 3.0.9 to 3.0.10. Right after this update I got the following list of when kicking off my webpack build:
I downgraded every single package until the version bump of redux-immutable was the only one left. Globally scrolling through the commits done for 3.0.10 I'm not sure why this suddenly occurs.