google / google/protobuf.dart

`pub global activate protoc_plugin` is failing

Open
#416 4 comments 0 reactions 0 assignees View on GitHub
Windows
Dominant language
Dart
Stars
572
Forks
196
Avg merge
1h 59m
Merged PRs (30d)
2

Description

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:
- upgrading Flutter
- deleting flutter/bin/cache
- deleting $USER/AppData/Roaming/Pub/Cache

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)) {
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `pub global activate protoc_plugin` on Windows and reviewing the dependency versions in the reported output, especially `analyzer` and `dart_style`. Compare those versions with the Dart SDK in use; done means both `protoc_plugin` executables precompile successfully without the shown errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.