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

problems building web/samples_index #806

Open
ghost opened this issue Jun 4, 2021 · 5 comments
Open

problems building web/samples_index #806

ghost opened this issue Jun 4, 2021 · 5 comments
Assignees
Labels
bug Something isn't working p2

Comments

@ghost
Copy link

ghost commented Jun 4, 2021

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: google/grinder.dart#381 (includes OS, versions, etc)

@RedBrogdon
Copy link
Contributor

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.

@RedBrogdon RedBrogdon self-assigned this Jun 11, 2021
@RedBrogdon RedBrogdon added bug Something isn't working p2 labels Jun 11, 2021
@ghost
Copy link
Author

ghost commented Jun 11, 2021

the real problem is: grinder internally calls pub, so expects it to be on path

  • inline aliasing pub to dart pub (within terminal session) – does not work ❌
  • global alias pub='dart pub' in .profile – works ✅
  • enclosing flutter pub $@ into a bash-script named pub – works ✅
  • manually adding /usr/lib/dart/bin/ to $PATH evidently works too 🤷 – flutter only added $HOME/snap/flutter/common/flutter/.pub-cache/bin to the path on install

but i think the linked related issue with grinder itself should be resolved first

@ghost
Copy link
Author

ghost commented Jun 11, 2021

moving on..

webdev serve
webdev 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-outputs
Could not find an option named "delete-conflicting-outputs".

what? you JUST told me to run with that flag 🤦

as per dart-lang/webdev#1177 (comment) , 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
Screenshot 2021-06-11 at 10-58-18 Flutter samples_20210611085926

@RedBrogdon
Copy link
Contributor

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.

@ghost
Copy link
Author

ghost commented Jun 14, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p2
Projects
None yet
Development

No branches or pull requests

1 participant