Skip to content

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

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
albertobastos opened this issue Apr 25, 2018 · 3 comments
Closed

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

albertobastos opened this issue Apr 25, 2018 · 3 comments
Labels

Comments

@albertobastos
Copy link

albertobastos commented Apr 25, 2018

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:

SO: 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
@NickIliev
Copy link
Contributor

@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

@NickIliev
Copy link
Contributor

This issue was moved to NativeScript/nativescript-cli#3547

@ghost ghost removed the bug label Apr 25, 2018
@lock
Copy link

lock bot commented Aug 26, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants