Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
FMorschel opened this issue Nov 26, 2024 · 1 comment
Open

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

FMorschel opened this issue Nov 26, 2024 · 1 comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request type-documentation A request to add or improve documentation type-enhancement A request for a change that isn't a bug

Comments

@FMorschel
Copy link
Contributor

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.

@dart-github-bot
Copy link
Collaborator

Summary: Documentation should mention the TEST_SERVER_SNAPSHOT environment variable. Inconsistencies in test results between local runs and bots are due to this variable's effect on analysis server builds.

@dart-github-bot dart-github-bot added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-enhancement A request for a change that isn't a bug labels Nov 26, 2024
@keertip keertip added type-documentation A request to add or improve documentation P3 A lower priority bug or feature request labels Nov 26, 2024
@lrhn lrhn removed the triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request type-documentation A request to add or improve documentation type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants