Skip to content

Commit 170ed2a

Browse files
committed
dev: Remove Reactotron.
This tool badly broke the First Law of Debuggers: A debugger may not break the normal functionality of the program. I don't understand how it produced the effect it did -- but until we do, we're not going to have the kind of confidence that it won't do that again that we'd need before re-enabling it for everyone's normal dev workflows. Specifically, the following symptom was introduced by commit 69100d1 "Reactivate Reactotron!": On opening the app cold, with the Chrome debugger open, it gets to showing the main screen and partway through actually initializing its data... typically up to MESSAGE_FETCH_COMPLETE and INIT_STREAMS... then takes about 25-30s before dispatching REALM_INIT and INITIAL_FETCH_COMPLETE. The problem appears to be 100% reproducible starting at that commit and up to master; 0% reproducible at its parent and earlier; and it's back to 0% reproducible after this commit, which takes Reactotron back out. The very long delay seen in the console is one unambiguous symptom that's helpful for diagnosing this issue, but naturally the same delay has bad effects elsewhere in the app's behavior. In particular, it badly confounds testing of other features like tapping a notification -- we wait to navigate there until after we dispatch that INITIAL_FETCH_COMPLETE, so it looks like the notification just isn't working. There's still a delay like 3-6s between INIT_STREAMS and REALM_INIT, but that's a lot more like the familiar behavior of the app.
1 parent 2ed1162 commit 170ed2a

7 files changed

+3
-147
lines changed

flow-typed/npm/reactotron-react-native_vx.x.x.js

-32
This file was deleted.

flow-typed/npm/reactotron-redux_vx.x.x.js

-32
This file was deleted.

package.json

-2
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@
116116
"prettier-eslint": "^8.8.1",
117117
"prettier-eslint-cli": "^4.7.1",
118118
"react-native-cli": "^2.0.1",
119-
"reactotron-react-native": "^2.1.0",
120-
"reactotron-redux": "^2.1.0",
121119
"redux-mock-store": "^1.5.1"
122120
},
123121
"resolutions": {

src/ZulipMobile.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* @flow strict-local */
22
import React from 'react';
33

4-
import './boot/ReactotronConfig';
54
import '../vendor/intl/intl';
65
import StoreProvider from './boot/StoreProvider';
76
import TranslationProvider from './boot/TranslationProvider';

src/boot/ReactotronConfig.js

-18
This file was deleted.

src/boot/store.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
/* @flow */
2-
import { applyMiddleware, compose } from 'redux';
2+
import { applyMiddleware, compose, createStore } from 'redux';
33
import { persistStore, autoRehydrate } from 'redux-persist';
44
import type { Config } from 'redux-persist';
55
import { AsyncStorage } from 'react-native';
66

7-
import Reactotron from './ReactotronConfig';
87
import rootReducer from './reducers';
98
import middleware from './middleware';
109
import ZulipAsyncStorage from './ZulipAsyncStorage';
@@ -69,8 +68,6 @@ const reduxPersistConfig: Config = {
6968
storage: ZulipAsyncStorage,
7069
};
7170

72-
const createStore = Reactotron ? Reactotron.createStore : require('redux').createStore;
73-
7471
const store = createStore(
7572
rootReducer,
7673
undefined,

yarn.lock

+2-58
Original file line numberDiff line numberDiff line change
@@ -5915,7 +5915,7 @@ locate-path@^2.0.0:
59155915
p-locate "^2.0.0"
59165916
path-exists "^3.0.0"
59175917

5918-
lodash-es@^4.17.4, lodash-es@^4.2.1:
5918+
lodash-es@^4.17.4:
59195919
version "4.17.4"
59205920
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7"
59215921
integrity sha1-3MHXVS4VCgZABzupyzHXDwMpUOc=
@@ -6181,7 +6181,7 @@ lodash.uniqby@^4.4.0:
61816181
resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302"
61826182
integrity sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI=
61836183

6184-
[email protected], lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.6.1:
6184+
[email protected], lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.6.1:
61856185
version "4.17.4"
61866186
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
61876187
integrity sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=
@@ -6656,11 +6656,6 @@ minimist@^1.1.1, minimist@^1.2.0:
66566656
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
66576657
integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
66586658

6659-
mitt@^1.1.2:
6660-
version "1.1.2"
6661-
resolved "https://registry.yarnpkg.com/mitt/-/mitt-1.1.2.tgz#380e61480d6a615b660f07abb60d51e0a4e4bed6"
6662-
integrity sha1-OA5hSA1qYVtmDwertg1R4KTkvtY=
6663-
66646659
[email protected], [email protected], "mkdirp@>=0.5 0", mkdirp@^0.5.1, mkdirp@~0.5.1:
66656660
version "0.5.1"
66666661
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
@@ -7511,18 +7506,6 @@ r2@^2.0.0:
75117506
node-fetch "^2.0.0-alpha.8"
75127507
typedarray-to-buffer "^3.1.2"
75137508

7514-
ramda@^0.24.1:
7515-
version "0.24.1"
7516-
resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.24.1.tgz#c3b7755197f35b8dc3502228262c4c91ddb6b857"
7517-
integrity sha1-w7d1UZfzW43DUCIoJixMkd22uFc=
7518-
7519-
ramdasauce@^2.0.0:
7520-
version "2.1.0"
7521-
resolved "https://registry.yarnpkg.com/ramdasauce/-/ramdasauce-2.1.0.tgz#65ea157a9cfc17841a7dd6499d3f9f421dc2eb36"
7522-
integrity sha512-BdHm//tlCCmeXxY5EvIvlczuWvZU5QcRybdxZ4mkDOIasWzbBs+bjt3iEVsThKCMWLIiFZpggtQmIyjtL7eOvA==
7523-
dependencies:
7524-
ramda "^0.24.1"
7525-
75267509
randomatic@^1.1.3:
75277510
version "1.1.7"
75287511
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c"
@@ -7854,30 +7837,6 @@ [email protected]:
78547837
prop-types "^15.6.2"
78557838
scheduler "^0.11.2"
78567839

7857-
reactotron-core-client@^2.1.0:
7858-
version "2.1.0"
7859-
resolved "https://registry.yarnpkg.com/reactotron-core-client/-/reactotron-core-client-2.1.0.tgz#d36f806eaf14a9f8c4595a9866f8cbfaafc1ee8c"
7860-
integrity sha512-YnTWbnpuo6Jy3kgBLUqzjbkgdyWlrosQvt1Q2LRPlo39o3n/lfncN/bmO9JQh9hD8A3L7DEQ7XCPpVPek1BJPA==
7861-
7862-
reactotron-react-native@^2.1.0:
7863-
version "2.1.0"
7864-
resolved "https://registry.yarnpkg.com/reactotron-react-native/-/reactotron-react-native-2.1.0.tgz#eefafb8d146e96f037c33ef5d57e5a4ada3124f7"
7865-
integrity sha512-dx0r6w81K1EHns13Oq3LblaXeWsZ8/0vjX4dgR5W2Jp4l7XpEBirpE+g8J1g+rWhiZObn7Jp3jmCJJoheRAncA==
7866-
dependencies:
7867-
mitt "^1.1.2"
7868-
prop-types "^15.5.10"
7869-
reactotron-core-client "^2.1.0"
7870-
7871-
reactotron-redux@^2.1.0:
7872-
version "2.1.0"
7873-
resolved "https://registry.yarnpkg.com/reactotron-redux/-/reactotron-redux-2.1.0.tgz#69568912e2894cb3d996843bdaa759c3ec59a45a"
7874-
integrity sha512-HWfDIZN5stZJrdQXp5AWgH12rgGLpXoSV2rC3va0BP9XxwgG+SKA1f2DQ8W2MrDz5wZ47PGLfhHPjqJQUM20dQ==
7875-
dependencies:
7876-
ramda "^0.24.1"
7877-
ramdasauce "^2.0.0"
7878-
reactotron-core-client "^2.1.0"
7879-
redux "^3.7.1"
7880-
78817840
read-env@^1.1.1:
78827841
version "1.1.1"
78837842
resolved "https://registry.yarnpkg.com/read-env/-/read-env-1.1.1.tgz#561f16438792b19ed10ffede0315bde37f9f87fc"
@@ -7997,16 +7956,6 @@ redux-thunk@^2.1.0:
79977956
resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.2.0.tgz#e615a16e16b47a19a515766133d1e3e99b7852e5"
79987957
integrity sha1-5hWhbha0ehmlFXZhM9Hj6Zt4UuU=
79997958

8000-
redux@^3.7.1:
8001-
version "3.7.2"
8002-
resolved "https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b"
8003-
integrity sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A==
8004-
dependencies:
8005-
lodash "^4.2.1"
8006-
lodash-es "^4.2.1"
8007-
loose-envify "^1.1.0"
8008-
symbol-observable "^1.0.3"
8009-
80107959
redux@^4.0.0:
80117960
version "4.0.0"
80127961
resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.0.tgz#aa698a92b729315d22b34a0553d7e6533555cc03"
@@ -8860,11 +8809,6 @@ [email protected]:
88608809
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4"
88618810
integrity sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=
88628811

8863-
symbol-observable@^1.0.3:
8864-
version "1.0.4"
8865-
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d"
8866-
integrity sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=
8867-
88688812
symbol-observable@^1.2.0:
88698813
version "1.2.0"
88708814
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804"

0 commit comments

Comments
 (0)