problems building `web/samples_index`
not sure if anyone tried to build it manually on latest dart (following the readme instructions), but as per https://dart.dev/tools/pub/cmd
the standalone pub command is deprecated
so even after installing via flutter pub global activate grinder, executing grind generate
results in grind: 7: pub: not found
related: https://github.com/google/grinder.dart/issues/381 (includes OS, versions, etc)
Nice catch. Do you mind trying this command to see if it does the trick for you?
dart pub global activate grinder
If you have the Flutter SDK installed, the cached version of dart should be available in your path, which should make that command possible.
If it does work, I'll update the README to match.
the real problem is: grinder internally calls pub, so expects it to be on path
- inline aliasing
pubtodart pub(within terminal session) – does not work ❌ - global
alias pub='dart pub'in.profile– works ✅ - enclosing
flutter pub $@into a bash-script namedpub– works ✅ - manually adding
/usr/lib/dart/bin/to$PATHevidently works too :shrug: – flutter only added$HOME/snap/flutter/common/flutter/.pub-cache/binto the path on install
but i think the linked related issue with grinder itself should be resolved first
moving on..
webdev servewebdev could not run for this project. Could not find a file named "pubspec.yaml" in "~/.pub-cache/hosted/pub.dartlang.org/_fe_analyzer_shared-14.0.0".
b/c.. there is no such directory
sure, pub get _fe_analyzer_shared, done
webdev serve
[INFO] Building new asset graph completed, took 1.4s
[SEVERE] Conflicting outputs were detected and the build is unable to prompt for permission to remove them. These outputs must be removed manually or the build can be run with `--delete-conflicting-outputs`. The outputs are: lib/src/data.g.dart
Unhandled exception:
Bad state: Unable to start build daemon.
#0 _handleDaemonStartup (package:build_daemon/client.dart:82:5)
<asynchronous suspension>
#1 BuildDaemonClient.connect (package:build_daemon/client.dart:183:5)
<asynchronous suspension>
#2 _startBuildDaemon (package:webdev/src/serve/dev_workflow.dart:28:12)
<asynchronous suspension>
#3 DevWorkflow.start (package:webdev/src/serve/dev_workflow.dart:193:18)
<asynchronous suspension>
#4 ServeCommand.run (package:webdev/src/command/serve_command.dart:102:9)
<asynchronous suspension>
#5 CommandRunner.runCommand (package:args/command_runner.dart:196:13)
<asynchronous suspension>
#6 _CommandRunner.runCommand (package:webdev/src/webdev_command_runner.dart:40:12)
<asynchronous suspension>
#7 main (file:///home/dym/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/webdev-2.7.4/bin/webdev.dart:19:16)
<asynchronous suspension>
ok, sure,
webdev serve --delete-conflicting-outputsCould not find an option named "delete-conflicting-outputs".
what? you JUST told me to run with that flag :facepalm:
as per https://github.com/dart-lang/webdev/issues/1177#issuecomment-723149986 , one flag is not enough, so
webdev serve web --verbose --debug-extension --enable-expression-evaluation -- --verbose --delete-conflicting-outputs --track-performance
it finally worked!
http://127.0.0.1:8080/
no thumbnails

Thanks for the deep dive, and for the friction notes.
Over the next couple weeks, I'm going to be revisiting the samples index as part of some related work on maintaining our repo structure, and will revisit this as I'm doing it.
im kinda surprised dart/flutter projects dont have docker-ish "setup+test+run" on new empty VMs for every release, to ensure full integrity with every other part of the final system