[M] Change in dart/sdk[main]: DAS session logger: Normalize paths as log entries are written.

0 views
Skip to first unread message

Samuel Rawlins (Gerrit)

unread,
Mar 4, 2026, 4:24:37 PM (5 days ago) Mar 4
to Brian Wilkerson, Commit Queue, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Brian Wilkerson

Samuel Rawlins added 1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Samuel Rawlins . unresolved

Hi Brian, I manually tested this a few times; seems to work just fine. I'm not sure how to rigorously test it though... I guess I can do more manual testing, with moving the Dart SDK path and the project paths, etc. But I don't see any unit testing. Should I just create some fresh unit tests, or are there session logger tests I missed?

Thanks much!

Open in Gerrit

Related details

Attention is currently required from:
  • Brian Wilkerson
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: Ic57fec490414cef7028c290614363623e88f5c15
Gerrit-Change-Number: 485260
Gerrit-PatchSet: 4
Gerrit-Owner: Samuel Rawlins <sraw...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-Comment-Date: Wed, 04 Mar 2026 21:24:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Brian Wilkerson (Gerrit)

unread,
Mar 4, 2026, 4:44:25 PM (5 days ago) Mar 4
to Samuel Rawlins, Brian Wilkerson, Commit Queue, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Samuel Rawlins

Brian Wilkerson voted and added 3 comments

Votes added by Brian Wilkerson

Code-Review+1

3 comments

Patchset-level comments
Samuel Rawlins . unresolved

Hi Brian, I manually tested this a few times; seems to work just fine. I'm not sure how to rigorously test it though... I guess I can do more manual testing, with moving the Dart SDK path and the project paths, etc. But I don't see any unit testing. Should I just create some fresh unit tests, or are there session logger tests I missed?

Thanks much!

Brian Wilkerson

As far as I know we don't have any tests. The code started under `tools` and we don't normally write tests for tools. It wasn't until we decided to connect it to the insight pages that it moved under `src`.

By the way, I'm hoping to eventually replace the instrumentation log with a session log. I don't know whether having the log normalized by default is good for that or better. Just something to think about.

File pkg/analysis_server/lib/src/context_manager.dart
Line 668, Patchset 4 (Latest): _sessionLogger.addPackageRoots(
Brian Wilkerson . resolved

I hadn't really thought about this before, but this is interesting. I think this means that the logger can keep up with changes to the `package_config.json` files. We were almost certainly previously depending on the package resolution to be constant across the session, which was always limiting.

File pkg/analysis_server/lib/src/server/driver.dart
Line 348, Patchset 4 (Latest): _sessionLogger = SessionLogger(filePath: sessionLogFilePath);
Brian Wilkerson . unresolved

Does this break the ability for the user to delay recording a session until later (after they click the button on the insight pages)?

Open in Gerrit

Related details

Attention is currently required from:
  • Samuel Rawlins
Submit Requirements:
    • requirement is not 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: Ic57fec490414cef7028c290614363623e88f5c15
    Gerrit-Change-Number: 485260
    Gerrit-PatchSet: 4
    Gerrit-Owner: Samuel Rawlins <sraw...@google.com>
    Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
    Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
    Gerrit-Comment-Date: Wed, 04 Mar 2026 21:44:22 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Samuel Rawlins <sraw...@google.com>
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Samuel Rawlins (Gerrit)

    unread,
    Mar 9, 2026, 1:14:14 AM (yesterday) Mar 9
    to Brian Wilkerson, Commit Queue, dart-analys...@google.com, rev...@dartlang.org

    Samuel Rawlins added 2 comments

    File pkg/analysis_server/lib/src/context_manager.dart
    Line 668, Patchset 4 (Latest): _sessionLogger.addPackageRoots(
    Brian Wilkerson . resolved

    I hadn't really thought about this before, but this is interesting. I think this means that the logger can keep up with changes to the `package_config.json` files. We were almost certainly previously depending on the package resolution to be constant across the session, which was always limiting.

    Samuel Rawlins

    Ah good thinking. I guess there will be cases where the package config changes, like a performance issue caused by `git checkout` where the package config changes, etc.

    File pkg/analysis_server/lib/src/server/driver.dart
    Line 348, Patchset 4 (Latest): _sessionLogger = SessionLogger(filePath: sessionLogFilePath);
    Brian Wilkerson . resolved

    Does this break the ability for the user to delay recording a session until later (after they click the button on the insight pages)?

    Samuel Rawlins

    No, I tested this manually with the insights page button, and it still works.

    The logic is the same as before: `sessionLogFilePath` is either null, or not null, and the new SessionLogger constructor passes the value to the SessionLoggerInMemorySink constructor, which instantiates its `_nextLogger` depending on whether the value is null or not, effectively the same as before.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement is not 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: Ic57fec490414cef7028c290614363623e88f5c15
    Gerrit-Change-Number: 485260
    Gerrit-PatchSet: 4
    Gerrit-Owner: Samuel Rawlins <sraw...@google.com>
    Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
    Gerrit-Comment-Date: Mon, 09 Mar 2026 05:14:11 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Brian Wilkerson <brianwi...@google.com>
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Konstantin Shcheglov (Gerrit)

    unread,
    Mar 9, 2026, 2:00:36 PM (13 hours ago) Mar 9
    to Samuel Rawlins, Brian Wilkerson, Commit Queue, dart-analys...@google.com, rev...@dartlang.org
    Attention needed from Samuel Rawlins

    Konstantin Shcheglov voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Samuel Rawlins
    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: Ic57fec490414cef7028c290614363623e88f5c15
    Gerrit-Change-Number: 485260
    Gerrit-PatchSet: 4
    Gerrit-Owner: Samuel Rawlins <sraw...@google.com>
    Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
    Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
    Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
    Gerrit-Comment-Date: Mon, 09 Mar 2026 18:00:34 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Samuel Rawlins (Gerrit)

    unread,
    Mar 9, 2026, 6:49:31 PM (8 hours ago) Mar 9
    to Konstantin Shcheglov, Brian Wilkerson, Commit Queue, dart-analys...@google.com, rev...@dartlang.org

    Samuel Rawlins added 1 comment

    Patchset-level comments
    Samuel Rawlins . resolved

    Hi Brian, I manually tested this a few times; seems to work just fine. I'm not sure how to rigorously test it though... I guess I can do more manual testing, with moving the Dart SDK path and the project paths, etc. But I don't see any unit testing. Should I just create some fresh unit tests, or are there session logger tests I missed?

    Thanks much!

    Brian Wilkerson

    As far as I know we don't have any tests. The code started under `tools` and we don't normally write tests for tools. It wasn't until we decided to connect it to the insight pages that it moved under `src`.

    By the way, I'm hoping to eventually replace the instrumentation log with a session log. I don't know whether having the log normalized by default is good for that or better. Just something to think about.

    Samuel Rawlins

    Acknowledged

    Open in Gerrit

    Related details

    Attention set is empty
    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: Ic57fec490414cef7028c290614363623e88f5c15
    Gerrit-Change-Number: 485260
    Gerrit-PatchSet: 4
    Gerrit-Owner: Samuel Rawlins <sraw...@google.com>
    Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
    Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
    Gerrit-Comment-Date: Mon, 09 Mar 2026 22:49:29 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Brian Wilkerson <brianwi...@google.com>
    Comment-In-Reply-To: Samuel Rawlins <sraw...@google.com>
    satisfied_requirement
    open
    diffy

    Samuel Rawlins (Gerrit)

    unread,
    Mar 9, 2026, 6:49:35 PM (8 hours ago) Mar 9
    to Konstantin Shcheglov, Brian Wilkerson, Commit Queue, dart-analys...@google.com, rev...@dartlang.org

    Samuel Rawlins voted Commit-Queue+2

    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention set is empty
    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: Ic57fec490414cef7028c290614363623e88f5c15
    Gerrit-Change-Number: 485260
    Gerrit-PatchSet: 4
    Gerrit-Owner: Samuel Rawlins <sraw...@google.com>
    Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
    Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
    Gerrit-Comment-Date: Mon, 09 Mar 2026 22:49:32 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages