Skip to content

fix: don't update local hashes on livesync #3983

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

Merged
merged 2 commits into from
Oct 10, 2018
Merged

Conversation

Fatme
Copy link
Contributor

@Fatme Fatme commented Oct 5, 2018

PR Checklist

Steps to reproduce:

  1. tns create myApp
  2. tns run android & stop the command
  3. tns run android & make some changes -> everything is ok
  4. tns run android on another device
  5. The changes from 3. are not applied

@@ -30,7 +30,7 @@ export abstract class AndroidDeviceLiveSyncServiceBase extends DeviceLiveSyncSer
const deviceHashService = this.getDeviceHashService(deviceAppData.appIdentifier);
const currentHashes = await deviceHashService.generateHashesFromLocalToDevicePaths(localToDevicePaths);
const transferredFiles = await this.transferFilesCore(deviceAppData, localToDevicePaths, projectFilesPath, currentHashes, options);
await this.updateHashes(deviceAppData, currentHashes, projectData, liveSyncDeviceInfo);
await this.updateHashesOnDevice(deviceAppData, currentHashes);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe you can use directly:

this.device.fileSystem.updateHashesOnDevice(currentHashes, deviceAppData.appIdentifier);

@@ -30,7 +30,7 @@ export abstract class AndroidDeviceLiveSyncServiceBase extends DeviceLiveSyncSer
const deviceHashService = this.getDeviceHashService(deviceAppData.appIdentifier);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have some duplicate logic in this file and in the AndroidDeviceFileSystem. Instead of calling a method here, you can just call:

this.device.fileSystem.getDeviceHashService(deviceAppData.appIdentifier);

With the current implementation we have duplicate cashing of the Hash services

@Fatme Fatme force-pushed the fatme/fix-android-hashes branch from fa217df to 711a3de Compare October 9, 2018 11:29
@Fatme Fatme force-pushed the fatme/fix-android-hashes branch from 711a3de to fe7bbe3 Compare October 9, 2018 12:30
Copy link
Contributor

@rosen-vladimirov rosen-vladimirov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

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

Successfully merging this pull request may close these issues.

2 participants