Skip to content

[dartdev] dart test with build hooks in Flutter project #61697

@dcharkes

Description

@dcharkes

flutter clean && dart test with build hooks in a Flutter project fails because the implicit dart pub get fails as it's not a flutter project.

dart test actually succeeds itself. Inside getExecutableForCommand, ensureUpToDate is run, which runs something similar to dart pub get but it succeeds for Flutter projects.

We should use ensurePubspecResolved from the programmatic pub API which runs ensureUpToDate internally.

@sigurdm How does pub actually succeed in running pub get for a Flutter project from the Dart SDK this way?

Metadata

Metadata

Assignees

Labels

area-dart-cliUse area-dart-cli for issues related to the 'dart' command like tool.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions