You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to FAQ:
$ uname -a
Linux glinyanov-PC 3.14.14-031414-generic #201407281153 SMP Mon Jul 28 15:54:19 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
$ pub version
Pub 1.9.3
$ pub --verbose update > pub.log 2>&1
pub.log is here: https://goo.gl/PL1cUU
My team was working on refactoring and extracting libraries to separate repositories in particular, and we found a bug, that we could reproduce: if in package:A we use package:test as dev_dependency and use test/pub_serve transfomer, then if in package:B we use package:A as 'git' dependency (and NOT 'path' dependency), then pub get/update for package:B fails with exception:
Loading source assets...
The null object does not have a getter 'pubspec'.
NoSuchMethodError: method not found: 'pubspec'
Receiver: null
Arguments: []
dart:core
... # more in pub.log
Nevertheless, my real project builds successfully even after bad pub update, meaning pub build does not fail, and package:A itself can successfully use that transformer.
For those, who experience same issue: move your transformer's dependency from dev_dependencies to dependencies (e.g. test for test/pub_serve), it solves the problem.
From @dglinyanov on July 8, 2015 7:57
According to FAQ:
$ uname -a
Linux glinyanov-PC 3.14.14-031414-generic #201407281153 SMP Mon Jul 28 15:54:19 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
$ pub version
Pub 1.9.3
$ pub --verbose update > pub.log 2>&1
pub.log is here: https://goo.gl/PL1cUU
My team was working on refactoring and extracting libraries to separate repositories in particular, and we found a bug, that we could reproduce: if in package:A we use package:test as dev_dependency and use test/pub_serve transfomer, then if in package:B we use package:A as 'git' dependency (and NOT 'path' dependency), then pub get/update for package:B fails with exception:
I created the example packages to show it, it's here: https://goo.gl/2k8Kea.
Nevertheless, my real project builds successfully even after bad
pub update
, meaningpub build
does not fail, and package:A itself can successfully use that transformer.For those, who experience same issue: move your transformer's dependency from dev_dependencies to dependencies (e.g.
test
fortest/pub_serve
), it solves the problem.Copied from original issue: dart-lang/sdk#23805
The text was updated successfully, but these errors were encountered: