[M] Change in dart/sdk[main]: [analysis_server] Fix nested paths in log normalization

0 views
Skip to first unread message

Danny Tuppeny (Gerrit)

unread,
6:53 AM (14 hours ago) 6:53 AM
to Brian Wilkerson, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Brian Wilkerson and Samuel Rawlins

Danny Tuppeny added 1 comment

File pkg/analysis_server/lib/src/session_logger/log_normalizer.dart
Line 101, Patchset 1 (Latest): // Sort keys longest-to-shortest so that we always replace the
// largest part of the path if there are nested workspace folders.
..sort((a, b) => b.length.compareTo(a.length)))
Danny Tuppeny . unresolved

I did this assuming what's written in the commit message is correct (and we're trying to remove all workspace folder paths). However if this isn't the case (and we're really just trying to replace things like usernames that are above the root-most path), then another option would be to not add paths to the replacements if there is already a _parent_ path in the collection.

Open in Gerrit

Related details

Attention is currently required from:
  • Brian Wilkerson
  • Samuel Rawlins
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not 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: I75de1fb36a16636e0f50099cced1d5386318d589
Gerrit-Change-Number: 491640
Gerrit-PatchSet: 1
Gerrit-Owner: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
Gerrit-Comment-Date: Mon, 30 Mar 2026 10:53:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Samuel Rawlins (Gerrit)

unread,
10:01 AM (11 hours ago) 10:01 AM
to Danny Tuppeny, Keerti Parthasarathy, Brian Wilkerson, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Brian Wilkerson, Danny Tuppeny and Keerti Parthasarathy

Samuel Rawlins added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Samuel Rawlins . resolved

Adding Keerti for the comment.

Open in Gerrit

Related details

Attention is currently required from:
  • Brian Wilkerson
  • Danny Tuppeny
  • Keerti Parthasarathy
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not 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: I75de1fb36a16636e0f50099cced1d5386318d589
Gerrit-Change-Number: 491640
Gerrit-PatchSet: 1
Gerrit-Owner: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Keerti Parthasarathy <kee...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Attention: Keerti Parthasarathy <kee...@google.com>
Gerrit-Comment-Date: Mon, 30 Mar 2026 14:01:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Brian Wilkerson (Gerrit)

unread,
10:55 AM (10 hours ago) 10:55 AM
to Danny Tuppeny, Keerti Parthasarathy, Brian Wilkerson, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Danny Tuppeny and Keerti Parthasarathy

Brian Wilkerson added 1 comment

File pkg/analysis_server/lib/src/session_logger/log_normalizer.dart
Line 101, Patchset 1 (Latest): // Sort keys longest-to-shortest so that we always replace the
// largest part of the path if there are nested workspace folders.
..sort((a, b) => b.length.compareTo(a.length)))
Danny Tuppeny . unresolved

I did this assuming what's written in the commit message is correct (and we're trying to remove all workspace folder paths). However if this isn't the case (and we're really just trying to replace things like usernames that are above the root-most path), then another option would be to not add paths to the replacements if there is already a _parent_ path in the collection.

Brian Wilkerson

IIRC, the goal has more to do with being able to play back a session on a different machine where the paths to the roots might be different.

If that's true, then either solution would solve the problem, but replacing only the root-most path might preserve more information in the log for human readers.

Open in Gerrit

Related details

Attention is currently required from:
  • Danny Tuppeny
  • Keerti Parthasarathy
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not 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: I75de1fb36a16636e0f50099cced1d5386318d589
Gerrit-Change-Number: 491640
Gerrit-PatchSet: 1
Gerrit-Owner: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Keerti Parthasarathy <kee...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Attention: Keerti Parthasarathy <kee...@google.com>
Gerrit-Comment-Date: Mon, 30 Mar 2026 14:55:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Danny Tuppeny <da...@tuppeny.com>
unsatisfied_requirement
open
diffy

Danny Tuppeny (Gerrit)

unread,
10:58 AM (10 hours ago) 10:58 AM
to Keerti Parthasarathy, Brian Wilkerson, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Brian Wilkerson and Keerti Parthasarathy

Danny Tuppeny added 1 comment

File pkg/analysis_server/lib/src/session_logger/log_normalizer.dart
Line 101, Patchset 1 (Latest): // Sort keys longest-to-shortest so that we always replace the
// largest part of the path if there are nested workspace folders.
..sort((a, b) => b.length.compareTo(a.length)))
Danny Tuppeny . unresolved

I did this assuming what's written in the commit message is correct (and we're trying to remove all workspace folder paths). However if this isn't the case (and we're really just trying to replace things like usernames that are above the root-most path), then another option would be to not add paths to the replacements if there is already a _parent_ path in the collection.

Brian Wilkerson

IIRC, the goal has more to do with being able to play back a session on a different machine where the paths to the roots might be different.

If that's true, then either solution would solve the problem, but replacing only the root-most path might preserve more information in the log for human readers.

Danny Tuppeny

If that's true, then either solution would solve the problem, but replacing only the root-most path might preserve more information in the log for human readers.

It would also be slightly faster because the regex would have fewer paths in it.

Shall I change this, or wait for Keerti's input? (it's not clear to me how certain you are/aren't 😄)

Open in Gerrit

Related details

Attention is currently required from:
  • Brian Wilkerson
  • Keerti Parthasarathy
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not 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: I75de1fb36a16636e0f50099cced1d5386318d589
Gerrit-Change-Number: 491640
Gerrit-PatchSet: 1
Gerrit-Owner: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Keerti Parthasarathy <kee...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-Attention: Keerti Parthasarathy <kee...@google.com>
Gerrit-Comment-Date: Mon, 30 Mar 2026 14:58:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Brian Wilkerson <brianwi...@google.com>
Comment-In-Reply-To: Danny Tuppeny <da...@tuppeny.com>
unsatisfied_requirement
open
diffy

Brian Wilkerson (Gerrit)

unread,
11:10 AM (9 hours ago) 11:10 AM
to Danny Tuppeny, Keerti Parthasarathy, Brian Wilkerson, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Danny Tuppeny and Keerti Parthasarathy

Brian Wilkerson added 1 comment

File pkg/analysis_server/lib/src/session_logger/log_normalizer.dart
Line 101, Patchset 1 (Latest): // Sort keys longest-to-shortest so that we always replace the
// largest part of the path if there are nested workspace folders.
..sort((a, b) => b.length.compareTo(a.length)))
Danny Tuppeny . unresolved

I did this assuming what's written in the commit message is correct (and we're trying to remove all workspace folder paths). However if this isn't the case (and we're really just trying to replace things like usernames that are above the root-most path), then another option would be to not add paths to the replacements if there is already a _parent_ path in the collection.

Brian Wilkerson

IIRC, the goal has more to do with being able to play back a session on a different machine where the paths to the roots might be different.

If that's true, then either solution would solve the problem, but replacing only the root-most path might preserve more information in the log for human readers.

Danny Tuppeny

If that's true, then either solution would solve the problem, but replacing only the root-most path might preserve more information in the log for human readers.

It would also be slightly faster because the regex would have fewer paths in it.

Shall I change this, or wait for Keerti's input? (it's not clear to me how certain you are/aren't 😄)

Brian Wilkerson

Probably best to get confirmation.

Open in Gerrit

Related details

Attention is currently required from:
  • Danny Tuppeny
  • Keerti Parthasarathy
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not 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: I75de1fb36a16636e0f50099cced1d5386318d589
Gerrit-Change-Number: 491640
Gerrit-PatchSet: 1
Gerrit-Owner: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Keerti Parthasarathy <kee...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Attention: Keerti Parthasarathy <kee...@google.com>
Gerrit-Comment-Date: Mon, 30 Mar 2026 15:10:39 +0000
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages