GithubHelp home page GithubHelp logo

dart-lang / webdev Goto Github PK

View Code? Open in Web Editor NEW
210.0 38.0 67.0 19.29 MB

A CLI for Dart web development.

Home Page: https://pub.dev/packages/webdev

Dart 98.35% HTML 0.74% JavaScript 0.50% CSS 0.33% Shell 0.09%

webdev's Introduction

Dart

Packages

Package Description Version
dwds A service that proxies between the Chrome debug protocol and the Dart VM service protocol. pub package
frontend_server_client Client code to start and interact with the frontend_server compiler from the Dart SDK. pub package
webdev A CLI for Dart web development. Provides an easy and consistent set of features for users and tools to build and deploy web applications with Dart. pub package

Publishing automation

For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

webdev's People

Contributors

alan-knight avatar alorenzen avatar bkonyi avatar dantup avatar dcharkes avatar dependabot[bot] avatar derekxu16 avatar devoncarew avatar elliette avatar evanweible-wf avatar franklinyow avatar grouma avatar jacob314 avatar jakemac53 avatar jonahwilliams avatar kenzieschmoll avatar kevmoo avatar leonsenft avatar markzipan avatar mit-mit avatar mosuem avatar natebosch avatar nshahan avatar parlough avatar pq avatar samogot avatar srawlins avatar srujzs avatar vsmenon avatar xvrh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webdev's Issues

'webdev serve' on Fedora 28 ProcessException: No such file or directory

Hey. I've been using dart on my Windows 10 machine and had this issue with webdev serve: other person's Stack Overflow Question.
The proposed solution worked for that.

Now I've just built dart on my Fedora 28 machine by somewhat following: this guide

I added this to my path: export PATH="$PATH":"$HOME/.pub-cache/bin" and successfully ran pub global activate webdev

But when I call webdev serve, I get this error message:

$ webdev serve
Unhandled exception:
ProcessException: No such file or directory
  Command: /home/myUserName/development/dart/dart-sdk/sdk/out/bin/pub deps
#0      _ProcessImpl._runAndWait (dart:io/runtime/binprocess_patch.dart:485:7)
#1      _runNonInteractiveProcessSync (dart:io/runtime/binprocess_patch.dart:631:18)
#2      Process.runSync (dart:io/runtime/binprocess_patch.dart:66:12)
#3      _runPubDeps (package:webdev/src/pubspec.dart:45:24)
<asynchronous suspension>
#4      checkPubspecLock (package:webdev/src/pubspec.dart:62:9)
<asynchronous suspension>
#5      CommandBase.runCore (package:webdev/src/command/command_base.dart:77:11)
<asynchronous suspension>
#6      ServeCommand.run (package:webdev/src/command/serve_command.dart:53:24)
#7      CommandRunner.runCommand (package:args/command_runner.dart:194:27)
<asynchronous suspension>
#8      CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109:29)
#9      new Future.sync (dart:async/future.dart:224:31)
#10     CommandRunner.run (package:args/command_runner.dart:109:11)
#11     run (package:webdev/src/webdev_command_runner.dart:23:23)
<asynchronous suspension>
#12     main (file:///home/jbtabb/.pub-cache/hosted/pub.dartlang.org/webdev-0.2.3+2/bin/webdev.dart:16:22)
<asynchronous suspension>
#13     _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:277:32)
#14     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)

I think the problem in Command: /home/myUserName/development/dart/dart-sdk/sdk/out/bin/pub deps is that it should say /home/myUserName/development/dart/dart-sdk/sdk/sdk/bin/pub deps.
I do have it this way in my Path for dart as so: export PATH=/home/myUserName/development/dart/dart-sdk/sdk/sdk/bin:$PATH.

I looked through the webdev code to see where I could change this, but couldn't find it.

By the way, the solution in that stack overflow question works for this problem, too.

`build_web_compilers` version – 0.4.0 – is not within the allowed constraint – ^0.3.6

I can't run Angular example apps from within IntelliJ EAP. An attempt results in:

/opt/brew/opt/dart/libexec/bin/pub global run webdev serve web:51764
webdev could not run for this project.
The `build_web_compilers` version – 0.4.0 – is not within the allowed constraint – ^0.3.6.
Dart Dev Server terminated

My app is using 0.4.0. Where is the 0.3.6 constraint coming from, webdev?

cc @kwalrath @jakemac53

`build_results_handler_test`s are flaky on Windows

It's likely due to the fact that pumping the event queue isn't enough to ensure that the messages are passed through. Increasing the amount of times we pump could reduce flakiness. Otherwise we can rework the tests entirely.

Add support for `preview-dart-2`

We want to enable preview-dart-2 as soon as we can, even when it is still only a flag for dart2js.

This should both run build_runner on the --preview-dart-2 vm, as well as run DDC and Dart2Js with the --preview-dart-2 flags set.

Open question: do we introduce this as a flag? And when do we make it the default?

Be able to run webdev test on travis

Right now, travis has support for directly running pub run test with extra flags as part of your travis.yml config.
Once we have the ability to run tests directly via webdev, we should add this support to travis.

Just adding the issue here for tracking.

Please add --delete-conflicting-outputs

It's so annoying that webdev always asks me

Found 1 declared outputs which already exist on disk. This is likely because the`.dart_tool/build` folder was deleted, or you are submitting generated files to your source repository.
Delete these files?
1 - Delete
2 - Cancel build
3 - List conflicts

Ensure up-to-date dependencies

Blocking angulardart/angular#1095.

It's incredibly easy to use an out-of-date set of build_runner, build_web_compilers, and build_test - which, coupled with dart-lang/pub#912, means that users frequently use out of date development dependencies, and when they try and upgrade, hit deadlocks or incomprehensible error messages, i.e (as an example only):

Resolving dependencies...
Package angular_components has no versions that match >=0.9.0-alpha+8 <0.10.0 derived from:
- merck_crm_mashup depends on version ^0.9.0-alpha+8
Process finished with exit code 1

An alternative would be support for peer_dependencies in pub: dart-lang/pub#1837.

Do not live reload if build fails

Live reload works great, but once the build fails it won't work even if you fix the build.

Once solution would be not to reload if the build failed or serve a static page if the build failed that would still keep the connection between the build system and the browser.

webdev crashes on macOS

I tried to use webdev for new dart project but it fails when I run webdev serve or webdev build .
It fails on macOS but it works on my Fedora 28 linux box. I try to run this on this project https://github.com/charafau/json2builtvalue

Dart version:
Dart VM version: 2.0.0-dev.65.0 (Tue Jun 26 14:17:21 2018 +0200) on "macos_x64" (but was the same on 64)

log:

➜  json2builtvalue git:(master) ✗ webdev build
Crash when formatting: [AsciiControlCharacter] The control character U+001A can only be used in strings and comments.
RangeError (index): Invalid value: Not in range 0..269831, inclusive: 273148
#0      _StringBase.[] (dart:core/runtime/libstring_patch.dart:233:55)
#1      Source.getTextLine (package:kernel/ast.dart:5805:42)
#2      getSourceLine (package:front_end/src/fasta/messages.dart:27:9)
#3      format (package:front_end/src/fasta/command_line_reporting.dart:80:27)
#4      ProcessedOptions.format (package:front_end/src/base/processed_options.dart:206:32)
#5      ProcessedOptions.report (package:front_end/src/base/processed_options.dart:215:22)
#6      CompilerContext.report (package:front_end/src/fasta/compiler_context.dart:67:13)
#7      Loader.addMessage (package:front_end/src/fasta/loader.dart:258:20)
#8      Loader.addCompileTimeError (package:front_end/src/fasta/loader.dart:207:5)
#9      LibraryBuilder.addCompileTimeError (package:front_end/src/fasta/builder/library_builder.dart:89:12)
#10     SourceLoader.tokenize (package:front_end/src/fasta/source/source_loader.dart:174:17)
<asynchronous suspension>
#11     SourceLoader.buildOutline (package:front_end/src/fasta/source/source_loader.dart:192:26)
<asynchronous suspension>
#12     Loader.buildOutlines (package:front_end/src/fasta/loader.dart:176:13)
<asynchronous suspension>
#13     KernelTarget.buildOutlines (package:front_end/src/fasta/kernel/kernel_target.dart:237:20)
<asynchronous suspension>
#14     IncrementalCompiler.computeDelta.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:232:24)
<asynchronous suspension>
#15     CompilerContext.runInContext.<anonymous closure>.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:118:46)
#16     new Future.sync (dart:async/future.dart:222:31)
#17     CompilerContext.runInContext.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:118:19)
#18     _rootRun (dart:async/zone.dart:1126:13)
#19     _CustomZone.run (dart:async/zone.dart:1023:19)
#20     _runZoned (dart:async/zone.dart:1518:10)
#21     runZoned (dart:async/zone.dart:1465:12)
#22     CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:117:12)
#23     IncrementalCompiler.computeDelta (package:front_end/src/fasta/incremental_compiler.dart:102:20)
<asynchronous suspension>
#24     IncrementalCompiler.compile (package:vm/incremental_compiler.dart:38:44)
<asynchronous suspension>
#25     IncrementalCompilerWrapper.compileInternal (file:///b/build/slave/dart-sdk-mac-dev/build/sdk/pkg/vm/bin/kernel_service.dart:159:28)
<asynchronous suspension>
#26     Compiler.compile.<anonymous closure> (file:///b/build/slave/dart-sdk-mac-dev/build/sdk/pkg/vm/bin/kernel_service.dart:133:39)
#27     new Future.<anonymous closure> (dart:async/future.dart:174:37)
#28     _rootRun (dart:async/zone.dart:1122:38)
#29     _CustomZone.run (dart:async/zone.dart:1023:19)
#30     _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#31     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)
#32     _rootRun (dart:async/zone.dart:1126:13)
#33     _CustomZone.run (dart:async/zone.dart:1023:19)
#34     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:949:23)
#35     Timer._createTimer.<anonymous closure> (dart:async/runtime/libtimer_patch.dart:21:15)
#36     _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#37     _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#38     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)

Crash when compiling file:///Users/rafal.wachol/.pub-cache/global_packages/webdev/bin/webdev.dart.snapshot,
at character offset 266233:
RangeError (index): Invalid value: Not in range 0..269831, inclusive: 273148
#0      _StringBase.[] (dart:core/runtime/libstring_patch.dart:233:55)
#1      Source.getTextLine (package:kernel/ast.dart:5805:42)
#2      getSourceLine (package:front_end/src/fasta/messages.dart:27:9)
#3      format (package:front_end/src/fasta/command_line_reporting.dart:80:27)
#4      ProcessedOptions.format (package:front_end/src/base/processed_options.dart:206:32)
#5      ProcessedOptions.report (package:front_end/src/base/processed_options.dart:215:22)
#6      CompilerContext.report (package:front_end/src/fasta/compiler_context.dart:67:13)
#7      Loader.addMessage (package:front_end/src/fasta/loader.dart:258:20)
#8      Loader.addCompileTimeError (package:front_end/src/fasta/loader.dart:207:5)
#9      LibraryBuilder.addCompileTimeError (package:front_end/src/fasta/builder/library_builder.dart:89:12)
#10     SourceLoader.tokenize (package:front_end/src/fasta/source/source_loader.dart:174:17)
<asynchronous suspension>
#11     SourceLoader.buildOutline (package:front_end/src/fasta/source/source_loader.dart:192:26)
<asynchronous suspension>
#12     Loader.buildOutlines (package:front_end/src/fasta/loader.dart:176:13)
<asynchronous suspension>
#13     KernelTarget.buildOutlines (package:front_end/src/fasta/kernel/kernel_target.dart:237:20)
<asynchronous suspension>
#14     IncrementalCompiler.computeDelta.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:232:24)
<asynchronous suspension>
#15     CompilerContext.runInContext.<anonymous closure>.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:118:46)
#16     new Future.sync (dart:async/future.dart:222:31)
#17     CompilerContext.runInContext.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:118:19)
#18     _rootRun (dart:async/zone.dart:1126:13)
#19     _CustomZone.run (dart:async/zone.dart:1023:19)
#20     _runZoned (dart:async/zone.dart:1518:10)
#21     runZoned (dart:async/zone.dart:1465:12)
#22     CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:117:12)
#23     IncrementalCompiler.computeDelta (package:front_end/src/fasta/incremental_compiler.dart:102:20)
<asynchronous suspension>
#24     IncrementalCompiler.compile (package:vm/incremental_compiler.dart:38:44)
<asynchronous suspension>
#25     IncrementalCompilerWrapper.compileInternal (file:///b/build/slave/dart-sdk-mac-dev/build/sdk/pkg/vm/bin/kernel_service.dart:159:28)
<asynchronous suspension>
#26     Compiler.compile.<anonymous closure> (file:///b/build/slave/dart-sdk-mac-dev/build/sdk/pkg/vm/bin/kernel_service.dart:133:39)
#27     new Future.<anonymous closure> (dart:async/future.dart:174:37)
#28     _rootRun (dart:async/zone.dart:1122:38)
#29     _CustomZone.run (dart:async/zone.dart:1023:19)
#30     _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#31     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)
#32     _rootRun (dart:async/zone.dart:1126:13)
#33     _CustomZone.run (dart:async/zone.dart:1023:19)
#34     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:949:23)
#35     Timer._createTimer.<anonymous closure> (dart:async/runtime/libtimer_patch.dart:21:15)
#36     _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#37     _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#38     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)


#0      _StringBase.[] (dart:core/runtime/libstring_patch.dart:233:55)
#1      Source.getTextLine (package:kernel/ast.dart:5805:42)
#2      getSourceLine (package:front_end/src/fasta/messages.dart:27:9)
#3      format (package:front_end/src/fasta/command_line_reporting.dart:80:27)
#4      ProcessedOptions.format (package:front_end/src/base/processed_options.dart:206:32)
#5      ProcessedOptions.report (package:front_end/src/base/processed_options.dart:215:22)
#6      CompilerContext.report (package:front_end/src/fasta/compiler_context.dart:67:13)
#7      Loader.addMessage (package:front_end/src/fasta/loader.dart:258:20)
#8      Loader.addCompileTimeError (package:front_end/src/fasta/loader.dart:207:5)
#9      LibraryBuilder.addCompileTimeError (package:front_end/src/fasta/builder/library_builder.dart:89:12)
#10     SourceLoader.tokenize (package:front_end/src/fasta/source/source_loader.dart:174:17)
<asynchronous suspension>
#11     SourceLoader.buildOutline (package:front_end/src/fasta/source/source_loader.dart:192:26)
<asynchronous suspension>
#12     Loader.buildOutlines (package:front_end/src/fasta/loader.dart:176:13)
<asynchronous suspension>
#13     KernelTarget.buildOutlines (package:front_end/src/fasta/kernel/kernel_target.dart:237:20)
<asynchronous suspension>
#14     IncrementalCompiler.computeDelta.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:232:24)
<asynchronous suspension>
#15     CompilerContext.runInContext.<anonymous closure>.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:118:46)
#16     new Future.sync (dart:async/future.dart:222:31)
#17     CompilerContext.runInContext.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:118:19)
#18     _rootRun (dart:async/zone.dart:1126:13)
#19     _CustomZone.run (dart:async/zone.dart:1023:19)
#20     _runZoned (dart:async/zone.dart:1518:10)
#21     runZoned (dart:async/zone.dart:1465:12)
#22     CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:117:12)
#23     IncrementalCompiler.computeDelta (package:front_end/src/fasta/incremental_compiler.dart:102:20)
<asynchronous suspension>
#24     IncrementalCompiler.compile (package:vm/incremental_compiler.dart:38:44)
<asynchronous suspension>
#25     IncrementalCompilerWrapper.compileInternal (file:///b/build/slave/dart-sdk-mac-dev/build/sdk/pkg/vm/bin/kernel_service.dart:159:28)
<asynchronous suspension>
#26     Compiler.compile.<anonymous closure> (file:///b/build/slave/dart-sdk-mac-dev/build/sdk/pkg/vm/bin/kernel_service.dart:133:39)
#27     new Future.<anonymous closure> (dart:async/future.dart:174:37)
#28     _rootRun (dart:async/zone.dart:1122:38)
#29     _CustomZone.run (dart:async/zone.dart:1023:19)
#30     _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#31     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)
#32     _rootRun (dart:async/zone.dart:1126:13)
#33     _CustomZone.run (dart:async/zone.dart:1023:19)
#34     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:949:23)
#35     Timer._createTimer.<anonymous closure> (dart:async/runtime/libtimer_patch.dart:21:15)
#36     _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#37     _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#38     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)

Add support for build_runner's "watch" mode

When working with separate front- and back-end development environments, it would be helpful to support a "watch" feature like build_runner used to that would watch the source for changes and re-compile when a source file is updated, but did not serve the app itself.

For example, I use Go App Engine and thus use their development server for back-end work. build_runner used to let me have the auto-rebuild features with an --output path that would dump the compiled front-end into the appropriate GAE dev_appserver directory. webdev has the watch/rebuild built into the "serve" command but no way to disable actually serving the app.

`serve` command default release mode isn't clear from the help text

> webdev serve --help
Run a local web development server and a file system watcher that re-builds on changes.

Usage: webdev serve [arguments] [<directory>[:<port>]]...
-h, --help                        Print this usage information.
-r, --[no-]release                Build with release mode defaults for builders.
-o, --output                      A directory to write the result of a build to. Or a mapping from a top-level directory in the package to the directory to write a filtered build output to. For example "web:deploy".
...

The -r help text should at least say what the default is (as is done for build).

cc @kwalrath

"webdev build" ate my global CSS files

I have a utility package of Angular components which I use in my apps (think Material components library).
This package comes with global css stylesheet which I used to include in index.html of an app in development like this:

<link rel="stylesheet" href="packages/fnx_ui/css/fnx_ui.css">

It worked with "pub build" but doesn't work with "webdev build". It works with "webdev serve" though.

None of my css files from my package did make it to the final build. Other files from the package (fonts) are there, but not the css files.

Meta: AngularDart Conference MVP

In short: pub global activate webdev and then webdev <command>.

  • Create a new angular project.
  • Serve and debug your project with dartdevc.
  • Generate and run test(s).

Nice to have(s):

  • Replace the hand-written build.dart's for angular repo (and friends)

Stretch (blocked on build_runner):

  • Build your project with Dart2JS.

Fresh out of the box project not serving

So I just discovered this nice package and the possibility to develop angular apps using dart.
I ran the tutorial from https://webdev.dartlang.org/guides/get-started step by step. Funny thing is that it worked one time but most of the time it doesnt finish building when I hit play in phpstorm.
the there is no error message its just repeating this all the time:

[INFO] 4m 47s elapsed, 4167/4184 actions completed.
[INFO] 4m 48s elapsed, 4167/4184 actions completed.
[INFO] 4m 49s elapsed, 4167/4184 actions completed.
[WARNING] No actions completed for 15.1s, waiting on:
  - build_web_compilers|ddc on package:stack_trace/stack_trace.dartdevc.module
  - build_web_compilers|ddc on package:meta/meta.dartdevc.module
  - build_web_compilers|ddc on package:meta/dart2js.dartdevc.module
  - build_web_compilers|ddc on package:collection/src/canonicalized_map.dartdevc.module
  - build_web_compilers|ddc on package:collection/src/algorithms.dartdevc.module
  .. and 12 more

[INFO] 4m 51s elapsed, 4167/4184 actions completed.
[INFO] 4m 52s elapsed, 4167/4184 actions completed.
[INFO] 4m 53s elapsed, 4167/4184 actions completed.
[INFO] 4m 54s elapsed, 4167/4184 actions completed.
[INFO] 4m 55s elapsed, 4167/4184 actions completed.

The finished actions won't increase :(

I'm running on windows 10 with the latest dart version
Dart VM version: 2.1.0 (Tue Nov 13 18:22:02 2018 +0100) on "windows_x64"
latest phpstorm version: 2018.2.5
and all plugins up to date.

it's really making me sad that I cannot seem to use it.
If you need any further information please let me know.

Hope this helps you to improve or tell me what I'm doing wrong.

After some more digging I found this problem when I run the project:

S:\software\flutter\bin\cache\dart-sdk\bin\pub.bat global run webdev serve web:53640
Creating build script, took 6801ms
[INFO] Setting up file watchers...
[INFO] Setting up file watchers completed, took 24ms

[INFO] Waiting for all file watchers to be ready...
[INFO] Waiting for all file watchers to be ready completed, took 186ms

[INFO] Initializing inputs
[INFO] Reading cached asset graph...
[WARNING] Throwing away cached asset graph due to Dart SDK update.
[INFO] Cleaning up outputs from previous builds....
[INFO] Cleaning up outputs from previous builds. completed, took 1.1s

[INFO] Reading cached asset graph completed, took 1.8s

[INFO] Building new asset graph...
[INFO] Building new asset graph completed, took 1.8s

[INFO] Checking for unexpected pre-existing outputs....
[INFO] Checking for unexpected pre-existing outputs. completed, took 1ms

[INFO] Running build...
[INFO] 1.0s elapsed, 37/53 actions completed.
[INFO] 2.0s elapsed, 70/83 actions completed.
[INFO] 3.0s elapsed, 116/128 actions completed.
[INFO] 5.7s elapsed, 130/132 actions completed.
[INFO] 7.2s elapsed, 261/262 actions completed.
[INFO] 8.5s elapsed, 280/288 actions completed.
[INFO] 9.5s elapsed, 423/434 actions completed.
[INFO] 12.1s elapsed, 479/483 actions completed.
[INFO] 13.1s elapsed, 718/723 actions completed.
[INFO] 14.2s elapsed, 995/1000 actions completed.
[INFO] 15.2s elapsed, 1228/1232 actions completed.
[INFO] 16.3s elapsed, 1638/1643 actions completed.
[INFO] 17.4s elapsed, 1901/1906 actions completed.
[INFO] 18.5s elapsed, 2207/2211 actions completed.
[INFO] 19.6s elapsed, 2687/2692 actions completed.
[INFO] 20.7s elapsed, 2785/2790 actions completed.
[INFO] 21.9s elapsed, 2871/2876 actions completed.
[INFO] 22.9s elapsed, 3004/3009 actions completed.
[INFO] 23.9s elapsed, 3188/3193 actions completed.
[INFO] 25.0s elapsed, 3439/3443 actions completed.
[INFO] 26.1s elapsed, 3682/3684 actions completed.
[INFO] 27.1s elapsed, 4098/4100 actions completed.
CreateProcessW failed 2
CreateProcessW failed 2
CreateProcessW failed 2
[SEVERE] build_web_compilers|ddc on package:meta/meta.dartdevc.module:

ProcessException: Das System kann die angegebene Datei nicht finden.

  Command: S:\software\flutter\bin\cache\dart-sdk\bin\dartdevc.bat --persistent_worker
[SEVERE] build_web_compilers|ddc on package:collection/src/utils.dartdevc.module:

ProcessException: Das System kann die angegebene Datei nicht finden.

  Command: S:\software\flutter\bin\cache\dart-sdk\bin\dartdevc.bat --persistent_worker
[SEVERE] build_web_compilers|ddc on package:collection/src/iterable_zip.dartdevc.module:

ProcessException: Das System kann die angegebene Datei nicht finden.

  Command: S:\software\flutter\bin\cache\dart-sdk\bin\dartdevc.bat --persistent_worker
[SEVERE] build_web_compilers|ddc on package:collection/src/comparators.dartdevc.module:

ProcessException: Das System kann die angegebene Datei nicht finden.

  Command: S:\software\flutter\bin\cache\dart-sdk\bin\dartdevc.bat --persistent_worker
CreateProcessW failed 2
[WARNING] build_web_compilers|entrypoint on web/main.dart:
Unable to read meta|lib/meta.ddc.js, check your console or the `.dart_tool/build/generated/meta/lib/meta.ddc.js.errors` log file.
[WARNING] build_web_compilers|entrypoint on web/main.dart:
Unable to read collection|lib/src/iterable_zip.ddc.js, check your console or the `.dart_tool/build/generated/collection/lib/src/iterable_zip.ddc.js.errors` log file.
[WARNING] build_web_compilers|entrypoint on web/main.dart:
Unable to read collection|lib/src/comparators.ddc.js, check your console or the `.dart_tool/build/generated/collection/lib/src/comparators.ddc.js.errors` log file.
[WARNING] build_web_compilers|entrypoint on web/main.dart:
Unable to read collection|lib/src/utils.ddc.js, check your console or the `.dart_tool/build/generated/collection/lib/src/utils.ddc.js.errors` log file.
[INFO] 28.4s elapsed, 4145/4182 actions completed.
[INFO] 29.4s elapsed, 4156/4182 actions completed.

What can I do to resolve this?

Thanks.

Slow loading chrome after refresh

I have issue here, i guess... created starter angular dart, then i compile it. everything is good for now. I go to chrome, to localhost:8080 it take 1second to boot up the starter app. I go to networks and see a lot of files, ddc.js which explain the 1sec time to boot up.
But after refresh page, its still 1 sec. The resources are not cached :( i tried on others browsers like firefox and opera.

With starter angular todo list, the boot up time is about 10seconds!

Can't load Kernel binary: File size is too small to a valid kernel file.

This is happening to me after upgrading the Dart SDK from 69.0 to 69.3.
Windows 10 x64:

Observatory listening on http://127.0.0.1:50107/

Package webdev is currently active at version 0.2.3+1.


Resolving dependencies...


+ args 1.4.4

+ charcode 1.1.2
+ collection 1.14.11
+ io 0.3.3
+ meta 1.1.6
+ path 1.6.2
+ pub_semver 1.4.2
+ source_span 1.4.1

+ stack_trace 1.9.3
+ string_scanner 1.0.3
+ webdev 0.2.3+1

+ yaml 2.1.15

Downloading webdev 0.2.3+1...


Precompiling executables...


Precompiled webdev:bin\webdev.


Installed executable webdev.


Activated webdev 0.2.3+1.


Can't load Kernel binary: File size is too small to a valid kernel file.

webdev failed with an unexpected exception.

Unable to spawn isolate: Error while initializing Kernel isolate

webdev could not run for this project.

Error Message

λ webdev serve
webdev could not run for this project.
Could not find a file named "pubspec.yaml" in "C:\Users\username\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\protobuf-0.10.4".

Installation went fine:

λ pub global activate webdev
Package webdev is currently active at version 1.0.0.
Resolving dependencies...
+ args 1.5.0
+ charcode 1.1.2
+ collection 1.14.11
+ io 0.3.3
+ meta 1.1.6
+ path 1.6.2
+ pub_semver 1.4.2
+ source_span 1.4.1
+ stack_trace 1.9.3
+ string_scanner 1.0.4
+ webdev 1.0.0
+ yaml 2.1.15
Downloading webdev 1.0.0...
Downloading stack_trace 1.9.3...
Downloading io 0.3.3...
Downloading yaml 2.1.15...
Downloading meta 1.1.6...
Downloading charcode 1.1.2...
Downloading path 1.6.2...
Downloading string_scanner 1.0.4...
Downloading source_span 1.4.1...
Downloading args 1.5.0...
Downloading pub_semver 1.4.2...
Downloading collection 1.14.11...
Precompiling executables...
Precompiled webdev:bin\webdev.
Installed executable webdev.
Activated webdev 1.0.0.

If I install protobuf globally with pub global activate protobuf then it stops with this error but goes to the next package it can't find. I've tried to manually install 3 packages but gave up because it could be hundreds of packages.

Using windows 10 with cmder. Dart SDK installed from gekorm (which is working just fine)

Sometimes webdev serve auto-rebuild broke the build files

It sometimes happens when I save a file with error and immediately edit to correct it and save it again. And after that it will never rebuild successfully whatever you edit the code unless I remove the .dart_tool and run webdev serve again.

I can reproduce this bug easily.

webdev says the following things.

[INFO] ------------------------------------------------------------------------
[INFO] Starting Build
[INFO] Updating asset graph completed, took 5ms
[INFO] Running build completed, took 189ms
[INFO] Caching finalized dependency graph completed, took 140ms
[SEVERE] build_web_compilers|ddc on web/main.module (cached):
Error compiling dartdevc module:angular_tour_of_heroes|web/main.ddc.js

[error] Target of URI doesn't exist: 'package:angular_forms/angular_forms.dart'. (package:angular_tour_of_heroes/app_component.dart, line 2, col 8)
[error] Arguments of a constant creation must be constant expressions. (package:angular_tour_of_heroes/app_component.dart, line 11, col 32)
[error] The values in a const list literal must be constants. (package:angular_tour_of_heroes/app_component.dart, line 11, col 32)
[error] Undefined name 'formDirectives'. (package:angular_tour_of_heroes/app_component.dart, line 11, col 32)
[error] Target of URI doesn't exist: 'package:angular_forms/angular_forms.dart'. (package:angular_tour_of_heroes/app_component.template.dart, line 9, col 8)
[error] Target of URI hasn't been generated: 'package:angular/angular.template.dart'. (package:angular_tour_of_heroes/app_component.template.dart, line 13,col 8)
[error] Target of URI hasn't been generated: 'package:angular_forms/angular_forms.template.dart'. (package:angular_tour_of_heroes/app_component.template.dart, line 14, col 8)
[error] Target of URI doesn't exist: 'package:angular_tour_of_heroes/app_component.css.shim.dart'. (package:angular_tour_of_heroes/app_component.template.dart, line 17, col 8)
[error] Target of URI doesn't exist: 'package:angular_forms/src/directives/default_value_accessor.dart'. (package:angular_tour_of_heroes/app_component.template.dart, line 32, col 8)
[error] Target of URI doesn't exist: 'package:angular_forms/src/directives/control_value_accessor.dart'. (package:angular_tour_of_heroes/app_component.template.dart, line 33, col 8)
[error] Target of URI doesn't exist: 'package:angular_forms/src/directives/ng_model.dart'. (package:angular_tour_of_heroes/app_component.template.dart, line 34, col 8)
[error] Target of URI doesn't exist: 'package:angular_forms/src/directives/control_value_accessor.dart'. (package:angular_tour_of_heroes/app_component.template.dart, line 36, col 8)
[error] Target of URI doesn't exist: 'package:angular_forms/src/directives/ng_control.dart'. (package:angular_tour_of_heroes/app_component.template.dart, line 37, col 8)

Please fix all errors before compiling (warnings are okay).
}

[SEVERE] build_web_compilers|ddc on test/app_test.module (cached):
Error compiling dartdevc module:angular_tour_of_heroes|test/app_test.ddc.js

[error] Target of URI hasn't been generated: 'package:angular/angular.template.dart'. (package:angular_tour_of_heroes/app_component.template.dart, line 13,col 8)
[error] Target of URI hasn't been generated: 'package:angular_forms/angular_forms.template.dart'. (package:angular_tour_of_heroes/app_component.template.dart, line 14, col 8)
[error] Target of URI doesn't exist: 'package:angular_tour_of_heroes/app_component.css.shim.dart'. (package:angular_tour_of_heroes/app_component.template.dart, line 17, col 8)

Please fix all errors before compiling (warnings are okay).
}

[SEVERE] Failed after 340ms

Note that I can build the same code successful if I delete .dart_tool and build it again.

`webdev build` should output by default

Discussed in an internal thread. For users of builders that are only going to source it isn't always necessary to use --output, but web users generally want to build a deployable directory.

Question is whether we want to wait for the new build_runner and by default add --output web:build

Should also allow --output NONE to get no output and not forward to build_runner.

What is the webdev equivalent of -D option?

I recently upgraded from pub to webdev and noticed that there is no way to set a Dart environment variable (the ones you get using new String.fromEnvironment("x")) when running webdev build or webdev serve. What is the recommended alternative?

webdev build results in "Crash when formatting: [AsciiControlCharacter]"

Environment

Dart VM version: 2.0.0-dev.64.1 (Thu Jun 21 08:47:55 2018 +0200) on "macos_x64"

Steps to reproduce

  1. Clone https://github.com/dart-lang/site-webdev
  2. cd examples/acx/lottery/1-base
  3. pub upgrade
  4. pub run build_runner build --delete-conflicting-outputs --output build, and it builds fine
  5. webdev build

Expected result

The webdev build should succeed as well. Instead we get:

> webdev build
Crash when formatting: [AsciiControlCharacter] The control character U+001E can only be used in strings and comments.
RangeError (index): Invalid value: Not in range 0..269138, inclusive: 272160
#0      _StringBase.[] (dart:core/runtime/libstring_patch.dart:233:55)
#1      Source.getTextLine (package:kernel/ast.dart:5772:42)
#2      getSourceLine (package:front_end/src/fasta/messages.dart:27:9)
#3      format (package:front_end/src/fasta/command_line_reporting.dart:80:27)
#4      ProcessedOptions.format (package:front_end/src/base/processed_options.dart:206:32)
#5      ProcessedOptions.report (package:front_end/src/base/processed_options.dart:215:22)
#6      CompilerContext.report (package:front_end/src/fasta/compiler_context.dart:67:13)
#7      Loader.addMessage (package:front_end/src/fasta/loader.dart:258:20)
#8      Loader.addCompileTimeError (package:front_end/src/fasta/loader.dart:207:5)
#9      LibraryBuilder.addCompileTimeError (package:front_end/src/fasta/builder/library_builder.dart:89:12)
#10     SourceLoader.tokenize (package:front_end/src/fasta/source/source_loader.dart:174:17)
<asynchronous suspension>
#11     SourceLoader.buildOutline (package:front_end/src/fasta/source/source_loader.dart:192:26)
<asynchronous suspension>
#12     Loader.buildOutlines (package:front_end/src/fasta/loader.dart:176:13)
<asynchronous suspension>
#13     KernelTarget.buildOutlines (package:front_end/src/fasta/kernel/kernel_target.dart:237:20)
<asynchronous suspension>
#14     IncrementalCompiler.computeDelta.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:232:24)
<asynchronous suspension>
#15     CompilerContext.runInContext.<anonymous closure>.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:118:46)
#16     new Future.sync (dart:async/future.dart:222:31)
#17     CompilerContext.runInContext.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:118:19)
#18     _rootRun (dart:async/zone.dart:1126:13)
#19     _CustomZone.run (dart:async/zone.dart:1023:19)
#20     _runZoned (dart:async/zone.dart:1518:10)
#21     runZoned (dart:async/zone.dart:1465:12)
#22     CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:117:12)
#23     IncrementalCompiler.computeDelta (package:front_end/src/fasta/incremental_compiler.dart:102:20)
<asynchronous suspension>
#24     IncrementalCompiler.compile (package:vm/incremental_compiler.dart:38:44)
<asynchronous suspension>
#25     IncrementalCompilerWrapper.compileInternal (file:///b/build/slave/dart-sdk-mac-dev/build/sdk/pkg/vm/bin/kernel_service.dart:158:28)
<asynchronous suspension>
#26     Compiler.compile.<anonymous closure> (file:///b/build/slave/dart-sdk-mac-dev/build/sdk/pkg/vm/bin/kernel_service.dart:132:39)
#27     new Future.<anonymous closure> (dart:async/future.dart:174:37)
#28     _rootRun (dart:async/zone.dart:1122:38)
#29     _CustomZone.run (dart:async/zone.dart:1023:19)
#30     _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#31     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)
#32     _rootRun (dart:async/zone.dart:1126:13)
#33     _CustomZone.run (dart:async/zone.dart:1023:19)
#34     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:949:23)
#35     Timer._createTimer.<anonymous closure> (dart:async/runtime/libtimer_patch.dart:21:15)
#36     _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#37     _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#38     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)

Crash when compiling file:///Users/chalin/.pub-cache/global_packages/webdev/bin/webdev.dart.snapshot,
at character offset 265550:
RangeError (index): Invalid value: Not in range 0..269138, inclusive: 272160
#0      _StringBase.[] (dart:core/runtime/libstring_patch.dart:233:55)
#1      Source.getTextLine (package:kernel/ast.dart:5772:42)
#2      getSourceLine (package:front_end/src/fasta/messages.dart:27:9)
...

Related: dart-lang/sdk#33558

missing dependency warning gives invalid yaml

Either put the version range in quotes – or use ^ syntax.

webdev could not run for this project.
You must have a dependency on `build_runner` in `pubspec.yaml`.
# pubspec.yaml
dev_dependencies:
  build_runner: >=1.2.2 <2.0.0
You must have a dependency on `build_web_compilers` in `pubspec.yaml`.
# pubspec.yaml
dev_dependencies:
  build_web_compilers: >=1.1.0 <2.0.0

Define option not reachable

On Dart 1.x, when compiling to JS, it was possible to add parameters at compilation time (for instance for version, backend configuration...).

$ pub build --define version=1337

Now, on Dart 2, with webdev build, no option is available to do so.

--live-reload doesn't work on macos

It seems that editing the code while

webdev serve --live-reload

is running doesn't refresh anything on macOS.

What I did:

pub global activate stagehand
pub global activate webdev

stagehand web-angular
pub get
webdev serve --live-reload

Then tried to edit both todo_list_component.dart and todo_list_component.html.
A build has been triggered, but nothing happens until I refresh the page.

tried both with dart 2.0.0 and 2.1.0-dev.2.0


alternatively, the build step after an editing can take 7+ seconds for a simple label edit.

build -r option is a no-op

Apparently the default for build is --release, which makes the shorthand -r a no-op (and actually, made me believe that the default was still debug until @kevmoo corrected me on that). Consider dropping the -r shorthand.

Slow serve and file watching. Memory issues on Safari

The webdev build and webdev serve commands are running slow.

Hello world can take up to 20 seconds on a MacBook. File watch updates can take 5-10 seconds.

Situation with Chrome for updates is better, but Safari is constantly warning This webpage is using significant memory

Log

Serving `web` on http://localhost:8080
[INFO] ------------------------------------------------------------------------
[INFO] Starting Build
[INFO] Updating asset graph completed, took 14ms
[INFO] Running build completed, took 11.6s
[INFO] Caching finalized dependency graph completed, took 129ms
[INFO] Succeeded after 11.7s with 5 outputs (4 actions)

How can I help debug?

How to use different "build.yaml" files?

Support for --config flag is not planned: see #14

But, from my point of view, it is required : my projects rely on the sass_builder package. This package has an outputStyle option that let you choose between expanded and compressed output.

Using pub run build_runner --config=<debug|release>, I can have expanded output in serve mode, and compressed output in build mode.

How can I reproduce this behavior using the webdev CLI?

Serve on Windows spawns many terminals

Root cause of issue outlined here: #110

I believe one solution is to update the persistent workers in package:build_modules to also start from the snapshot instead of the .bat files.

Create vm service models

It looks like this is going to require a custom builder, probably partying on a yaml file.

Going through the types I am thinking a format like the following:

Config

key value default
classes Map<String, Class>
enums Map<String, List<String>>

Class

key value default
extends String
fields Map<String, Field>

Field

key value default
type String
optional boolean false

cc @natebosch @grouma @vsmenon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.