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

PackageConfigProvider, MockSdk, etc for improved unit testing #2332

Merged
merged 5 commits into from
Sep 11, 2020

Conversation

srawlins
Copy link
Member

@srawlins srawlins commented Sep 4, 2020

This is a tiny step for #2295 .

  • The new PackageConfigProvider class abstracts over PackageConfig from package_config. PhysicalPackageConfigProvider uses the real one; MemoryPackageConfigProvider is used in tests.
  • The new isSdkLibraryDocumented abstracts over SdkLibrary's isDocumented, because it throws unimplemented for MockSdkLibrary.
  • Remove ResourceProviderExtensions.defaultSdkDir. Now this is a property of PackageMetaProvider.
  • Breaking change: Move io_utils listDir to be a private method in PackageBuilder.
  • Breaking change: Add parameter to PubPackageBuilder constructor for a PackageConfigProvider.
  • Breaking change: Add two parameters to the PackageMetaProvider constructor, one for the default SDK directory, and one for the DartSdk.
  • Deprecate package.dart's substituteNameVersion.
  • Shorten doc comments here and there to 80 columns.
  • Move any tests which use testing/test_package_small to be unit tests; delete the package in testing/.
  • Move some tests for properties of package which use the ginormous testing package to unit tests

@googlebot googlebot added the cla: yes Google CLA check succeeded. label Sep 4, 2020
@srawlins srawlins force-pushed the package-config-provider branch from 8f4f32c to 3a9d2c4 Compare September 7, 2020 17:45
@srawlins srawlins force-pushed the package-config-provider branch from 47aedf1 to ff91815 Compare September 7, 2020 22:51
@srawlins srawlins requested a review from scheglov September 8, 2020 02:56
@srawlins srawlins changed the title WIP: PackageConfigProvider, MockSdk, etc PackageConfigProvider, MockSdk, etc Sep 8, 2020
@srawlins srawlins changed the title PackageConfigProvider, MockSdk, etc PackageConfigProvider, MockSdk, etc for improved unit testing Sep 8, 2020
@srawlins srawlins merged commit 2bef0f2 into dart-lang:master Sep 11, 2020
@srawlins srawlins deleted the package-config-provider branch September 11, 2020 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google CLA check succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants