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

Dart proto dependencies via overlays #62

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

SpencerC
Copy link

@SpencerC SpencerC commented Jan 7, 2022

  • Rebased dart_proto_library branch onto master.
  • Fixed broken syntax.
  • Added protobuf deps using new_git_repositorys and overlaid BUILD files.

Relevant commits: d1bce8d, a3ba942

@cbracken what do you think of this approach? It seems that everything else works aside from the rule to generate the protoc-gen-dart plugin. Any thoughts on how to resolve this package conundrum?

bazel build @dart_protobuf_protoc_plugin//:protoc_gen_dart --host_cpu="darwin" =>

ERROR: /private/var/tmp/_bazel_spencerconnaughton/0287db8c866287f62cb08f62d03173f4/external/dart_protobuf_protoc_plugin/BUILD.bazel:12:15: Building Dart VM snapshot <rule context for @dart_protobuf_protoc_plugin//:protoc_gen_dart> failed: (Exit 254): dart failed: error executing command external/dart_darwin_x86_64/dart-sdk/bin/dart '--packages=bazel-out/darwin_arm64-fastbuild/bin/external/dart_protobuf_protoc_plugin/protoc_gen_dart.build/protoc_gen_dart.packages' ... (remaining 2 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
bazel-out/darwin_arm64-fastbuild/bin/external/dart_protobuf_protoc_plugin/protoc_gen_dart.build/protoc_gen_dart.packages: Error: Problem in packages configuration file: Missing package name
Error: Couldn't resolve the package 'protoc_plugin' in 'package:protoc_plugin/protoc.dart'.
bazel-out/darwin_arm64-fastbuild/bin/external/dart_protobuf_protoc_plugin/dart_protobuf_protoc_plugin/bin/protoc_plugin.dart:10:8: Error: Not found: 'package:protoc_plugin/protoc.dart'
import 'package:protoc_plugin/protoc.dart';
       ^
bazel-out/darwin_arm64-fastbuild/bin/external/dart_protobuf_protoc_plugin/dart_protobuf_protoc_plugin/bin/protoc_plugin.dart:13:3: Error: Method not found: 'CodeGenerator'.
  CodeGenerator(stdin, stdout).generate();
  ^^^^^^^^^^^^^
Target @dart_protobuf_protoc_plugin//:protoc_gen_dart failed to build

@loeffel-io
Copy link

Looking forward for this one 🚀

@SpencerC
Copy link
Author

SpencerC commented Jan 5, 2023

Bump

@SpencerC SpencerC changed the base branch from dart_proto_library to master January 9, 2024 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants