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

pub publish is broken on -dev.62 analyzer error #1919

Closed
kevmoo opened this issue Jun 13, 2018 · 8 comments
Closed

pub publish is broken on -dev.62 analyzer error #1919

kevmoo opened this issue Jun 13, 2018 · 8 comments
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@kevmoo
Copy link
Member

kevmoo commented Jun 13, 2018

The method 'toList' was called on null.
Receiver: null
Tried calling: toList()
dart:core                                                 Object.noSuchMethod
package:analyzer/src/dart/analysis/file_state.dart 875    FileSystemState.getFilesForPath
package:analyzer/src/dart/analysis/file_tracker.dart 220  FileTracker.verifyApiSignature.<fn>
package:front_end/src/base/performance_logger.dart 34     PerformanceLog.run
package:analyzer/src/dart/analysis/file_tracker.dart 218  FileTracker.verifyApiSignature
package:analyzer/src/dart/analysis/driver.dart 906        AnalysisDriver.parseFileSync
package:analyzer/src/dart/analysis/session.dart 120       AnalysisSessionImpl.getParsedAstSync
package:pub/src/dart.dart 129                             AnalysisContextManager.parse
package:pub/src/dart.dart 144                             AnalysisContextManager.parseImportsAndExports
package:pub/src/validator/strict_dependencies.dart 40     StrictDependenciesValidator._findPackages
dart:core                                                 _SyncIterator.moveNext
package:pub/src/validator/strict_dependencies.dart 86     StrictDependenciesValidator._validateLibBin
package:pub/src/validator/strict_dependencies.dart 76     StrictDependenciesValidator.validate
===== asynchronous gap ===========================
package:pub/src/validator.dart 131                        Validator.runAll.<fn>
dart:async                                                Future.wait
package:pub/src/validator.dart 131                        Validator.runAll
package:pub/src/command/lish.dart 159                     LishCommand._validate
dart:async                                                _AsyncAwaitCompleter.start
package:pub/src/command/lish.dart 158                     LishCommand._validate
package:pub/src/command/lish.dart 139                     LishCommand.run
dart:async                                                _AsyncAwaitCompleter.start
package:pub/src/command/lish.dart 115                     LishCommand.run
package:args/command_runner.dart 194                      CommandRunner.runCommand
dart:async                                                _AsyncAwaitCompleter.start
package:args/command_runner.dart 142                      CommandRunner.runCommand
package:pub/src/command_runner.dart 168                   PubCommandRunner.runCommand.<fn>
dart:async                                                new Future.sync
package:pub/src/utils.dart 115                            captureErrors.<fn>
dart:async                                                runZoned
package:pub/src/utils.dart 134                            captureErrors
package:pub/src/command_runner.dart 168                   PubCommandRunner.runCommand
This is an unexpected error. Please run
@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) high priority labels Jun 13, 2018
@kevmoo
Copy link
Member Author

kevmoo commented Jun 13, 2018

CC @devoncarew – may be an analyzer regression?

@natebosch
Copy link
Member

@scheglov @bwilkerson - this looks related to the changes to which analyzer apis we're using

@natebosch
Copy link
Member

#1912

@scheglov
Copy link
Contributor

It is not obvious what happens.
Is there a way for me to reproduce the problem?
What are you publishing?

@natebosch
Copy link
Member

You should be able to repro by going in to any package (we were using https://github.com/dart-lang/path at the time but this happens in any package) and running pub publish with pub coming from the latest SDK.

@scheglov
Copy link
Contributor

Thanks, I can reproduce it on https://github.com/dart-lang/path.

@scheglov
Copy link
Contributor

This happens because the path we give to analyzer is not normalized.
I missed corresponding p.normalize() after p.absolute().

@scheglov
Copy link
Contributor

#1920
Fixes it locally (but I have not run all tests locally).

dart-bot pushed a commit to dart-lang/sdk that referenced this issue Jun 13, 2018
Brings in fix for dart-lang/pub#1919

Change-Id: Ied08a3c4b9a61879bed33c0bf15c800690bf341d
Reviewed-on: https://dart-review.googlesource.com/60148
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants