Skip to content

[path_parsing] Fix deprecation lints - #12704

Merged
auto-submit[bot] merged 4 commits into
flutter:mainfrom
ValentinVignal:path-parsing/Fix-deprecation-lints
Sep 2, 2026
Merged

[path_parsing] Fix deprecation lints#12704
auto-submit[bot] merged 4 commits into
flutter:mainfrom
ValentinVignal:path-parsing/Fix-deprecation-lints

Conversation

@ValentinVignal

Copy link
Copy Markdown
Contributor

Part of flutter/flutter#178120

Pre-Review Checklist

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

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

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

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Aug 31, 2026
@flutter-dashboard

Copy link
Copy Markdown

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.

@ValentinVignal

ValentinVignal commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

I would think this is a situation where we cannot write tests and the existing ones are used to catch regressions?

Also, I updated the entry ## NEXT in the changelog. Does it need a new version in itself? Or maybe it shouldn't appear in the changelog at all?

What do you think?

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the path_parsing package to address deprecation lints by replacing deprecated scale calls with scaledByDouble in SvgPathNormalizer. The review feedback suggests simplifying the scaledByDouble calls by passing 1.0 for both the Z and W scale factors, as these components are unused in 2D mapping.

pointTransform.setIdentity();

pointTransform.scale(1.0 / rx, 1.0 / ry);
pointTransform.scaledByDouble(1.0 / rx, 1.0 / ry, 1.0 / rx, 1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Since this is a 2D transformation and the Z/W components are completely unused by _mapPoint, we can pass 1.0 for both the Z and W scale factors instead of 1.0 / rx and 1. This is cleaner, more explicit, and avoids unnecessary calculations.

Suggested change
pointTransform.scaledByDouble(1.0 / rx, 1.0 / ry, 1.0 / rx, 1);
pointTransform.scaledByDouble(1.0 / rx, 1.0 / ry, 1.0, 1.0);

pointTransform.setIdentity();
pointTransform.rotateZ(angle);
pointTransform.scale(rx, ry);
pointTransform.scaledByDouble(rx, ry, rx, 1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Similarly, since the Z/W components are unused in 2D mapping, we can pass 1.0 for both the Z and W scale factors instead of rx and 1.

Suggested change
pointTransform.scaledByDouble(rx, ry, rx, 1);
pointTransform.scaledByDouble(rx, ry, 1.0, 1.0);

@ValentinVignal
ValentinVignal force-pushed the path-parsing/Fix-deprecation-lints branch from aa1d8e2 to a28acb6 Compare September 1, 2026 06:25
@andywolff andywolff added override: no versioning needed Override the check requiring version bumps for most changes CICD Run CI/CD and removed CICD Run CI/CD override: no versioning needed Override the check requiring version bumps for most changes labels Sep 1, 2026

@andywolff andywolff left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I noticed that the analyze downgraded test failed with

The method 'scaleByDouble' isn't defined for the type 'Matrix4'.

Matrix4.scaleByDouble was introduced in vector_math 2.2.0, but path_parsing/pubspec.yaml currently specifies vector_math: ^2.1.0. Please update this to ^2.2.0. Also please update the note in the changelog to use third person present tense and mention the vector_math version increment, like "Fixes deprecation lints and updates minimum vector_math dependency."

@andywolff andywolff added the override: no versioning needed Override the check requiring version bumps for most changes label Sep 1, 2026
@ValentinVignal
ValentinVignal force-pushed the path-parsing/Fix-deprecation-lints branch from 0606bdd to 7d7327b Compare September 2, 2026 06:01

@andywolff andywolff left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good, thanks

@andywolff andywolff added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 2, 2026
@auto-submit
auto-submit Bot merged commit 18fe786 into flutter:main Sep 2, 2026
13 checks passed
pull Bot pushed a commit to Mu-L/flutter that referenced this pull request Sep 2, 2026
…r#192191)

flutter/packages@7a7912f...18fe786

2026-09-02 32538273+ValentinVignal@users.noreply.github.com
[path_parsing] Fix deprecation lints (flutter/packages#12704)
2026-09-02 srawlins@google.com [material_ui] Use super parameters in
more places (flutter/packages#12460)
2026-09-02 21270878+elliette@users.noreply.github.com [material_ui] Add
a README and placeholders for migrating gen_defaults templates
(flutter/packages#12714)
2026-09-01 victor.orozco@cloudsufi.com [image_picker] Add native tests
for image, metadata, photo-asset, and PHPicker save utilities
(flutter/packages#12536)
2026-09-01 lozhkovoi@gmail.com [material_ui] Port routes_transition_test
to material_ui (flutter/packages#12634)
2026-09-01 engine-flutter-autoroll@skia.org Roll Flutter from
c8c5e3b to 0cbd1a4 (23 revisions) (flutter/packages#12712)
2026-09-01 32538273+ValentinVignal@users.noreply.github.com
[material_ui] Remove !chrome in text_field_test.dart
(flutter/packages#12548)

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 flutter-ecosystem@google.com 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
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 CICD Run CI/CD override: no versioning needed Override the check requiring version bumps for most changes p: path_parsing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants