[L] Change in dart/sdk[main]: Remove redundant firstTokenOffset nulls across fragments

0 views
Skip to first unread message

Konstantin Shcheglov (Gerrit)

unread,
Aug 7, 2025, 6:52:43 PM8/7/25
to Fedor Shcheglov, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Fedor Shcheglov

Konstantin Shcheglov voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Fedor Shcheglov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Iba07f919b88b0bf585bfec0c5b8f4cbbe5214459
Gerrit-Change-Number: 444389
Gerrit-PatchSet: 3
Gerrit-Owner: Fedor Shcheglov <fedor.s...@gmail.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Attention: Fedor Shcheglov <fedor.s...@gmail.com>
Gerrit-Comment-Date: Thu, 07 Aug 2025 22:52:40 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Paul Berry (Gerrit)

unread,
Aug 8, 2025, 3:36:40 PM8/8/25
to Fedor Shcheglov, Johnni Winther, Commit Queue, Konstantin Shcheglov, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Fedor Shcheglov and Johnni Winther

Paul Berry voted and added 1 comment

Votes added by Paul Berry

Code-Review+1
Commit-Queue+2

1 comment

Patchset-level comments
Open in Gerrit

Related details

Attention is currently required from:
  • Fedor Shcheglov
  • Johnni Winther
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: Iba07f919b88b0bf585bfec0c5b8f4cbbe5214459
    Gerrit-Change-Number: 444389
    Gerrit-PatchSet: 3
    Gerrit-Owner: Fedor Shcheglov <fedor.s...@gmail.com>
    Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
    Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
    Gerrit-Reviewer: Paul Berry <paul...@google.com>
    Gerrit-Attention: Johnni Winther <johnni...@google.com>
    Gerrit-Attention: Fedor Shcheglov <fedor.s...@gmail.com>
    Gerrit-Comment-Date: Fri, 08 Aug 2025 19:36:37 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Commit Queue (Gerrit)

    unread,
    Aug 8, 2025, 3:36:54 PM8/8/25
    to Fedor Shcheglov, Paul Berry, Johnni Winther, Konstantin Shcheglov, dart-analys...@google.com, rev...@dartlang.org

    Commit Queue submitted the change

    Change information

    Commit message:
    Remove redundant firstTokenOffset nulls across fragments

    `firstTokenOffset` was required but always passed as `null` and later
    filled by `InformativeDataApplier`, making the API noisy and misleading.

    Made optional in:
    - FragmentImpl
    - ExecutableFragmentImpl
    - FieldFormalParameterFragmentImpl
    - FormalParameterFragmentImpl
    - FunctionFragmentImpl
    - GenericFunctionTypeFragmentImpl
    - NonParameterVariableFragmentImpl
    - PropertyAccessorFragmentImpl
    - SuperFormalParameterFragmentImpl
    - TypeParameterFragmentImpl

    Removed from constructors of:
    - ClassFragmentImpl
    - ConstructorFragmentImpl
    - EnumFragmentImpl
    - ExtensionFragmentImpl
    - ExtensionTypeFragmentImpl
    - FieldFragmentImpl
    - GetterFragmentImpl
    - InstanceFragmentImpl
    - InterfaceFragmentImpl
    - MethodFragmentImpl
    - MixinFragmentImpl
    - PropertyInducingFragmentImpl
    - TopLevelFunctionFragmentImpl
    - TopLevelVariableFragmentImpl

    All call sites across builders, readers, utilities, and tests were
    updated to stop passing `firstTokenOffset: null`.

    Behavior is unchanged: offsets continue to be computed and applied by
    `InformativeDataApplier`. This reduces boilerplate and clarifies the
    construction contract for synthetic and derived elements.
    Change-Id: Iba07f919b88b0bf585bfec0c5b8f4cbbe5214459
    Commit-Queue: Paul Berry <paul...@google.com>
    Reviewed-by: Paul Berry <paul...@google.com>
    Reviewed-by: Konstantin Shcheglov <sche...@google.com>
    Files:
    • M pkg/analyzer/lib/src/dart/element/display_string_builder.dart
    • M pkg/analyzer/lib/src/dart/element/element.dart
    • M pkg/analyzer/lib/src/dart/element/inheritance_manager3.dart
    • M pkg/analyzer/lib/src/dart/element/type_algebra.dart
    • M pkg/analyzer/lib/src/dart/element/type_constraint_gatherer.dart
    • M pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
    • M pkg/analyzer/lib/src/summary2/bundle_reader.dart
    • M pkg/analyzer/lib/src/summary2/element_builder.dart
    • M pkg/analyzer/lib/src/summary2/library_builder.dart
    • M pkg/analyzer/lib/src/test_utilities/mock_sdk_elements.dart
    • M pkg/analyzer/lib/src/utilities/extensions/element.dart
    • M pkg/analyzer/test/generated/elements_types_mixin.dart
    Change size: L
    Delta: 12 files changed, 107 insertions(+), 291 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Konstantin Shcheglov, +1 by Paul Berry
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: Iba07f919b88b0bf585bfec0c5b8f4cbbe5214459
    Gerrit-Change-Number: 444389
    Gerrit-PatchSet: 4
    Gerrit-Owner: Fedor Shcheglov <fedor.s...@gmail.com>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages