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 gives a stack trace for an invalid path in a path dependency #10123

Closed
alan-knight opened this issue Apr 22, 2013 · 5 comments
Closed

Pub gives a stack trace for an invalid path in a path dependency #10123

alan-knight opened this issue Apr 22, 2013 · 5 comments
Assignees
Milestone

Comments

@alan-knight
Copy link
Contributor

I put in a pubspec that looked like
  expect:
    path: ~/dart-git/dart/pkg

which doesn't work because pub doesn't understand "~". But what I got was not an error that the path was invalid, but a stack trace

--- Apr 22, 2013 2:43:40 PM Running pub install ... ---
Pub install failed, [65] Resolving dependencies...
Could not find package 'expect' at '/Users/alanknight/dart/Scratch/~/dart-git/dart/pkg'.

­0 PathSource._validatePath (file:///Applications/dart/dart-sdk/util/pub/path_source.dart:126:5)

­1 PathSource.describe.<anonymous closure> (file:///Applications/dart/dart-sdk/util/pub/path_source.dart:29:20)

­2 Future.Future.sync (dart:async:71:31)

­3 PathSource.describe (file:///Applications/dart/dart-sdk/util/pub/path_source.dart:28:12)

­4 Source.getVersions (file:///Applications/dart/dart-sdk/util/pub/source.dart:71:20)

­5 PubspecCache.getVersions (file:///Applications/dart/dart-sdk/util/pub/solver/version_solver.dart:137:30)

­6 Traverser._selectPackage (file:///Applications/dart/dart-sdk/util/pub/solver/backtracking_solver.dart:513:37)

­7 Traverser._traverseRefs.<anonymous closure> (file:///Applications/dart/dart-sdk/util/pub/solver/backtracking_solver.dart:430:28)

­8 Future.Future.<anonymous closure> (dart:async:65:90)

­9 _ThenFuture._sendValue (dart:async:397:24)

­10 Future.Future.<anonymous closure> (dart:async:66:37)

­11 _asyncRunCallback._asyncRunCallback (dart:async:34:17)

­12 Timer.run.<anonymous closure> (dart:async:2251:21)

­13 Timer.Timer.<anonymous closure> (dart:async-patch:15:15)

This is an unexpected error. Please run

    pub --trace 'install'

and include the results in a bug report on http://dartbug.com/new.

@munificent
Copy link
Member

But what I got was not an error that the path was invalid, but a stack trace

You actually got both. :) You did get a correct error message:

Could not find package 'expect' at '/Users/alanknight/dart/Scratch/~/dart-git/dart/pkg'.

So that part is fine. It's just that this is one of the errors where pub should not show a stack trace.

@munificent
Copy link
Member

Added this to the M5 milestone.

@munificent
Copy link
Member

Set owner to @munificent.
Added Started label.

@munificent
Copy link
Member

Added Fixed label.

@DartBot
Copy link

DartBot commented Jun 5, 2015

This issue has been moved to dart-lang/pub#518.

This issue was closed.
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

No branches or pull requests

3 participants