As a developer I want to use figwheel code reloading without restarting app.
Description
Type: Bug
Summary:
If you start figwheel for both builds (android & ios) it reloads env.android.main and env.ios.main namespaces on every code change (even though figwheel-no-load metadata is set) which app state re-initialization. So you ended up on login screen with clean app state.
Expected behavior
Figwheel respects ^:figwheel-no-load meta data set at env.android.main / env.ios.main namespacs and doesn't reload them.
Actual behavior
Figwheel reloads env.android.main / env.ios.main on every file change.
Reproduction
Run lein figwheel-repl android ios
Open Status on ios or android simulator
Change any file
Logs
Here are the log files after change was made to offline_messaging_settings/styles.cljs ns.
figwheel_server.log:
Successfully compiled "target/ios/app.js" in 5.434 seconds.
notifying browser that file changed: target/ios/goog/deps.js
notifying browser that file changed: target/ios/cljs_deps.js
notifying browser that file changed: target/ios/status_im/ui/screens/offline_messaging_settings/styles.js
Compiling "target/android/app.js" from ["react-native/src" "src"]...
Successfully compiled "target/android/app.js" in 4.977 seconds.
notifying browser that file changed: target/android/goog/deps.js
notifying browser that file changed: target/android/cljs_deps.js
notifying browser that file changed: target/android/status_im/ui/screens/offline_messaging_settings/styles.js
app log:
01-10 06:39:48.174 4134 4191 D ReactNativeJS: Figwheel: notified of file changes
01-10 06:39:50.316 4134 4191 I ReactNativeJS: 'Loading!', 'http://10.0.2.2:8081/target/android/goog/../status_im/ui/screens/offline_messaging_settings/styles.js'
01-10 06:39:50.349 4134 4191 I ReactNativeJS: 'Loading!', 'http://10.0.2.2:8081/target/android/goog/../status_im/ui/screens/offline_messaging_settings/views.js'
01-10 06:39:50.381 4134 4191 I ReactNativeJS: 'Loading!', 'http://10.0.2.2:8081/target/android/goog/../status_im/ui/screens/views.js'
01-10 06:39:50.420 4134 4191 I ReactNativeJS: 'Loading!', 'http://10.0.2.2:8081/target/android/goog/../status_im/android/core.js'
01-10 06:39:50.468 4134 4191 I ReactNativeJS: 'Loading!', 'http://10.0.2.2:8081/target/android/goog/../env/android/main.js'
01-10 06:39:50.478 4134 4191 D ReactNativeJS: Figwheel: loaded these files
01-10 06:39:50.483 4134 4191 I ReactNativeJS: ("../status_im/ui/screens/offline_messaging_settings/styles.js" "../status_im/ui/screens/offline_messaging_settings/views.js" "../status_im/ui/screens/views.js" "../status_im/android/core.js" "../env/android/main.js")
01-10 06:39:50.501 4134 4191 D ReactNativeJS: Figwheel: NOT loading these files
01-10 06:39:50.502 4134 4191 I ReactNativeJS: figwheel-no-load meta-data: ("../env/ios/main.js")
01-10 06:39:50.504 4134 4191 I ReactNativeJS: not required: (nil)
01-10 06:39:53.204 4134 4191 D ReactNativeJS: Figwheel: notified of file changes
01-10 06:39:55.273 4134 4191 W ReactNativeJS: 're-frame: overwriting', ':sub', 'handler for:', { ns: 're-frisk-remote.core',
01-10 06:39:55.273 4134 4191 W ReactNativeJS: name: 'db',
01-10 06:39:55.273 4134 4191 W ReactNativeJS: fqn: 're-frisk-remote.core/db',
01-10 06:39:55.273 4134 4191 W ReactNativeJS: _hash: 1877076852,
01-10 06:39:55.273 4134 4191 W ReactNativeJS: 'cljs$lang$protocol_mask$partition0$': 2153775105,
01-10 06:39:55.273 4134 4191 W ReactNativeJS: 'cljs$lang$protocol_mask$partition1$': 4096 }
01-10 06:39:55.281 4134 4191 W ReactNativeJS: 're-frame: overwriting existing post event call back with id:', [Function: re_frisk_remote$core$post_event_callback]
01-10 06:39:55.299 4134 4191 D ReactNativeJS: DEBUG [status-im.utils.handlers:29] - Handling re-frame event: :initialize-app
01-10 06:39:55.340 4134 4191 D ReactNativeJS: DEBUG [status-im.utils.handlers:29] - Handling re-frame event: :initialize-db
01-10 06:39:55.424 4134 4191 D ReactNativeJS: DEBUG [status-im.utils.handlers:29] - Handling re-frame event: :load-accounts
01-10 06:39:55.468 4134 4191 D ReactNativeJS: DEBUG [status-im.utils.handlers:29] - Handling re-frame event: :check-console-chat
01-10 06:39:55.498 4134 4191 D ReactNativeJS: DEBUG [status-im.utils.handlers:29] - Handling re-frame event: :listen-to-network-status!
01-10 06:39:55.517 4134 4191 D ReactNativeJS: DEBUG [status-im.utils.handlers:29] - Handling re-frame event: :initialize-crypt
01-10 06:39:55.522 4134 4191 D ReactNativeJS: DEBUG [status-im.utils.handlers:29] - Handling re-frame event: :initialize-geth
01-10 06:39:55.536 4134 4191 I ReactNativeJS: 'Loading!', 'http://10.0.2.2:8081/target/android/goog/../status_im/ui/screens/offline_messaging_settings/styles.js'
01-10 06:39:55.547 4134 4191 D ReactNativeJS: DEBUG [status-im.native-module.impl.module:67] - JavaScriptCore jail initialized
01-10 06:39:55.657 4134 4191 D ReactNativeJS: DEBUG [status-im.network.net-info:9] - Is connected? true
01-10 06:39:55.668 4134 4191 D ReactNativeJS: DEBUG [status-im.utils.handlers:29] - Handling re-frame event: :update-network-status
01-10 06:39:55.714 4134 4191 I ReactNativeJS: 'Loading!', 'http://10.0.2.2:8081/target/android/goog/../status_im/ui/screens/offline_messaging_settings/views.js'
01-10 06:39:55.756 4134 4191 I ReactNativeJS: 'Loading!', 'http://10.0.2.2:8081/target/android/goog/../status_im/ui/screens/views.js'
01-10 06:39:55.779 4134 4191 I ReactNativeJS: 'Loading!', 'http://10.0.2.2:8081/target/android/goog/../status_im/android/core.js'
01-10 06:39:55.784 4134 4191 D ReactNativeJS: Figwheel: loaded these files
01-10 06:39:55.785 4134 4191 I ReactNativeJS: ("../status_im/ui/screens/offline_messaging_settings/styles.js" "../status_im/ui/screens/offline_messaging_settings/views.js" "../status_im/ui/screens/views.js" "../status_im/android/core.js")
01-10 06:39:55.788 4134 4191 D ReactNativeJS: Figwheel: NOT loading these files
01-10 06:39:55.790 4134 4191 I ReactNativeJS: figwheel-no-load meta-data: ("../env/android/main.js")
01-10 06:39:55.791 4134 4191 I ReactNativeJS: not required: (nil nil)
User Story
As a developer I want to use figwheel code reloading without restarting app.
Description
Type: Bug
Summary:
If you start figwheel for both builds (android & ios) it reloads
env.android.main
andenv.ios.main
namespaces on every code change (even thoughfigwheel-no-load
metadata is set) which app state re-initialization. So you ended up on login screen with clean app state.Expected behavior
Figwheel respects
^:figwheel-no-load
meta data set atenv.android.main
/env.ios.main
namespacs and doesn't reload them.Actual behavior
Figwheel reloads
env.android.main
/env.ios.main
on every file change.Reproduction
lein figwheel-repl android ios
Logs
Here are the log files after change was made to
offline_messaging_settings/styles.cljs
ns.figwheel_server.log:
app log: