Skip to content

LiveSync (too many redeploys for a single code change) #3547

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

Closed
NickIliev opened this issue Apr 25, 2018 · 3 comments
Closed

LiveSync (too many redeploys for a single code change) #3547

NickIliev opened this issue Apr 25, 2018 · 3 comments
Assignees

Comments

@NickIliev
Copy link
Contributor

NickIliev commented Apr 25, 2018

From @albertobastos on April 25, 2018 6:14

Looks like livesync has introduced some issues after 4.0 upgrade. When changes are detected, it seems that the "behind the curtain" work done by both the TypeScript compiler and the TNS Runtime mark as changed additional files also detected by the livesync, so a tiny change in the code ends up launching several deploys one after another.

I tested it with a just-created app using the nativescript-template-ng-tutorial, and adding a single Label to the main screen forced up to three re-deploys. In a bigger app such as the one I'm working on, changing a single comma now gets more than 90 seconds to be effectively deployed at the emulator :(

Scenario:

OS: Windows
Platform: Android
CLI version: 4.0.0
tns-code-modules version: 4.0.0
Runtime version (tns-android): 4.0.1

How to recreate it:

  • Create a starter app using the nativescript-template-ng-tutorial template.
  • Ensure the modules are updated with "tns update"
  • Launch livesync at emulator with "tns run android"
  • Save a minor change (for instance, adding a Label or a Button to app.component.ts) and watch the console output.

Console output:

Project successfully prepared (Android)
08:12:33 - File change detected. Starting incremental compilation...
Successfully transferred app.component.ts.
Refreshing application...
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE. 16608
Successfully synced application org.nativescript.pruebans4 on device emulator-5554.
Skipping prepare.
ActivityManager: Start proc 3759:org.nativescript.pruebans4/u0a164 for activity org.nativescript.pruebans4/com.tns.NativeScriptActivity
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE. 1433
Successfully transferred app.component.js.
Refreshing application...
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE. 2926
Successfully synced application org.nativescript.pruebans4 on device emulator-5554.
ActivityManager: Start proc 3854:org.nativescript.pruebans4/u0a164 for activity org.nativescript.pruebans4/com.tns.NativeScriptActivity
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE. 1527

Copied from original issue: NativeScript/NativeScript#5740

@NickIliev
Copy link
Contributor Author

@albertobastos thanks for reporting and logging this issue. I can confirm hat indeed on Windows the live sync is executing the Angular bootstrap 4 times.
Steps to reproduce:

  • use this project or create sample Angular project
  • run the application and made some minor code change

@albertobastos
Copy link

Any update on that issue? It's been 40 days and two upgrades since it got reported, but our team is still stranded with NS 3.4.3 because the issue still occurs with NS 4.1.

@miroslavaivanova
Copy link
Contributor

Closing as the issue seems not to be reproducible with the next and latest CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants