You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way live sync watch works now is to watch for file changes, and when that happens:
Trigger a platform prepare.
Sync files to the device.
The problem is that step #2 doesn't wait for #1 to complete, and doesn't detect any files changed by platform prepare (before-prepare) hooks where we usually register compilers (typescript, etc). We handle this with a hack that:
Excludes source files (e.g. *.ts from triggering a live sync).
Start another file system watcher (or three, when speaking of the nativescript-dev-typescript plugin), and compile files when we detect changes.
Modify before-prepare hooks, detect "live sync" preparation invocations, and do nothing in that case.
Wait for livesync to sync generated files using the "regular" work flow.
This manifests into all sorts of problems like:
Endless prepare-compile-prepare loops caused by omissions in ignore lists or hooks that don't detect live sync runs..
Requiring to compiler and code generator hooks to implement their logic in two places: both in their before-prepare hook and a file system watcher.
All that goes away with PR #1335 which waits for prepare hooks to run, collects changed files, and removes the need for additional file system watchers.
The text was updated successfully, but these errors were encountered:
The way live sync watch works now is to watch for file changes, and when that happens:
The problem is that step #2 doesn't wait for #1 to complete, and doesn't detect any files changed by platform prepare (
before-prepare
) hooks where we usually register compilers (typescript, etc). We handle this with a hack that:*.ts
from triggering a live sync).before-prepare
hooks, detect "live sync" preparation invocations, and do nothing in that case.This manifests into all sorts of problems like:
before-prepare
hook and a file system watcher.All that goes away with PR #1335 which waits for prepare hooks to run, collects changed files, and removes the need for additional file system watchers.
The text was updated successfully, but these errors were encountered: