Skip to content

FED-3476 Adjust builder for Dart 3#972

Merged
btr-rmconsole-1[bot] merged 2 commits into
masterfrom
fedx_3476
Apr 14, 2025
Merged

FED-3476 Adjust builder for Dart 3#972
btr-rmconsole-1[bot] merged 2 commits into
masterfrom
fedx_3476

Conversation

@robbecker-wf

@robbecker-wf robbecker-wf commented Jan 16, 2025

Copy link
Copy Markdown
Member

Summary

The over_react builder fails to generate code when there are analysis errors in the source file, regardless of their severity, due to the short-circuit here.

Historically, this hasn't been an issue since we do a non-resolved AST parse, and most infos/warnings require resolved AST.

However, apparently the warning for bad doc comment directives comes through in unresolved AST.

This causes failures to emit several over_react.g.dart files due to doc comments like this:

  /// Optional props to forward to the `ClickAwayListener` component
  /// when {@link disableClickAwayListener } is `false`.

and also outputs this warning:

[WARNING] over_react:overReactBuilder on package:unify_ui/src/components/custom/popper_trigger/popper_trigger.dart:
lib/src/components/custom/popper_trigger/popper_trigger.dart(2016..2019): Doc directive 'link' is unknown.

This issue should not prevent over_react from generating code.

@robbecker-wf robbecker-wf deleted the fedx_3476 branch January 16, 2025 23:47
@robbecker-wf robbecker-wf restored the fedx_3476 branch April 11, 2025 20:01
@robbecker-wf robbecker-wf reopened this Apr 11, 2025
@robbecker-wf robbecker-wf changed the title Adjust builder for Dart 3 FED-3476 Adjust builder for Dart 3 Apr 14, 2025
@robbecker-wf robbecker-wf marked this pull request as ready for review April 14, 2025 20:58

@greglittlefield-wf greglittlefield-wf 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.

  • Changes look good
    • We can follow up to add regression tests and re-asses any dev experience improvements
  • Verified behavior locally
    • In over_react examples, analysis warnings/errors no longer prevent over_react builder from attempting to generate code
    • Packages that previously couldn't build on Dart 3 due to analysis warnings can now build
    • No regressions when building one of our larger apps

+10

@greglittlefield-wf

Copy link
Copy Markdown
Contributor

@Workiva/release-management-p

@rmconsole-wf rmconsole-wf 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.

+1 from RM

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants