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

bump cupertino_icons to 1.08 #146806

Merged
merged 3 commits into from May 10, 2024

Conversation

LongCatIsLooong
Copy link
Contributor

And fix the incorrect codepoint for square_pencil_fill

Pre-launch Checklist

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

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

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.

@github-actions github-actions bot added tool Affects the "flutter" command-line tool. See also t: labels. framework flutter/packages/flutter repository. See also f: labels. f: cupertino flutter/packages/flutter/cupertino repository labels Apr 16, 2024
Copy link
Member

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

RSLGTM. @LongCatIsLooong do you have a reference link for why changing 0xf417 -> 0xf418 is the correct change?

/// This is the same icon as [create] which is available in cupertino_icons 0.1.3.
/// This is the same icon as [create_solid] which is available in cupertino_icons 0.1.3.
static const IconData square_pencil_fill = IconData(0xf417, fontFamily: iconFont, fontPackage: iconFontPackage);
static const IconData square_pencil_fill = IconData(0xf418, fontFamily: iconFont, fontPackage: iconFontPackage);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There're new assertions in the script that makes sure that there are no codepoint conflicts so 0xf418 is not occupied by another symbol.

@LongCatIsLooong
Copy link
Contributor Author

RSLGTM. @LongCatIsLooong do you have a reference link for why changing 0xf417 -> 0xf418 is the correct change?

Oh I should have added that, thanks! Added a github comment: #146806 (comment)

@LongCatIsLooong
Copy link
Contributor Author

I don't have discord access right now. Can someone help me with contacting @test-exemption-reviewer? The codepoint change was in fact auto generated:.

@christopherfujino
Copy link
Member

I don't have discord access right now. Can someone help me with contacting @test-exemption-reviewer? The codepoint change was in fact auto generated:.

I requested an exemption in hackers, but there was a question.

@andrewkolos
Copy link
Contributor

Hello from PR triage. If my archaeological process was correct, this was was the conversation on discord. I will quote from it for those who do not access to Discord.

@christopherfujino: requestion (sic.) a test exemption for Mr. Long cat for #146806 (comment)

@Hixie: would it have caught this error?

@christopherfujino: it's unclear to me what the error was, cc @LongCatIsLooong and @xster

As far as I can tell, having a test for this would have theoretically caught this issue, but wouldn't such a test be no more than a copy-paste of a map of icon names to unicode code points? I hope my understanding is correct here. Assuming that understanding is correct, then—at the risk of asking a question so general that is pointless—should Flutter really have tests that directly verify correctness of its dependencies? All opinions welcome.

@Hixie
Copy link
Contributor

Hixie commented Apr 26, 2024

I don't really have the context here to fully understand the issue that this fixes. Could you elaborate on what happened here?

For example, did we attempt to roll and then something failed so we knew we had to update the codepoint? Or did we roll, and in the dependency's documentation it warned that there was a codepoint change? Or did we roll and discover coincidentally that our use of the codepoint was wrong all along and we needed to change it? Or something else?

@LongCatIsLooong
Copy link
Contributor Author

The issue is create_solid and create are currently mapped to the same codepoint when they are supposed to be different icons (https://main-api.flutter.dev/flutter/cupertino/CupertinoIcons/create-constant.html). The incorrect mapping was discovered because the script that generates the font was updated, so basically "discover coincidentally that our use of the codepoint was wrong all along and we needed to change it".

The .dart file that binds the codepoints to dart names is also generated by that script (https://github.com/xster/framework7-icons/pull/2/files#diff-1348eeb39757d4b57ff814747b5b00c2a1eca69059ae7592754c91691058b4b3), and with the updated script it would throw an exception if 2 different svgs get imported into the same glyph.

@Hixie
Copy link
Contributor

Hixie commented Apr 28, 2024

Did we catch it when updating the script? Or did we not try to rerun the script after updating it, and then caught it later?

@LongCatIsLooong
Copy link
Contributor Author

LongCatIsLooong commented Apr 28, 2024

I did not realize there was a codepoint conflict until I ran the updated script to generate the ttf (and it threw an error), so the latter I think.

@Hixie
Copy link
Contributor

Hixie commented Apr 28, 2024

In that case is it possible to write a test that runs the script and double-checks that the output matches what is in the tree?

@LongCatIsLooong
Copy link
Contributor Author

In that case is it possible to write a test that runs the script and double-checks that the output matches what is in the tree?

Do you mean adding a test to flutter/flutter? The script lives in https://github.com/xster/framework7-icons/ so I fear that test won't be hermetic, and AFAIK there's no way of mapping the pub version of the package to the commit hash in the repo that contains the script, so I don't know which version of the script I should test against.

It does sound weird that the icon font is provided by the cupertino_icons package while the dart bindings are provided by the cupertino package. Is it possible to move the CupertinoIcons class from flutter/flutter to the cupertio_icons package? Then the codepoint mapping can be tested using FontLoader in golden tests.

@LongCatIsLooong
Copy link
Contributor Author

LongCatIsLooong commented May 9, 2024

I'll remove the codepoint change since that will break apps that pinned cupertino_icons to older versions (the icon isn't right but with this it would show the notdef tofu character). Filed #148075.

@github-actions github-actions bot removed framework flutter/packages/flutter repository. See also f: labels. f: cupertino flutter/packages/flutter/cupertino repository labels May 9, 2024
Copy link
Member

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

LGTM

@LongCatIsLooong LongCatIsLooong added the autosubmit Merge PR when tree becomes green via auto submit App label May 9, 2024
@auto-submit auto-submit bot merged commit a8a9b9b into flutter:master May 10, 2024
129 checks passed
@LongCatIsLooong LongCatIsLooong deleted the bump-cupertino-icons branch May 10, 2024 22:49
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 11, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 11, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request May 11, 2024
flutter/flutter@2bfb1b0...2aa05c1

2024-05-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from fad88cb16d03 to 558a81dd8b08 (3 revisions) (flutter/flutter#148163)
2024-05-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from ba8e0d3e2f23 to fad88cb16d03 (9 revisions) (flutter/flutter#148156)
2024-05-11 32538273+ValentinVignal@users.noreply.github.com Add test for scaffold.1.dart (flutter/flutter#147966)
2024-05-10 tessertaha@gmail.com Fix `MaterialStateBorderSide` lerp in the `Checkbox` and chips (flutter/flutter#148124)
2024-05-10 jmccandless@google.com Docs on TextField disposed by a scrollable (flutter/flutter#148149)
2024-05-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from d4f705ccb695 to ba8e0d3e2f23 (8 revisions) (flutter/flutter#148147)
2024-05-10 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#148148)
2024-05-10 32538273+ValentinVignal@users.noreply.github.com Add `clipBehavior` to `DialogTheme` (flutter/flutter#147635)
2024-05-10 31859944+LongCatIsLooong@users.noreply.github.com bump cupertino_icons to 1.08 (flutter/flutter#146806)
2024-05-10 sokolovskyi.konstantin@gmail.com Add test for animated_size.0.dart API example. (flutter/flutter#147828)
2024-05-10 120297255+PurplePolyhedron@users.noreply.github.com Fix `DropdownMenu` keyboard navigation (flutter/flutter#147294)
2024-05-10 sokolovskyi.konstantin@gmail.com Add test for draggable.0.dart API example. (flutter/flutter#147941)
2024-05-10 magder@google.com Update TESTOWNERS (flutter/flutter#148108)
2024-05-10 sokolovskyi.konstantin@gmail.com Add tests for stream_builder.0.dart API example. (flutter/flutter#147832)
2024-05-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from 1ccd0c308b3a to d4f705ccb695 (2 revisions) (flutter/flutter#148142)
2024-05-10 engine-flutter-autoroll@skia.org Roll Packages from 8de142d to 6c4482a (8 revisions) (flutter/flutter#148079)
2024-05-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from c0917b14fc36 to 1ccd0c308b3a (10 revisions) (flutter/flutter#148137)
2024-05-10 nate.w5687@gmail.com `if` chains � `switch` expressions (flutter/flutter#147793)
2024-05-10 49699333+dependabot[bot]@users.noreply.github.com Bump ossf/scorecard-action from 2.3.1 to 2.3.3 (flutter/flutter#148091)
2024-05-10 31859944+LongCatIsLooong@users.noreply.github.com Reland "Implement computeDryBaseline for `RenderWrap` (#146260)" (flutter/flutter#148086)
2024-05-10 magder@google.com Update dependabot reviewers (flutter/flutter#148101)
2024-05-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6e722ae213bd to c0917b14fc36 (1 revision) (flutter/flutter#148084)
2024-05-09 christopherfujino@gmail.com Don't pin package:macros (flutter/flutter#148087)
2024-05-09 ian@hixie.ch Remove hidden dependencies on the default LocalPlatform (flutter/flutter#147342)
2024-05-09 nate.w5687@gmail.com Getting rid of containers (flutter/flutter#147432)
2024-05-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from c0fd3386d018 to 6e722ae213bd (2 revisions) (flutter/flutter#148070)

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 bmparr@google.com,rmistry@google.com,stuartmorgan@google.com 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
TecHaxter pushed a commit to TecHaxter/flutter_packages that referenced this pull request May 22, 2024
…r#6713)

flutter/flutter@2bfb1b0...2aa05c1

2024-05-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from fad88cb16d03 to 558a81dd8b08 (3 revisions) (flutter/flutter#148163)
2024-05-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from ba8e0d3e2f23 to fad88cb16d03 (9 revisions) (flutter/flutter#148156)
2024-05-11 32538273+ValentinVignal@users.noreply.github.com Add test for scaffold.1.dart (flutter/flutter#147966)
2024-05-10 tessertaha@gmail.com Fix `MaterialStateBorderSide` lerp in the `Checkbox` and chips (flutter/flutter#148124)
2024-05-10 jmccandless@google.com Docs on TextField disposed by a scrollable (flutter/flutter#148149)
2024-05-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from d4f705ccb695 to ba8e0d3e2f23 (8 revisions) (flutter/flutter#148147)
2024-05-10 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#148148)
2024-05-10 32538273+ValentinVignal@users.noreply.github.com Add `clipBehavior` to `DialogTheme` (flutter/flutter#147635)
2024-05-10 31859944+LongCatIsLooong@users.noreply.github.com bump cupertino_icons to 1.08 (flutter/flutter#146806)
2024-05-10 sokolovskyi.konstantin@gmail.com Add test for animated_size.0.dart API example. (flutter/flutter#147828)
2024-05-10 120297255+PurplePolyhedron@users.noreply.github.com Fix `DropdownMenu` keyboard navigation (flutter/flutter#147294)
2024-05-10 sokolovskyi.konstantin@gmail.com Add test for draggable.0.dart API example. (flutter/flutter#147941)
2024-05-10 magder@google.com Update TESTOWNERS (flutter/flutter#148108)
2024-05-10 sokolovskyi.konstantin@gmail.com Add tests for stream_builder.0.dart API example. (flutter/flutter#147832)
2024-05-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from 1ccd0c308b3a to d4f705ccb695 (2 revisions) (flutter/flutter#148142)
2024-05-10 engine-flutter-autoroll@skia.org Roll Packages from 8de142d to 6c4482a (8 revisions) (flutter/flutter#148079)
2024-05-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from c0917b14fc36 to 1ccd0c308b3a (10 revisions) (flutter/flutter#148137)
2024-05-10 nate.w5687@gmail.com `if` chains � `switch` expressions (flutter/flutter#147793)
2024-05-10 49699333+dependabot[bot]@users.noreply.github.com Bump ossf/scorecard-action from 2.3.1 to 2.3.3 (flutter/flutter#148091)
2024-05-10 31859944+LongCatIsLooong@users.noreply.github.com Reland "Implement computeDryBaseline for `RenderWrap` (#146260)" (flutter/flutter#148086)
2024-05-10 magder@google.com Update dependabot reviewers (flutter/flutter#148101)
2024-05-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6e722ae213bd to c0917b14fc36 (1 revision) (flutter/flutter#148084)
2024-05-09 christopherfujino@gmail.com Don't pin package:macros (flutter/flutter#148087)
2024-05-09 ian@hixie.ch Remove hidden dependencies on the default LocalPlatform (flutter/flutter#147342)
2024-05-09 nate.w5687@gmail.com Getting rid of containers (flutter/flutter#147432)
2024-05-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from c0fd3386d018 to 6e722ae213bd (2 revisions) (flutter/flutter#148070)

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 bmparr@google.com,rmistry@google.com,stuartmorgan@google.com 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
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 tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants