@@ -58,26 +58,24 @@ Future checkPubspecLock() async {
5858 issues.add (PackageExceptionDetails .noBuildRunnerDep);
5959 }
6060
61- var version = buildRunner['version ' ] as String ;
62- if (version == null ) {
63- // TODO: warning?
64- } else {
65- var buildRunnerVersion = new Version . parse (version);
61+ var source = buildRunner['source ' ] as String ;
62+ if (source == 'hosted' ) {
63+ // NOTE: buildRunner['description'] should be:
64+ // `{url: https://pub.dartlang.org, name: build_runner}`
65+ // If a user is playing around here, they are on their own.
6666
67+ var version = buildRunner['version' ] as String ;
68+ var buildRunnerVersion = new Version .parse (version);
6769 if (! supportedBuildRunnerVersionRange.allows (buildRunnerVersion)) {
6870 var error = 'The `build_runner` version – $buildRunnerVersion – is not '
6971 'within the supported range – $supportedBuildRunnerVersionRange .' ;
7072 issues.add (new PackageExceptionDetails ._(error));
7173 }
72- }
7374
74- var source = buildRunner['source' ] as String ;
75- if (source == 'hosted' ) {
76- //var description = buildRunner['description'] as YamlMap;
77- // TODO: check for `{url: https://pub.dartlang.org, name: build_runner}`
78- // If not, print a warning
75+ stderr.writeln ('hosted: $buildRunner ' );
7976 } else {
80- // TODO: print a warning that we're assuming hosted
77+ // NOTE: Intentionally not checking non-hosted dependencies: git, path
78+ // If a user is playing around here, they are on their own.
8179 }
8280 }
8381
0 commit comments