Skip to content

Show warning when livesync cannot reflect a change #1773

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
tjvantoll opened this issue May 20, 2016 · 2 comments
Closed

Show warning when livesync cannot reflect a change #1773

tjvantoll opened this issue May 20, 2016 · 2 comments
Assignees
Milestone

Comments

@tjvantoll
Copy link
Contributor

tjvantoll commented May 20, 2016

This is some feedback we got from our call with Martin Keiblinger. Suppose you have a livesync watcher running and you change some file in App_Resources—let’s say AndroidManifest.xml. You’ll see something like this:

Transferring project files...
Unable to sync file /Users/tj/dev/nativescript/sample-Groceries/app/App_Resources/Android/AndroidManifest.xml. Error is: ENOENT: no such file or directory, stat '/Users/tj/dev/nativescript/sample-Groceries/platforms/android/src/main/res/AndroidManifest.xml'
Try saving it again or restart the livesync operation.

This can be confusing as following the output’s instructions—aka saving the file again or restarting the livesync operation—isn’t going to help. Instead we should be smarter about knowing when the CLI can’t reflect a change, and print out a big error.

ERROR: We detected a change to the App_Resources/Android/AndroidManifest.xml file. This change requires a full Android build to update your application. Would you like to stop the livesync command and perform that build now? (y/n)

Something like that that at least points the user in the right direction. And we should try to include this warning for any change that we’re unable to livesync—package.json changes, etc.

@enchev
Copy link
Contributor

enchev commented May 30, 2016

Hey folks,

Interrupting livesync to perform full rebuild in case of major changes like files in the App_Resources folder is very good idea and we definitely need to research carefully how to implement it properly.

In the meantime I think that it will be easier to simply exclude files in the App_Resources folder during livesync and warn the user in case of changes in these files:
untitled

@tjvantoll
Copy link
Contributor Author

@enchev Looks great! 😀

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

3 participants