Skip to content

livescync stops working with --no-hmr if changes are reverted #5132

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
endarova opened this issue Nov 14, 2019 · 0 comments
Closed

livescync stops working with --no-hmr if changes are reverted #5132

endarova opened this issue Nov 14, 2019 · 0 comments
Assignees
Labels
bug no-changelog The issue is present only in `next` versions and was not included in official version.
Milestone

Comments

@endarova
Copy link
Contributor

Environment

  • CLI: 6.2.1
  • Cross-platform modules:
  • Android Runtime:
  • iOS Runtime:
  • Plugin(s):

Describe the bug
When run with --no-hmr flag after same changes which are synced if you revert the app to initial state this change is not synced.

To Reproduce

  1. tns create TestApp --ng
  2. tns run android --path TestApp --no-hmr
  3. make some set of changes - they are synced
  4. Revert the changes - the last change which applies the app's initial state wont be synced
    Log:
Hash: 569f7f6a75c9f70ac865
Version: webpack 4.27.1
Time: 123ms
Built at: 11/14/2019 3:06:48 PM
    Asset      Size  Chunks             Chunk Names
bundle.js  40.9 KiB  bundle  [emitted]  bundle
 + 2 hidden assets
Entrypoint bundle = runtime.js vendor.js bundle.js
[../$$_lazy_route_resource lazy recursive] ../$$_lazy_route_resource lazy namespace object 160 bytes {bundle} [built]
[./app.css] 2.01 KiB {bundle} [built]
    + 541 hidden modules
Webpack compilation complete. Watching for file changes.
Webpack build done! ```
 

And nothing is synced

**Expected behavior**
All change should be synced

@endarova endarova added bug no-changelog The issue is present only in `next` versions and was not included in official version. labels Nov 14, 2019
@endarova endarova added this to the 6.2.1 milestone Nov 14, 2019
Fatme added a commit that referenced this issue Nov 15, 2019
…reverted to the initial state of application

Livesync doesn't work when `tns run ios --no-hmr` command is executed, same changes are synced and the application is reverted to its initial state. On first webpack compilation CLI stores the initial hash of the compilation but the stored hash is updated only in `hmr` mode. On the other side, CLI has a logic to return when the stored hash is the same as the current hash. So, when the changes are reverted to the initial state of the application, the current hash is the same as the first reported hash. This way, CLI doesn't execute any livesync logic after the reported changes from webpack process.

Rel to: #5132
@Fatme Fatme self-assigned this Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug no-changelog The issue is present only in `next` versions and was not included in official version.
Projects
None yet
Development

No branches or pull requests

2 participants