Skip to content

[flutter_tools] remove pub dependencies from universal#97722

Merged
fluttergithubbot merged 8 commits intoflutter:masterfrom
Jasguerrero:remove_pub_dependencies_from_universal
Feb 12, 2022
Merged

[flutter_tools] remove pub dependencies from universal#97722
fluttergithubbot merged 8 commits intoflutter:masterfrom
Jasguerrero:remove_pub_dependencies_from_universal

Conversation

@Jasguerrero
Copy link
Contributor

@Jasguerrero Jasguerrero commented Feb 3, 2022

#96286

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 3, 2022
@christopherfujino christopherfujino changed the title [flutter_tools] remove pub dependencies from universal (#96286) [flutter_tools] remove pub dependencies from universal Feb 3, 2022
@christopherfujino
Copy link
Contributor

FYI I removed the issue number from the PR description, as GitHub already adds the PR number to the description, and having both was confusing. When GitHub merges PRs it uses the description as the commit message.

@christopherfujino
Copy link
Contributor

@Jasguerrero looks like you made a bad git merge, due to the size of the diff.

@Jasguerrero Jasguerrero force-pushed the remove_pub_dependencies_from_universal branch from 95ac76f to 042e52c Compare February 7, 2022 23:45
@Jasguerrero Jasguerrero marked this pull request as ready for review February 8, 2022 19:52
_artifacts.add(artifactSet);
}

List<ArtifactSet> getArtifactSet() => _artifacts;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By making a public getter for this private field, you've essentially made it public. I don't think you actually need to add this method, see my comments below on the cache_test

expect(() => cache.storageBaseUrl, throwsToolExit());
});

testWithoutContext('PubDependencies should be registered as web based', () async {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A simpler test would be:

      final PubDependencies pubDependencies = PubDependencies(
        flutterRoot: () => '',
        logger: logger,
        pub: () => FakePub(),
      );
      expect(pubDependencies.developmentArtifact, DevelopmentArtifact.web);

Then you wouldn't need to add the public method to get a private field from the Cache class.

...noColorTerminalOverride,
});

testUsingContext('create --offline success', () async {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I should have caught it before, but I believe that this integration test is not needed because we already have: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/test/commands.shard/permeable/create_test.dart#L1871

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@fluttergithubbot fluttergithubbot merged commit f523ddd into flutter:master Feb 12, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Feb 12, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants