-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Add separate flag serverMode for server mode #39735
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. My bikeshedding would be Syntactic
, ApproximateSemantic
, Semantic
for tidier parallelism, but I'm also fine with the current names (unless we call the feature "partial semantic mode", in which case, I think the enum should match).
@@ -3325,7 +3340,7 @@ namespace ts.server { | |||
} | |||
|
|||
private telemetryOnOpenFile(scriptInfo: ScriptInfo): void { | |||
if (this.syntaxOnly || !this.eventHandler || !scriptInfo.isJavaScript() || !addToSeen(this.allJsFilesForOpenFileTelemetry, scriptInfo.path)) { | |||
if (this.serverMode !== LanguageServiceMode.Semantic || !this.eventHandler || !scriptInfo.isJavaScript() || !addToSeen(this.allJsFilesForOpenFileTelemetry, scriptInfo.path)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably an issue for a future PR, but I think the assumption here was that syntax server telemetry would be uninteresting. I'm not sure the same is true for the partial semantic server.
|
this PR adds --serverMode which takes precedence over --syntaxOnly at any time.
Current names: (open to suggestion if we prefer something else)