Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions packages/pyright-internal/src/analyzer/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,7 @@ export class Program {
}

// Add the new files. Only the new items will be added.
// Normalize paths to ensure consistency with other code paths.
const normalizedFilePaths = filePaths.map(path => normalizePathCase(this._fs, path));
this.addTrackedFiles(normalizedFilePaths);
this.addTrackedFiles(filePaths);

return this._removeUnneededFiles();
}
Expand Down
5 changes: 4 additions & 1 deletion packages/pyright-scip/src/indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { createFromRealFileSystem } from 'pyright-internal/common/realFileSystem
import { ConfigOptions } from 'pyright-internal/common/configOptions';
import { TreeVisitor } from './treeVisitor';
import { FullAccessHost } from 'pyright-internal/common/fullAccessHost';
import { normalizePathCase } from 'pyright-internal/common/pathUtils';
import * as url from 'url';
import { ScipConfig } from './lib';
import { SourceFile } from 'pyright-internal/analyzer/sourceFile';
Expand Down Expand Up @@ -122,7 +123,9 @@ export class Indexer {
this.importResolver = new ImportResolver(fs, this.pyrightConfig, host);

this.program = new Program(this.importResolver, this.pyrightConfig);
this.program.setTrackedFiles([...this.projectFiles]);
// Normalize paths to ensure consistency with other code paths.
const normalizedProjectFiles = [...this.projectFiles].map((path: string) => normalizePathCase(fs, path));
this.program.setTrackedFiles(normalizedProjectFiles);

if (scipConfig.projectNamespace) {
setProjectNamespace(scipConfig.projectName, this.scipConfig.projectNamespace!);
Expand Down
Loading