Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: resolve Split import conflict by hiding Flutter's Split class#918

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
naghinezhad wants to merge3 commits intorrousselGit:master
base:master
Choose a base branch
Loading
fromnaghinezhad:master

Conversation

@naghinezhad
Copy link

@naghinezhadnaghinezhad commentedSep 17, 2025
edited by coderabbitaibot
Loading

  • Hide Split from flutter/material.dart import to avoid naming conflict
  • Keep using Split from devtools_app_shared/ui.dart
  • No UI changes, only resolves compilation error

Summary by CodeRabbit

  • Bug Fixes

    • Fixed a naming/import conflict in the devtools extension to prevent potential runtime issues; no UI or public API changes expected.
  • Tests

    • Reduced stress/scale in a provider test to make the test suite more efficient and reliable.

- Hide Split from flutter/material.dart import to avoid naming conflict- Keep using Split from devtools_app_shared/ui.dart- No UI changes, only resolves compilation error
@coderabbitai
Copy link

coderabbitaibot commentedSep 17, 2025
edited
Loading

Walkthrough

Updated one import to hide theSplit symbol to avoid a name conflict, and reduced the iteration count in a test from 1500 to 500 providers; no API or control-flow changes.

Changes

Cohort / File(s)Summary
Import resolution
packages/provider_devtools_extension/lib/src/provider_screen.dart
Changedimport 'package:flutter/material.dart'; toimport 'package:flutter/material.dart' hide Split; to resolve a symbol conflict. No other changes.
Test adjustments
packages/provider/test/null_safe/multi_provider_test.dart
Reduced loop iterations in "Supports a large number of providers" from 1500 to 500, decreasing the number ofProvider<int>.value instances created. No other logic changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I twitched my nose at a naming spat,
HidSplit where conflicts sat;
Fewer providers in a test I fixed,
Hops are smooth, the code's betwixt—
A rabbit's joy in tidy bits. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title Check✅ PassedThe title succinctly and accurately describes the primary change: hiding Flutter's Split symbol from the material import to resolve a naming/import conflict so the file uses Split from devtools_app_shared/ui.dart, which matches the changed import in the diff and the PR objectives noting a compilation-only fix with no UI or API changes.
Docstring Coverage✅ PassedNo functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment@coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitaicoderabbitaibot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/provider_devtools_extension/lib/src/provider_screen.dart (1)

6-6:Optional: prefer explicit import prefix overhide for long‑term clarity.

Using an alias for DevTools UI reduces the chance of future symbol clashes and improves readability (e.g.,dt.Split). Non-blocking suggestion.

For example:

// importsimport'package:devtools_app_shared/ui.dart'as dt;import'package:flutter/material.dart';// no hide needed// usagesfinal splitAxis= dt.Split.axisFor(context,0.85);return dt.Split(  axis: splitAxis,  initialFractions:const [0.33,0.67],  children: [/* ... */ ],);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between558bdcd and1d251ed.

📒 Files selected for processing (1)
  • packages/provider_devtools_extension/lib/src/provider_screen.dart (1 hunks)
🔇 Additional comments (1)
packages/provider_devtools_extension/lib/src/provider_screen.dart (1)

6-6:Approve — hidingSplit is correct; verify there are no other imports

HidingSplit fixes the ambiguous reference and preserves DevTools'Split usage. Automated sandbox verification failed (/dev/fd unavailable); run the included check script locally and ensure no other files under packages/provider_devtools_extension importpackage:flutter/material.dart withouthide Split while usingSplit.

The test 'Supports a large number of providers' was failing due to stack overflow when creating 1500 providers. Reduced the number to 500 to fix the issue while still testing the functionality with a significant number of providers.
Copy link

@coderabbitaicoderabbitaibot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/provider/test/null_safe/multi_provider_test.dart (1)

14-14:1500 → 500 reduces stress coverage; extract to a constant and optionally keep a gated stress test.

If the reduction was to deflake/accelerate CI, fine—please document the rationale. To preserve intent, use a named constant and consider an opt‑in stress test at 1500 (skipped by default or CI‑flagged).

Apply within this hunk:

-            for (var i = 0; i < 500; i++) Provider<int>.value(value: i),+            for (var i = 0; i < _kLargeProviderCount; i++) Provider<int>.value(value: i),

Add near the imports (outside this hunk):

// Large but CI-friendly default; adjust as needed.const _kLargeProviderCount=500;

Optionally add a separate, skipped-by-default stress test (outside this hunk) to run with 1500 providers under a CI flag.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between1d251ed andd872181.

📒 Files selected for processing (1)
  • packages/provider/test/null_safe/multi_provider_test.dart (1 hunks)

MultiProvider(
providers: [
for (var i=0; i<1500; i++)Provider<int>.value(value: i),
for (var i=0; i<500; i++)Provider<int>.value(value: i),

Choose a reason for hiding this comment

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

Why change this?

Copy link
Author

Choose a reason for hiding this comment

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

The test 'Supports a large number of providers' was failing due to stack overflow when creating 1500 providers. Reduced the number to 500 to fix the issue while still testing the functionality with a significant number of providers.

Choose a reason for hiding this comment

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

I'd rather keep it high. It passes on my machine and the CI.

500 is too low for this test.

Copy link
Author

Choose a reason for hiding this comment

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

Alright, thank you for your time.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@coderabbitaicoderabbitai[bot]coderabbitai[bot] left review comments

@rrousselGitrrousselGitAwaiting requested review from rrousselGit

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@naghinezhad@rrousselGit

[8]ページ先頭

©2009-2025 Movatter.jp