Skip to content
This repository has been archived by the owner on Jul 20, 2018. It is now read-only.

pub hanging when hitting refresh after changing a file. #5

Closed
Pacane opened this issue Apr 17, 2015 · 1 comment
Closed

pub hanging when hitting refresh after changing a file. #5

Pacane opened this issue Apr 17, 2015 · 1 comment

Comments

@Pacane
Copy link

Pacane commented Apr 17, 2015

I don't know if the problem is here or not but I'm trying anyway. I've opened an issue @ angular.dart already but I have no answer whatsoever.

I'm trying to reopen it here because I think it may have something to do with barback...

Overview of the Issue - When I launch the project, it works fine. When I change a line of the code, and press Refresh in Dartium, it will just never refresh.

If I take a look at pub's log sometimes I can see errors like this after editing a file:

Build error:
Failed to load source asset grocery_store|lib/grocery_list_component.dart___jb_bak___: Could not find asset grocery_store|lib/grocery_list_component.dart___jb_bak___.
/mnt/data/b/build/slave/dart-editor-linux-dev/build/dart/sdk/lib/_internal/pub/lib/src/barback/pub_package_provider.dart 82  PubPackageProvider._assertExists
/mnt/data/b/build/slave/dart-editor-linux-dev/build/dart/sdk/lib/_internal/pub/lib/src/barback/pub_package_provider.dart 76  PubPackageProvider.getAsset.<async>
dart:isolate 

Note that this error is produced while developing with IntelliJ, but I have also tried editing a file with Vim, but it doesn't work either. (However I don't see these error messages ^)

Use case - It does it with 2 of my Angular apps, and doesn't do it with other apps that don't use Angular.
Angular Version(s) - 1.1.1
Dart Version - 1.9.1 (I've also tried with unstable 1.10.0-dev.1.1)
Browsers and Operating System - is this a problem with all browsers? Dartium stable
Reproduce the Error :

  • Take this project, on master branch. https://github.com/Pacane/grocery-store
  • pub upgrade
  • pub serve
  • Go in dartium and press "Add item" (an item should be added to the list)
  • Now go in grocery_list_component.dart and comment the body of the method addItem() - it should prevent the item to be added to the list
  • Refresh and Dartium
  • Page never refreshes -- it keeps spinning
  • If you're lucky, you should see errors in pub (doesn't always happen)
    Related Issues - has a similar issue been reported before? I haven't seen any.

Workaround: - A current work around is to restart pub, but this is not viable.

@nex3
Copy link
Contributor

nex3 commented Apr 17, 2015

If you see the hanging issue without the ___jb_bak___ errors, it's unlikely that they're the cause.

In general, it's possible for complex transformers that communicate with one another out-of-band to deadlock. We've seen this before with the Angular transformers in particular, so until more information pops up, I'm going to close this on the assumption that it's a bug in Angular rather than barback.

@nex3 nex3 closed this as completed Apr 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants