Skip to content

Conversation

@natebosch
Copy link
Member

@natebosch natebosch commented Mar 9, 2023

  • Delete test_api copy of the expect libraries and tests.
  • Re-export package:matcher/expect.dart from test_api.
  • Re-export from package:matcher/expect.dart directly to maintain the
    same library surface from package:test/test.dart and
    package:test/expect.dart.
  • Remove some documentation about specific matchers from the README.
  • Re-export some lib/src libraries that are used in libraries that we can't
    roll synchronously with this package.

Temporarily add dependency overrides on matcher while it is
unpublished.

- Remove the dependency on `matcher` from `test_api` and `test_core`.
- Re-export from `package:matcher/expect.dart` directly to maintain the
  same library surface from `package:test/test.dart` and
  `package:test/expect.dart`.
- Delete the `test_api` definition of the code that moved to
  `package:matcher`.
- Remove some documentation about specific matchers from the README.

Temporarily add dependency overrides on `matcher` while it is
unpublished.
Remove tests for imports in removed libraries.
@natebosch natebosch marked this pull request as ready for review March 13, 2023 17:56
@natebosch natebosch requested a review from jakemac53 March 13, 2023 17:56
@natebosch natebosch marked this pull request as draft March 13, 2023 18:07
@natebosch
Copy link
Member Author

I'm going to rework this - we'll keep exporting the APIs from test_api for now so that we have a window to transition the export from flutter_test.

It looks like there are a bunch of other misuses of test_api in the flutter repo too, so we'll need to get that all cleaned up as we roll.

Will make it easier to incrementally roll to flutter
The implementation of `expect` used to be hidden, do the same with
`matcher`.
Some internal targets make this a hard failure :(
@natebosch natebosch marked this pull request as ready for review March 16, 2023 21:34
@natebosch
Copy link
Member Author

This passed a presubmit, and I'm waiting on a global test run now. It should be possible to land in this state and start prepping for publish.

We will necessarily have to publish one of matcher or test_api with unsatisfiable constraints. There will be a cyclic dependency between these packages.
@jakemac53 @kevmoo - any concerns about a cyclic pub dep? We will be able to fix the cycle in the next release of test_api.

After publishing, I will work on cleaning up usage from flutter_test and other impacted uses of test_api by shifting them to using package:matcher/expect.dart.

'Please use package:test.')
library test_core;

export 'package:test_api/expect.dart';
Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't find anything internally that was using this import for any of these APIs.

@kevmoo
Copy link
Member

kevmoo commented Mar 16, 2023

I think a short-term cycle is fine. 🤷

@jakemac53
Copy link
Contributor

As long as it isn't a library cycle I have no issue with a pub package cycle

@natebosch natebosch merged commit cc0598b into master Mar 17, 2023
@natebosch natebosch deleted the expect-to-matcher branch March 17, 2023 22:39
natebosch pushed a commit that referenced this pull request Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants