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

Protobuf generation fails when run with front end #31480

Closed
keertip opened this issue Nov 29, 2017 · 7 comments
Closed

Protobuf generation fails when run with front end #31480

keertip opened this issue Nov 29, 2017 · 7 comments
Assignees
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. customer-bazel customer-vm P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@keertip
Copy link
Contributor

keertip commented Nov 29, 2017

Running the dart-protoc-plugin with the VM+FE fails with the message
--dart_out: protoc-gen-dart: Plugin output is unparseable:

The file lib/src/dart_options.pb.dart this line which hides 'void' from dart:core

///
// Generated code. Do not modify.
///
// ignore_for_file: non_constant_identifier_names,library_prefixes
library dart_options_dart_options;

// ignore: UNUSED_SHOWN_NAME
import 'dart:core' show int, bool, double, String, List, override;

which could be the issue.

@keertip keertip added the area-front-end Use area-front-end for front end / CFE / kernel format related issues. label Nov 29, 2017
@keertip keertip added this to the 2.0-alpha milestone Nov 29, 2017
@kmillikin
Copy link

There are two issues in the front end, both of which need to be fixed:

  • Treat void as a reserved word (again)

  • Add an option to the VM+FE to suppress warnings. (The API for the protoc plugin is to read from stdin and write to stdout. The list of warnings produced on stdout can't be understood by protoc.)

@keertip
Copy link
Contributor Author

keertip commented Nov 29, 2017

Kevin, could you make this a priority? I can't continue testing in google3 until this is fixed.

@keertip
Copy link
Contributor Author

keertip commented Nov 29, 2017

Yes, we would want to run the vm with the suppress warnings flag. We have other instances in the internal workflow where the stdout from the cli is used - as in the case of analyzer.

@kmillikin
Copy link

@lrhn @peter-ahe-google

This is the issue where void is implicitly hidden from dart:core by not showing it.

@mraleph mraleph added the P1 A high priority bug; for example, a single project is unusable or has many test failures label Nov 30, 2017
@kmillikin
Copy link

I have a fix for the first issue, involving the reserved word void, here: https://dart-review.googlesource.com/c/sdk/+/24940

The second issue, involving suppressing warnings, still affects the plugin because there are other warnings besides the bogus ones due to void. Unfortunately, I've run out of time to fix that today (expected fix: tomorrow).

@peter-ahe-google
Copy link
Contributor

Proposed fix for warnings, print them on stderr.

whesse pushed a commit that referenced this issue Dec 1, 2017
`void` will be a reserved word in Dart 2.0 (it always was in Dart 1.x).
Remove it as an exported name from dart:core because it could be
accidentally hidden.

Bug: #31480
Change-Id: Id804cccbc144f3c8ba2fc9898a3b5c79e238ab36
Reviewed-on: https://dart-review.googlesource.com/24940
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
@kmillikin
Copy link

I think both of the underlying problems are now fixed. Please reopen this issue if you see the same or related problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. customer-bazel customer-vm P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

6 participants