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

BUGFIX: Editor shows error popup when opening scripts on "." server #1866

Conversation

catloversg
Copy link
Contributor

This regression bug appeared when we updated monaco-editor in #1468.

How to reproduce it: Open any scripts on "." server.

Capture

Relevant code:
https://github.com/microsoft/TypeScript/blob/56a08250f3516b3f5bc120d6c7ab4450a9a69352/src/compiler/path.ts#L632-L649

file:///./a.js is normalized to file:///a.js, but the model URI is still file:///./a.js. With another scheme (e.g., "memory"), normalizePath does not strip the "./" part. For example, with "memory" scheme, URI of "a.js" in "." server is memory:./a.js.

If you are curious about why it does not happen in old version, you can check the change in getOrCreateSourceFileByPath in microsoft/TypeScript@5aa0053.

@catloversg
Copy link
Contributor Author

Superseded by #1893.

@catloversg catloversg closed this Jan 5, 2025
@catloversg catloversg deleted the pull-request/bugfix/editor-shows-error-popup-when-opening-scripts-on-dot-server branch January 8, 2025 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant