Skip to content

Conversation

@chrisbobbe
Copy link
Contributor

Fixes #141140.

This ensures that if you call .copyWith and pass a debugLabel, the debugLabel won't be ignored, even if the receiver (the TextStyle you're calling .copyWith on) doesn't have a debugLabel.

The debugLabel field was added in #12552. I skimmed the discussion there and didn't find anything indicating that the param was being ignored on purpose.

I added a test case that passes with the new code and fails with the old code.

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.

Fixes flutter#141140.

This ensures that if you call `.copyWith` and pass a `debugLabel`,
the `debugLabel` won't be ignored, even if the receiver (the
TextStyle you're calling `.copyWith` on) doesn't have a
`debugLabel`.

The debugLabel field was added in flutter#12552. I skimmed the discussion
there and didn't find anything indicating that the param was being
ignored on purpose.

I added a test case that passes with the new code and fails with the
old code.
@github-actions github-actions bot added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. labels Jan 8, 2024
Copy link
Member

@gnprice gnprice left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! LGTM.

@LongCatIsLooong LongCatIsLooong added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 9, 2024
@auto-submit auto-submit bot merged commit 8d2aca3 into flutter:master Jan 9, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 10, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jan 10, 2024
flutter/flutter@126302d...b840a60

2024-01-10 [email protected] Roll Flutter Engine from 3269fd84460d to b361a60ae224 (1 revision) (flutter/flutter#141271)
2024-01-10 [email protected] Roll Flutter Engine from a5d446da5495 to 3269fd84460d (1 revision) (flutter/flutter#141264)
2024-01-10 [email protected] Roll Flutter Engine from 3ccf66bed335 to a5d446da5495 (2 revisions) (flutter/flutter#141252)
2024-01-10 [email protected] Roll Flutter Engine from e57e418c02ae to 3ccf66bed335 (1 revision) (flutter/flutter#141241)
2024-01-10 [email protected] Roll Flutter Engine from 7e6f3d847e01 to e57e418c02ae (1 revision) (flutter/flutter#141240)
2024-01-10 [email protected] Roll Flutter Engine from 1cf2e0a603c7 to 7e6f3d847e01 (1 revision) (flutter/flutter#141237)
2024-01-10 [email protected] Roll Flutter Engine from 32bbf8be8d2c to 1cf2e0a603c7 (1 revision) (flutter/flutter#141232)
2024-01-10 [email protected] Roll Flutter Engine from 5b9d2132b7cd to 32bbf8be8d2c (1 revision) (flutter/flutter#141229)
2024-01-10 [email protected] Roll Flutter Engine from 941f268fc8bb to 5b9d2132b7cd (1 revision) (flutter/flutter#141228)
2024-01-10 [email protected] Roll Flutter Engine from 542fea9edae4 to 941f268fc8bb (3 revisions) (flutter/flutter#141224)
2024-01-10 [email protected] `NestedScrollView`'s outer scrollable jumping with `BouncingScrollPhysics` due to `double` precision errors (flutter/flutter#138319)
2024-01-10 [email protected] Roll Flutter Engine from 8c1501f3956d to 542fea9edae4 (1 revision) (flutter/flutter#141217)
2024-01-10 [email protected] Fix or except leaks. (flutter/flutter#141081)
2024-01-09 [email protected] Roll Flutter Engine from 693af0c699c5 to 8c1501f3956d (1 revision) (flutter/flutter#141215)
2024-01-09 [email protected] TextStyle: In copyWith, stop ignoring debugLabel when receiver has none (flutter/flutter#141141)
2024-01-09 [email protected] Roll Flutter Engine from a35e3b026e1d to 693af0c699c5 (5 revisions) (flutter/flutter#141209)
2024-01-09 [email protected] Replace deprecated `exists` in podhelper.rb (flutter/flutter#141169)
2024-01-09 [email protected] Correctly handle null case in ProcessText.queryTextActions (flutter/flutter#141205)
2024-01-09 [email protected] Add environment variable to leak tracking bots. (flutter/flutter#141137)
2024-01-09 [email protected] Reapply "Dynamic view sizing" (#140165) (flutter/flutter#140918)
2024-01-09 [email protected] Introduce new Form validation method  (flutter/flutter#135578)
2024-01-09 [email protected] Update `RouteObserver` example and fix an error thrown (flutter/flutter#141166)
2024-01-09 [email protected] Upgrade leak_tracker. (flutter/flutter#141153)
2024-01-09 [email protected] [ci.yaml] Do not run packaging test on presubmit (flutter/flutter#141192)
2024-01-09 [email protected] Roll Flutter Engine from 036b39fa47fa to a35e3b026e1d (6 revisions) (flutter/flutter#141191)
2024-01-09 [email protected] Run tests on iOS 16 or iOS 17 (flutter/flutter#141178)
2024-01-09 [email protected] Remove conditions that depend on order. (flutter/flutter#141183)
2024-01-09 [email protected] Roll Flutter Engine from b3c8597df0e2 to 036b39fa47fa (1 revision) (flutter/flutter#141179)
2024-01-09 [email protected] resolved the issue of indeterminate CircularProgressIndicator.adaptive on Darwin  (flutter/flutter#140947)

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
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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
@chrisbobbe chrisbobbe deleted the pr-text-style-debug=label branch January 15, 2024 22:00
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this pull request Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: text input Entering text in a text field or keyboard related problems autosubmit Merge PR when tree becomes green via auto submit App framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TextStyle: debugLabel param ignored in copyWith unless receiver already has a debugLabel

3 participants