Skip to content

Improve error messages when transformer plugins fail to load #896

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
DartBot opened this issue Jun 5, 2015 · 9 comments
Closed

Improve error messages when transformer plugins fail to load #896

DartBot opened this issue Jun 5, 2015 · 9 comments
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/211513?v=3" align="left" width="96" height="96"hspace="10"> Issue by yjbanov
Originally opened as dart-lang/sdk#17200


What steps will reproduce the problem?

  1. Create two projects A and B
  2. B depends on A
  3. Create a transformer in project A
  4. Add it to B's pubspec.yaml
  5. 'pub serve' project B

What is the expected output? What do you see instead?

Expecting 'pub serve' not to crash. Instead, it crashes (stderr output from pub --trace 'serve' attached).

What version of the product are you using? On what operating system?

barback 0.11.1
Tried two Dart VM versions:
1.3.0-dev.0.0 (Wed Feb 26 07:39:42 2014) on "macos_x64"
1.2.0-dev.5.15 (Mon Feb 24 02:12:58 2014) on "macos_x64"


Attachment:
barback-sterr.log (146.37 KB)

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5449880?v=3" align="left" width="48" height="48"hspace="10"> Comment by iposva-google


Added Pkg-Barback, Area-Pkg, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


I can't reproduce this locally. Can you confirm this is still happening on the latest bleeding edge pub version, and if so can you provide a tarball of an app where this happens?

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Added CannotReproduce label.

@DartBot DartBot added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Jun 5, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/211513?v=3" align="left" width="48" height="48"hspace="10"> Comment by yjbanov


So, it turns out I was incorrectly referring to the transformer. I needed to specify full path to the file where the transformer is defined, but instead I just used the package name. Bob N. says for that to work I have to name the file transformer.dart. I'll try that later.

However, that's not an excuse to produce illegible errors. It should clearly say "your transformer cannot be found" or sth like that, preferably w/o stack traces. So, I tried again. I cannot reproduce the exact same error, but I get a different error, this time even less legible that the last. Attaching both the stderr and the archived sample projects.

Dart VM version: 1.3.0-dev.3.2 (Mon Mar 10 11:06:13 2014) on "macos_x64"
Pub 1.3.0-dev.3.2


Attachments:
stderr.txt (929 Bytes)
sample-projects.zip (4.64 KB)

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


It would be nice to improve these error messages, but currently the IsolateSpawnException API doesn't expose any information we can use to do so. I've filed issue #919 to track that.


Removed Pkg-Barback, Area-Pkg labels.
Added Area-Pub, Triaged labels.
Marked this as being blocked by #919.
Changed the title to: "Improve error messages when transformer plugins fail to load".

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Oops, I mean issue dart-lang/sdk#17501.


Marked this as being blocked by dart-lang/sdk#17501.
Unmarked this as being blocked by #919.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Issue #772 has been merged into this issue.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Issue #1046 has been merged into this issue.

@matanlurey
Copy link
Contributor

We are no longer supporting transformers or pub serve/build going forward (this tooling has moved elsewhere into the https://github.com/dart-lang/build repository and https://github.com/dart-lang/webdev CLI) so a fix for this is not planned.

We'll be updating the tooling section of the Dart website in the coming weeks with more formal documentation on how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants