Skip to content

Add mention to env var 'TEST_SERVER_SNAPSHOT` in docs #59609

@FMorschel

Description

@FMorschel

I'm working on https://dart-review.googlesource.com/c/sdk/+/396564 and the bots failed for tests in two files on patchset 2. The relevant file is analysis_server/test/integration/edit/get_fixes_test.dart.

The other test I ran locally and the results were as I was expecting. This one wasn't. Locally this test passed fine (contrary to the bots).

The CL is to fix #32234 which asks for a new "Import library ... with show" option. My changes were to make it so that whenever the current "Import library ..." fix happens, the new fix would appear directly under it.


When I open an empty project and run the analyzer from source, I get 5 fixes for the code in that test:

image

Now, when debugging the actual test, I only see 4 (the problem was that at the red square, it was singleWhere):

image


After some discussion over on Discord about this, @DanTup tested this on his machine and managed to repro the fail just fine. The difference was that he had set TEST_SERVER_SNAPSHOT to false on his machine and I didn't.

I know when the bots run this they build everything and test from the snapshot, but I think it is worth mentioning in the docs for contributors that TEST_SERVER_SNAPSHOT exists. Because building takes a long time and for debugging your own changes should probably be done from source since that is what you are expecting from every other test.

DanTup suggested that this could be mentioned somewhere around https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server/doc/process/overview.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.type-documentationA request to add or improve documentationtype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions