Skip to content

Conversation

@sheetalkamat
Copy link
Member

@sheetalkamat sheetalkamat commented Jul 24, 2020

this PR adds --serverMode which takes precedence over --syntaxOnly at any time.

Current names: (open to suggestion if we prefer something else)

export enum LanguageServiceMode {
        Semantic,
        ApproximateSemanticOnly,
        SyntaxOnly,
    }

@sheetalkamat sheetalkamat added this to the TypeScript 4.0.1 milestone Jul 24, 2020
Copy link
Member

@amcasey amcasey left a 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).


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)) {
Copy link
Member

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.

@DanielRosenwasser
Copy link
Member

SemanticWithDirectDependencyProjects can also work, but I guess PartialSemantic or ApproximateSemantic gives us some design room.

@DanielRosenwasser DanielRosenwasser merged commit aee78ac into master Aug 3, 2020
@sheetalkamat sheetalkamat deleted the syntaxToNewFlag branch August 3, 2020 17:58
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants