dart-archive / polymer-dart

Polymer support for Dart
https://pub.dartlang.org/packages/polymer
BSD 3-Clause "New" or "Revised" License
181 stars 33 forks source link

Build error on Windows with RC-18 #708

Closed montyr75 closed 8 years ago

montyr75 commented 8 years ago

Description

Build error happens on Windows 10 and Dart SDK 1.17.1, with a pubspec like so:

dependencies:
  browser: ^0.10.0
  polymer_elements: ^1.0.0-rc.9
  polymer: ^1.0.0-rc.18
  web_components: ^0.12.0

transformers:
- polymer:
    entry_points: web/index.html
- $dart2js:
    minify: true
    commandLineOptions:
    - --trust-type-annotations
    - --trust-primitives

Steps to Reproduce

Run any project with the above pubspec, even a brand new one from Stagehand, in WebStorm 2016.2 on Windows 10.

Expected Results

Project should build and run.

Actual Results

From Pub Serve:

Build error:
Transform WebComponents on test_poly|web/index.html threw error: Invalid argument(s): Illegal character in path
dart:core/uri.dart 861                                  Uri._checkWindowsPathReservedCharacters
dart:core/uri.dart 962                                  Uri._makeWindowsFileUrl
dart:core/uri.dart 744                                  Uri.Uri.file
package:analyzer/src/string_source.dart 30:45           StringSource.StringSource
package:dart_style/src/dart_formatter.dart 81:28        DartFormatter.formatSource
package:dart_style/src/dart_formatter.dart 62:12        DartFormatter.format
package:initialize/transformer.dart 340:32              _BootstrapFileBuilder._buildNewEntryPoint
package:initialize/transformer.dart 225:49              _BootstrapFileBuilder.run
package:initialize/transformer.dart 37:8                generateBootstrapFile
package:web_components/build/web_components.dart 32:29  generateWebComponentsBootstrap
package:web_components/build/web_components.dart 82:25  WebComponentsTransformer.apply.<fn>.<fn>
dart:async/zone.dart 1204                               _RootZone.runUnary
dart:async/future_impl.dart 131                         _FutureListener.handleValue
dart:async/future_impl.dart 637                         _Future._propagateToListeners.handleValueCallback
dart:async/future_impl.dart 667                         _Future._propagateToListeners
dart:async/future_impl.dart 477                         _Future._completeWithValue
dart:async/future_impl.dart 528                         _Future._asyncComplete.<fn>
dart:async/schedule_microtask.dart 41                   _microtaskLoop
dart:async/schedule_microtask.dart 50                   _startMicrotaskLoop
dart:isolate-patch/isolate_patch.dart 96                _runPendingImmediateCallback
dart:isolate-patch/isolate_patch.dart 149               _RawReceivePortImpl._handleMessage

dart:core                                               Uri.Uri.file
package:analyzer/src/string_source.dart 30:45           StringSource.StringSource
package:dart_style/src/dart_formatter.dart 81:28        DartFormatter.formatSource
package:dart_style/src/dart_formatter.dart 62:12        DartFormatter.format
package:initialize/transformer.dart 340:32              _BootstrapFileBuilder._buildNewEntryPoint
package:initialize/transformer.dart 225:49              _BootstrapFileBuilder.run
package:initialize/transformer.dart 37:8                generateBootstrapFile
package:web_components/build/web_components.dart 32:29  generateWebComponentsBootstrap
package:web_components/build/web_components.dart 82:25  WebComponentsTransformer.apply.<fn>.<fn>
[web] GET index.html => Could not find asset test_poly|web/index.html.
Build completed with 1 errors.
montyr75 commented 8 years ago

Another account of the error, featuring a possible solution: https://groups.google.com/a/dartlang.org/forum/#!topic/web/AlmvAVkrvHw

jakemac53 commented 8 years ago

Looks like @munificent is working on a fix in dart_style to play nice with the new analyzer

munificent commented 8 years ago

:+1:

munificent commented 8 years ago

Fixed by https://github.com/dart-lang/dart_style/commit/6839ce60ff79c98f61fa837ef577c12ca852b243. I'll try to get a release out before too long.