Skip to content
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

pub build fails when 'show' is used in imports #15095

Closed
DartBot opened this issue Nov 15, 2013 · 2 comments
Closed

pub build fails when 'show' is used in imports #15095

DartBot opened this issue Nov 15, 2013 · 2 comments
Labels
closed-duplicate Closed in favor of an existing report

Comments

@DartBot
Copy link

DartBot commented Nov 15, 2013

This issue was originally filed by @zoechi


What steps will reproduce the problem?
1.
I read some discussions about imports and deduced that it is good practice to use 'as' and 'show'.
But when I do this pub build fails with the following output:

2.
[Warning in Dart2JS on polymer_elements|web/polymer_cookie.html_bootstrap.dart]:
packages/path/path.dart:49:23: Hint: Can't find 'dart.io.Directory.current' in the current library.
Did you forget to add an import?
@MirrorsUsed(targets: 'dart.dom.html.window, '
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
Build error:
Transform Dart2JS on polymer_elements|web/polymer_cookie.html_bootstrap.dart threw error: 'file:///mnt/data/b/build/slave/dart-editor-linux-dev/build/dart/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart': Error: line 118: type 'CompilerException' is not loaded
                if (error is CompilerException) return;
                             ^
malformed type used.
../../../../../../mnt/data/b/build/slave/dart-editor-linux-dev/build/dart/sdk/lib/_internal/pub/lib/src/barback/dart2js_transformer.dart 118 Dart2JSTransformer.apply.<fn>.<fn>
dart:async _createTimer.<fn>
timer_impl.dart 151 _Timer._createTimerHandler._handleTimeout
timer_impl.dart 166 _Timer._createTimerHandler.<fn>
dart:isolate _RawReceivePortImpl._handleMessage

[Warning in Dart2JS on polymer_elements|web/polymer_cookie.html_bootstrap.dart]:
packages/path/path.dart:49:23: Hint: Can't find 'dart.io.Platform.operatingSystem' in the current library.
Did you forget to add an import?
@MirrorsUsed(targets: 'dart.dom.html.window, '
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
[Dart2JS on polymer_elements|web/polymer_cookie.html_bootstrap.dart]:
packages/polymer_elements/polymer_cookie/polymer_cookie.dart:17:51: Warning: Cannot resolve type 'ChangeNotifier'.
  class PolymerCookie extends PolymerElement with ChangeNotifier {
                                                  ^^^^^^^^^^^^^^
[Dart2JS on polymer_elements|web/polymer_cookie.html_bootstrap.dart]:
packages/polymer_elements/polymer_cookie/polymer_cookie.dart:17:51: Error: A class can't mixin a malformed type.
Try correcting the malformed type annotation or removing the type from the 'with' clause.
  class PolymerCookie extends PolymerElement with ChangeNotifier {
                                                  ^^^^^^^^^^^^^^
[Dart2JS on polymer_elements|web/polymer_cookie.html_bootstrap.dart]:
packages/polymer_elements/polymer_cookie/polymer_cookie.dart:42:31: Error: Cannot resolve constructor 'PolymerElement+ChangeNotifier.created'.
    PolymerCookie.created() : super.created();
                              ^^^^^^^^^^^^^^^
[Dart2JS on polymer_elements|web/polymer_cookie.html_bootstrap.dart]:
packages/polymer_elements/polymer_cookie/polymer_cookie.dart:42:31: Warning: No method named 'created' in class 'PolymerElement+ChangeNotifier'.
    PolymerCookie.created() : super.created();
                              ^^^^^^^^^^^^^^^
[Dart2JS on polymer_elements|web/polymer_cookie.html_bootstrap.dart]:
packages/polymer_elements/polymer_cookie/polymer_cookie.dart:31:6: Warning: Cannot resolve 'reflectable'.
    @­reflectable @­published
     ^^^^^^^^^^^
[Dart2JS on polymer_elements|web/polymer_cookie.html_bootstrap.dart]:
packages/polymer_elements/polymer_cookie/polymer_cookie.dart:31:6: Error: Not a compile-time constant.
    @­reflectable @­published
     ^^^^^^^^^^^

3.

What is the expected output? What do you see instead?
Works in Dart and should work in JS too.

What version of the product are you using? On what operating system?
Dart VM version: 1.0.0.3_r30187 (Tue Nov 12 00:09:52 2013) on "linux_x64"

Please provide any additional information below.
example:
https://github.com/ErikGrimes/polymer_elements/blob/master/lib/polymer_cookie/polymer_cookie.dart

@sethladd
Copy link
Contributor

Thanks for the report. This is a known issue, but I can't find the existing bug report. I think Siggi might know where that is...


cc @sigmundch.
Added Area-Polymer, Library-PolymerBuild, Triaged labels.

@sigmundch
Copy link
Member

Here it is: https://code.google.com/p/dart/issues/detail?id=13849


Added Duplicate label.
Marked as being merged into #13849.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report
Projects
None yet
Development

No branches or pull requests

4 participants