google / protobuf.dart

Runtime library for Dart protobufs
https://pub.dev/packages/protobuf
BSD 3-Clause "New" or "Revised" License
532 stars 184 forks source link

`pub global activate protoc_plugin` is failing #416

Open AlabasterAxe opened 4 years ago

AlabasterAxe commented 4 years ago

I get a bunch of compilation errors when I attempt to run pub global activate protoc_plugin.

I'm running on Windows and I've tried:

But none of those have had any effect.

Logs when I run pub global activate protoc_plugin ``` Package protoc_plugin is currently active at version 19.0.1. Resolving dependencies... + _fe_analyzer_shared 6.0.0 (11.0.0 available) + analyzer 0.39.15 (0.40.4 available) + args 1.6.0 + async 2.4.2 (2.5.0-nullsafety.1 available) + charcode 1.1.3 (1.2.0-nullsafety.1 available) + cli_util 0.1.4 (0.2.0 available) + collection 1.14.13 (1.15.0-nullsafety.3 available) + convert 2.1.1 + crypto 2.1.5 + csslib 0.16.2 + dart_style 1.3.3 (1.3.7 available) + fixnum 0.10.11 + glob 1.2.0 + html 0.14.0+4 + js 0.6.2 (0.6.3-nullsafety.1 available) + meta 1.2.3 (1.3.0-nullsafety.3 available) + node_interop 1.1.1 + node_io 1.1.1 + package_config 1.1.0 (1.9.3 available) + path 1.7.0 (1.8.0-nullsafety.1 available) + pedantic 1.9.2 (1.10.0-nullsafety.1 available) + protobuf 1.0.1 + protoc_plugin 19.0.1 + pub_semver 1.4.4 + source_span 1.7.0 (1.8.0-nullsafety.2 available) + string_scanner 1.0.5 (1.1.0-nullsafety.1 available) + term_glyph 1.1.0 (1.2.0-nullsafety.1 available) + typed_data 1.2.0 (1.3.0-nullsafety.3 available) + watcher 0.9.7+15 + yaml 2.2.1 Precompiling executables... Failed to precompile protoc_plugin:bin\protoc_plugin: ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/dart_style-1.3.3/lib/src/dart_formatter.dart:105:30: Error: Too many positional arguments: 0 allowed, but 1 found. Try removing the extra positional arguments. scanner.configureFeatures(featureSet); ^ ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/src/dart/resolver/extension_member_resolver.dart:355:38: Error: The getter 'extensions' isn't defined for the class 'Scope'. - 'Scope' is from 'package:analyzer/dart/element/scope.dart' ('../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/dart/element/scope.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'extensions'. for (var extension in _nameScope.extensions) { ^^^^^^^^^^ ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/src/dart/resolver/method_invocation_resolver.dart:243:19: Error: The method 'shouldIgnoreUndefined' isn't defined for the class 'Scope'. - 'Scope' is from 'package:analyzer/dart/element/scope.dart' ('../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/dart/element/scope.dart'). Try correcting the name to the name of an existing method, or defining a method named 'shouldIgnoreUndefined'. if (nameScope.shouldIgnoreUndefined(ignorableIdentifier)) { ^^^^^^^^^^^^^^^^^^^^^ ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/src/generated/element_resolver.dart:201:41: Error: The method 'lookupIdentifier' isn't defined for the class 'Scope'. - 'Scope' is from 'package:analyzer/dart/element/scope.dart' ('../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/dart/element/scope.dart'). Try correcting the name to the name of an existing method, or defining a method named 'lookupIdentifier'. element = _resolver.nameScope.lookupIdentifier(identifier); ^^^^^^^^^^^^^^^^ ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/src/generated/element_resolver.dart:503:45: Error: The method 'lookupIdentifier' isn't defined for the class 'Scope'. - 'Scope' is from 'package:analyzer/dart/element/scope.dart' ('../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/dart/element/scope.dart'). Try correcting the name to the name of an existing method, or defining a method named 'lookupIdentifier'. Element element = _resolver.nameScope.lookupIdentifier(node); ^^^^^^^^^^^^^^^^ ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/src/generated/element_resolver.dart:509:39: Error: The method 'lookupIdentifier' isn't defined for the class 'Scope'. - 'Scope' is from 'package:analyzer/dart/element/scope.dart' ('../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/dart/element/scope.dart'). Try correcting the name to the name of an existing method, or defining a method named 'lookupIdentifier'. element = _resolver.nameScope.lookupIdentifier(setterName); ^^^^^^^^^^^^^^^^ ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/src/generated/element_resolver.dart:512:50: Error: The method 'shouldIgnoreUndefined' isn't defined for the class 'Scope'. - 'Scope' is from 'package:analyzer/dart/element/scope.dart' ('../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/dart/element/scope.dart'). Try correcting the name to the name of an existing method, or defining a method named 'shouldIgnoreUndefined'. if (element == null && _resolver.nameScope.shouldIgnoreUndefined(node)) { ^^^^^^^^^^^^^^^^^^^^^ ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/src/generated/element_resolver.dart:727:39: Error: The method 'shouldIgnoreUndefined' isn't defined for the class 'Scope'. - 'Scope' is from 'package:analyzer/dart/element/scope.dart' ('../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/dart/element/scope.dart'). Try correcting the name to the name of an existing method, or defining a method named 'shouldIgnoreUndefined'. } else if (!_resolver.nameScope.shouldIgnoreUndefined(node)) { ^^^^^^^^^^^^^^^^^^^^^ ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/src/generated/element_resolver.dart:805:29: Error: The method 'shouldIgnoreUndefined' isn't defined for the class 'Scope'. - 'Scope' is from 'package:analyzer/dart/element/scope.dart' ('../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/dart/element/scope.dart'). Try correcting the name to the name of an existing method, or defining a method named 'shouldIgnoreUndefined'. _resolver.nameScope.shouldIgnoreUndefined(superclassName)) { ^^^^^^^^^^^^^^^^^^^^^ Failed to precompile protoc_plugin:bin\protoc_plugin_bazel: ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/dart_style-1.3.3/lib/src/dart_formatter.dart:105:30: Error: Too many positional arguments: 0 allowed, but 1 found. Try removing the extra positional arguments. scanner.configureFeatures(featureSet); ^ ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/src/dart/resolver/extension_member_resolver.dart:355:38: Error: The getter 'extensions' isn't defined for the class 'Scope'. - 'Scope' is from 'package:analyzer/dart/element/scope.dart' ('../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/dart/element/scope.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'extensions'. for (var extension in _nameScope.extensions) { ^^^^^^^^^^ ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/src/dart/resolver/method_invocation_resolver.dart:243:19: Error: The method 'shouldIgnoreUndefined' isn't defined for the class 'Scope'. - 'Scope' is from 'package:analyzer/dart/element/scope.dart' ('../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/dart/element/scope.dart'). Try correcting the name to the name of an existing method, or defining a method named 'shouldIgnoreUndefined'. if (nameScope.shouldIgnoreUndefined(ignorableIdentifier)) { ^^^^^^^^^^^^^^^^^^^^^ ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/src/generated/element_resolver.dart:201:41: Error: The method 'lookupIdentifier' isn't defined for the class 'Scope'. - 'Scope' is from 'package:analyzer/dart/element/scope.dart' ('../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/dart/element/scope.dart'). Try correcting the name to the name of an existing method, or defining a method named 'lookupIdentifier'. element = _resolver.nameScope.lookupIdentifier(identifier); ^^^^^^^^^^^^^^^^ ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/src/generated/element_resolver.dart:503:45: Error: The method 'lookupIdentifier' isn't defined for the class 'Scope'. - 'Scope' is from 'package:analyzer/dart/element/scope.dart' ('../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/dart/element/scope.dart'). Try correcting the name to the name of an existing method, or defining a method named 'lookupIdentifier'. Element element = _resolver.nameScope.lookupIdentifier(node); ^^^^^^^^^^^^^^^^ ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/src/generated/element_resolver.dart:509:39: Error: The method 'lookupIdentifier' isn't defined for the class 'Scope'. - 'Scope' is from 'package:analyzer/dart/element/scope.dart' ('../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/dart/element/scope.dart'). Try correcting the name to the name of an existing method, or defining a method named 'lookupIdentifier'. element = _resolver.nameScope.lookupIdentifier(setterName); ^^^^^^^^^^^^^^^^ ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/src/generated/element_resolver.dart:512:50: Error: The method 'shouldIgnoreUndefined' isn't defined for the class 'Scope'. - 'Scope' is from 'package:analyzer/dart/element/scope.dart' ('../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/dart/element/scope.dart'). Try correcting the name to the name of an existing method, or defining a method named 'shouldIgnoreUndefined'. if (element == null && _resolver.nameScope.shouldIgnoreUndefined(node)) { ^^^^^^^^^^^^^^^^^^^^^ ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/src/generated/element_resolver.dart:727:39: Error: The method 'shouldIgnoreUndefined' isn't defined for the class 'Scope'. - 'Scope' is from 'package:analyzer/dart/element/scope.dart' ('../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/dart/element/scope.dart'). Try correcting the name to the name of an existing method, or defining a method named 'shouldIgnoreUndefined'. } else if (!_resolver.nameScope.shouldIgnoreUndefined(node)) { ^^^^^^^^^^^^^^^^^^^^^ ../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/src/generated/element_resolver.dart:805:29: Error: The method 'shouldIgnoreUndefined' isn't defined for the class 'Scope'. - 'Scope' is from 'package:analyzer/dart/element/scope.dart' ('../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/analyzer-0.39.15/lib/dart/element/scope.dart'). Try correcting the name to the name of an existing method, or defining a method named 'shouldIgnoreUndefined'. _resolver.nameScope.shouldIgnoreUndefined(superclassName)) { ```
ghost commented 3 years ago

debian 10 Google cloud `Precompiling executables... (4.5s) Failed to precompile protoc_plugin:protoc_plugin_bazel:

===== CRASH ===== si_signo=Bus error(7), si_code=2, si_addr=0x7f6657400000

===== CRASH ===== si_signo=Bus error(7), si_code=2, si_addr=0x7f66574fa000 Aborting re-entrant request for stack trace.`

vmahadev commented 3 years ago

In my case on windows 10 pub global activate protoc_plugin installs the plugin successfully activates 20.0.0 but fails to execute protoc-gen-dart the bat file hangs.

Basically, trying to generate the src files for the modified hello world example file.

kevmoo commented 3 years ago

@vmahadev – what version of Dart are you using?

vmahadev commented 3 years ago

@vmahadev – what version of Dart are you using?

Dart SDK version: 2.13.1 (stable) (Fri May 21 12:45:36 2021 +0200) on "windows_x64"