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

First Dart Macro change #903

Closed
wants to merge 1 commit into from
Closed

First Dart Macro change #903

wants to merge 1 commit into from

Conversation

jwren
Copy link
Contributor

@jwren jwren commented Jan 26, 2024

Addition of the (currently unused) DartAnalysisServerService.lspMessage_dart_textDocumentContent(..), with the associated consumer and processor patterns for communication with the Dart SDK (Dart Analysis Server)

dart-lang/language#1482
https://dart-review.googlesource.com/c/sdk/+/345420
https://dart-review.googlesource.com/c/sdk/+/347023

@jwren
Copy link
Contributor Author

jwren commented Jan 27, 2024

@alexander-doroshko

@alexander-doroshko alexander-doroshko self-assigned this Jan 29, 2024
@@ -119,6 +119,9 @@ public final class DartAnalysisServerService implements Disposable {
private static final long ANALYSIS_IN_TESTS_TIMEOUT = TimeUnit.SECONDS.toMillis(10);
private static final long TESTS_TIMEOUT_COEFF = 10;

// LSP over Legacy Dart Analysis Protocol
public static final long LSP_MESSAGE_TEXT_DOCUMENT_CONTENT_TIMEOUT = TimeUnit.SECONDS.toMillis(100);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it too much ;)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reduced to 50, 10 would probably be sufficient in most cases, just trying to be careful. Remember, Dart is single-threaded and files could be large.


import org.dartlang.analysis.server.protocol.RequestError;

public interface LSPDartTextDocumentContentConsumer extends Consumer {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are LSPDartTextDocumentContentConsumer and LSPDartTextDocumentContentProcessor names generated?

If they are hand-written, are you ok with DartLspTextDocumentContentConsumer and DartLspTextDocumentContentProcessor? Not a big deal if not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -0,0 +1,16 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if copyrights are still needed in each file. But if so, I guess it should be the same as in neighbor files (Copyright (c) 2024, the Dart project authors...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

…ervice.lspMessage_dart_textDocumentContent(..)

With the associated consumer and processor patterns for communication with the Dart SDK (Dart Analysis Server)
intellij-monorepo-bot pushed a commit that referenced this pull request May 16, 2024
…ysisServerService.lspMessage_dart_textDocumentContent()

close #903

(cherry picked from commit 1c825c586c0197369497d129a0040c2eeb7b9ddc)

GitOrigin-RevId: 46e3d991745ef3a622dd06e01f59a4ecf0072531
intellij-monorepo-bot pushed a commit that referenced this pull request May 17, 2024
…ysisServerService.lspMessage_dart_textDocumentContent()

close #903

(cherry picked from commit 1c825c586c0197369497d129a0040c2eeb7b9ddc)

GitOrigin-RevId: ef50e62cad6e50daf55b483088cf79b8c6b1cf8d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants