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

Failures on CL: Enforce current library restrictions. #51447

Closed
lrhn opened this issue Feb 17, 2023 · 4 comments
Closed

Failures on CL: Enforce current library restrictions. #51447

lrhn opened this issue Feb 17, 2023 · 4 comments
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@lrhn
Copy link
Member

lrhn commented Feb 17, 2023

There are new test failures on Enforce current library restrictions..

The tests

pkg/analysis_server/test/integration/analysis/get_hover_test RuntimeError (expected Pass)

are failing on configurations

analyzer-unittest-asserts-release-linux

I have no idea why. Error message is:

stdout:
00:00 �[32m+0�[0m: AnalysisGetHoverIntegrationTest | test_getHover�[0m

00:01 �[32m+0�[0m�[31m -1�[0m: AnalysisGetHoverIntegrationTest | test_getHover �[1m�[31m[E]�[0m�[0m

  Expected: match '.*'
    Actual: <null>
     Which: not an <Instance of 'String'>
  

  package:test_api/src/expect/expect.dart 134:31                           fail
  package:test_api/src/expect/expect.dart 129:3                            _expect
  package:test_api/src/expect/expect.dart 46:3                             expect
  pkg/analysis_server/test/integration/analysis/get_hover_test.dart 87:9   AnalysisGetHoverIntegrationTest.checkHover.<fn>
  dart:async/zone.dart 1406:47                                             _rootRunUnary
  dart:async/zone.dart 1307:19                                             _CustomZone.runUnary
  ===== asynchronous gap ===========================
  pkg/analysis_server/test/integration/analysis/get_hover_test.dart 155:5  AnalysisGetHoverIntegrationTest.test_getHover
  ===== asynchronous gap ===========================
  package:test_api/src/backend/declarer.dart 215:9                         Declarer.test.<fn>.<fn>
  ===== asynchronous gap ===========================
  package:test_api/src/backend/declarer.dart 213:7                         Declarer.test.<fn>
  ===== asynchronous gap ===========================
@lrhn lrhn added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Feb 17, 2023
@bwilkerson
Copy link
Member

The line that's failing is testing to ensure that the doc comment for the class num is returned to the client (without depending on the actual content of the comment).

My unsubstantiated guess is that the test isn't enabling the sealed experiment and that the parser is recovering by assuming that sealed is a top-level variable, thus leaving the class declaration without a doc comment.

@scheglov Is there any reason why the integration tests shouldn't enable all of the accepted language experiments?

@bwilkerson bwilkerson added the P1 A high priority bug; for example, a single project is unusable or has many test failures label Feb 21, 2023
@lrhn
Copy link
Member Author

lrhn commented Feb 21, 2023

The CL also enables the experiments for the platform libraries, so whatever the integration test does, it should probably honor the same enablings.

@scheglov scheglov self-assigned this Feb 21, 2023
@scheglov
Copy link
Contributor

I believe the issue is with the parser, we get wrong begin token to scrape documentation comments from.

@scheglov
Copy link
Contributor

copybara-service bot pushed a commit that referenced this issue Feb 22, 2023
…from it.

Change-Id: I9505353c9c6c00082e588aced34e8151c7ab22b7
Bug: #51447
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284441
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
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. P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

3 participants