Skip to content

Conversation

@loic-sharma
Copy link
Member

@loic-sharma loic-sharma commented Jun 13, 2025

We plan to export the internal attribute from package:flutter/foundation.dart.

Currently, go_router has files that import both package:meta/meta.dart and package:flutter/foundation.dart. This causes lint failures when foundation exports internal:

   info - lib/src/match.dart:12:8 - The import of 'package:meta/meta.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/foundation.dart'. Try removing the import directive. - unnecessary_import
   info - lib/src/route.dart:10:8 - The import of 'package:meta/meta.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/foundation.dart'. Try removing the import directive. - unnecessary_import

This updates go_router to use a library prefix for package:meta in affected files to make the lints happy.

This change is a refactoring and does not affect semantics and is exempt from the test, version change, and CHANGELOG policies.

Part of flutter/flutter#167668

Pre-Review Checklist

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

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

@loic-sharma loic-sharma requested a review from chunhtai as a code owner June 13, 2025 19:23
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@loic-sharma loic-sharma added override: no versioning needed Override the check requiring version bumps for most changes override: no changelog needed Override the check requiring CHANGELOG updates for most changes labels Jun 13, 2025
Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM, will there be another migration to use the foundation one?

@loic-sharma
Copy link
Member Author

Yup!

@stuartmorgan-g
Copy link
Collaborator

test-exempt: code refactor with no semantic change

@loic-sharma loic-sharma force-pushed the go_router_prepare_for_internal branch from f5b65f8 to 99bd076 Compare June 17, 2025 16:48
@loic-sharma loic-sharma added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 17, 2025
@Piinks Piinks added autosubmit Merge PR when tree becomes green via auto submit App and removed autosubmit Merge PR when tree becomes green via auto submit App labels Jun 18, 2025
@auto-submit auto-submit bot merged commit cfd7a7c into flutter:main Jun 18, 2025
78 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 19, 2025
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Jun 19, 2025
flutter/packages@715a0a5...0ec4053

2025-06-19 [email protected] Roll Flutter from
8303a96 to 85a9b4f (93 revisions) (flutter/packages#9457)
2025-06-19 [email protected] [go_router]
Update sype safe routing topic to use mixin from go_router_builder 3.0.0
(flutter/packages#9422)
2025-06-19 [email protected] [go_router] fix:
PopScope.onPopInvokedWithResult not called in branch routes
(flutter/packages#9245)
2025-06-18 [email protected] [pigeon]
Create a message call free InstanceManager when running unit tests
(flutter/packages#9395)
2025-06-18 [email protected] [go_router] Use
library prefix for meta (flutter/packages#9434)
2025-06-18 [email protected] [go_router] fix
Popping state and re-rendering scaffold at the same time doesn't update
the URL on web [new] (flutter/packages#8352)
2025-06-18 [email protected] [camera_avfoundation] Fix
incorrect types in image stream events (flutter/packages#9418)
2025-06-18 [email protected] [go_router_builder] Temporarily
restrict `build` (flutter/packages#9453)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Ortes pushed a commit to Ortes/packages that referenced this pull request Jun 25, 2025
We plan to export the `internal` attribute from `package:flutter/foundation.dart`.

Currently, `go_router` has files that import both `package:meta/meta.dart` and `package:flutter/foundation.dart`. This causes [lint failures](https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8712222978061136193/+/u/run_test.dart_for_flutter_plugins_shard_and_subshard_analyze/stdout) when `foundation` exports `internal`:

```
   info - lib/src/match.dart:12:8 - The import of 'package:meta/meta.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/foundation.dart'. Try removing the import directive. - unnecessary_import
   info - lib/src/route.dart:10:8 - The import of 'package:meta/meta.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/foundation.dart'. Try removing the import directive. - unnecessary_import
```

This updates go_router to use a library prefix for `package:meta` in affected files to make the lints happy.

This change is a refactoring and does not affect semantics and is exempt from the test, version change, and CHANGELOG policies.

Part of flutter/flutter#167668

## Pre-Review Checklist

[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
mboetger pushed a commit to mboetger/flutter that referenced this pull request Jul 21, 2025
flutter/packages@715a0a5...0ec4053

2025-06-19 [email protected] Roll Flutter from
8303a96 to 85a9b4f (93 revisions) (flutter/packages#9457)
2025-06-19 [email protected] [go_router]
Update sype safe routing topic to use mixin from go_router_builder 3.0.0
(flutter/packages#9422)
2025-06-19 [email protected] [go_router] fix:
PopScope.onPopInvokedWithResult not called in branch routes
(flutter/packages#9245)
2025-06-18 [email protected] [pigeon]
Create a message call free InstanceManager when running unit tests
(flutter/packages#9395)
2025-06-18 [email protected] [go_router] Use
library prefix for meta (flutter/packages#9434)
2025-06-18 [email protected] [go_router] fix
Popping state and re-rendering scaffold at the same time doesn't update
the URL on web [new] (flutter/packages#8352)
2025-06-18 [email protected] [camera_avfoundation] Fix
incorrect types in image stream events (flutter/packages#9418)
2025-06-18 [email protected] [go_router_builder] Temporarily
restrict `build` (flutter/packages#9453)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
vashworth pushed a commit to vashworth/packages that referenced this pull request Jul 30, 2025
We plan to export the `internal` attribute from `package:flutter/foundation.dart`.

Currently, `go_router` has files that import both `package:meta/meta.dart` and `package:flutter/foundation.dart`. This causes [lint failures](https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8712222978061136193/+/u/run_test.dart_for_flutter_plugins_shard_and_subshard_analyze/stdout) when `foundation` exports `internal`:

```
   info - lib/src/match.dart:12:8 - The import of 'package:meta/meta.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/foundation.dart'. Try removing the import directive. - unnecessary_import
   info - lib/src/route.dart:10:8 - The import of 'package:meta/meta.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/foundation.dart'. Try removing the import directive. - unnecessary_import
```

This updates go_router to use a library prefix for `package:meta` in affected files to make the lints happy.

This change is a refactoring and does not affect semantics and is exempt from the test, version change, and CHANGELOG policies.

Part of flutter/flutter#167668

## Pre-Review Checklist

[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App override: no changelog needed Override the check requiring CHANGELOG updates for most changes override: no versioning needed Override the check requiring version bumps for most changes p: go_router

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants