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

TypeScript notebook cells can't find relative paths or tsconfig.json #213740

Closed
jaked opened this issue May 28, 2024 · 1 comment
Closed

TypeScript notebook cells can't find relative paths or tsconfig.json #213740

jaked opened this issue May 28, 2024 · 1 comment
Assignees

Comments

@jaked
Copy link

jaked commented May 28, 2024

Type: Bug

VS Code gives notebook cells "dynamic" paths (starting with e.g. ^/vscode-notebook-cell/ts-nul-authority) when communicating with tsserver, but TypeScript doesn't resolve relative imports from dynamic paths, and infers a config instead of using the appropriate tsconfig.json for the path. So notebook cells show errors on relative imports, can't use types from relative imports, and can have other errors because of config issues.

See also #196172

Here's a hacked-up TypeScript that handles these paths githubnext/TypeScript@v5.4.5...jaked/vscode-notebook-fixes but maybe TypeScript needs explicit support for URIs so VS Code can use them directly instead of overloading the dynamic path syntax?

I see that the insiders build has disabled semantic errors (#212366) but it would be better of course to fix the problem 🙂.

VS Code version: Code - Insiders 1.90.0-insider (05634b5, 2024-05-28T20:53:24.014Z)
OS version: Darwin arm64 23.5.0
Modes:

System Info
Item Value
CPUs Apple M1 (8 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 2, 2, 3
Memory (System) 16.00GB (0.03GB free)
Process Argv --crash-reporter-id 92d3e6f8-3cea-4f75-9571-32a038bc7871
Screen Reader no
VM 0%
Extensions (66)
Extension Author (truncated) Version
astro-vscode ast 2.10.2
vscode-browser-preview auc 0.7.2
logwatcher aut 1.0.0
docs-view bie 0.1.0
github-markdown-preview bie 0.3.0
markdown-checkbox bie 0.4.0
markdown-emoji bie 0.3.0
markdown-footnotes bie 0.1.1
markdown-mermaid bie 1.23.0
markdown-preview-github-styles bie 2.0.4
markdown-yaml-preamble bie 0.1.0
vscode-tailwindcss bra 0.10.5
solargraph cas 0.24.1
codeswing cod 0.0.24
postcss css 1.0.9
vscode-eslint dba 2.4.4
dendron-paste-image den 1.1.1
typescript-notebook don 2.0.6
gitlens eam 15.0.4
prettier-vscode esb 10.4.0
codespaces Git 1.16.22
copilot Git 1.196.0
copilot-chat Git 0.16.2024052801
copilot-nes Git 0.0.1
remotehub Git 0.62.0
vscode-github-actions git 0.26.2
vscode-pull-request-github Git 0.88.1
todo-tree Gru 0.0.226
terraform has 2.30.1
workspace-in-status-bar koa 1.1.2
lean4 lea 0.0.155
tsup-problem-matchers lux 1.0.0
vscode-json5 mrm 1.0.0
vscode-azureappservice ms- 0.25.2
vscode-azurefunctions ms- 1.15.0
vscode-azureresourcegroups ms- 0.9.0
vscode-azurestaticwebapps ms- 0.12.2
vscode-cosmosdb ms- 0.22.0
csharp ms- 2.30.28
vscode-dotnet-runtime ms- 2.0.5
debugpy ms- 2024.6.0
isort ms- 2023.10.1
python ms- 2024.6.0
vscode-pylance ms- 2024.5.1
jupyter ms- 2024.4.0
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.17
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
remote-containers ms- 0.367.0
azure-account ms- 0.12.0
azure-repos ms- 0.38.0
extension-test-runner ms- 0.0.9
remote-repositories ms- 0.40.0
vsliveshare ms- 1.0.5918
sqltools mtx 0.28.3
vscode-twoslash-queries Ort 1.2.2
vscode-xml red 0.27.0
sorbet-vscode-extension sor 0.3.33
rewrap stk 1.16.3
svelte-vscode sve 108.4.1
vscode-open-in-github sys 1.18.0
vscode-mdx uni 1.8.7
explorer vit 0.10.7
pretty-ts-errors Yoa 0.5.4
markdown-all-in-one yzh 3.6.2
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
vsaa593:30376534
py29gd2263:31024238
vscaac:30438845
c4g48928:30535728
962ge761:30841072
pythongtdpath:30726887
welcomedialog:30812478
pythonidxpt:30768918
pythonnoceb:30776497
asynctok:30898717
dsvsc013:30777762
dsvsc014:30777825
dsvsc015:30821418
pythontestfixt:30866404
pythonregdiag2:30926734
pythonmypyd1:30859725
pythoncet0:30859736
2e7ec940:31000449
pythontbext0:30879054
accentitlementst:30870582
dsvsc016:30879898
dsvsc017:30880771
dsvsc018:30880772
cppperfnew:30980852
pythonait:30973460
showvideot:31016890
chatpanelt:31014475
g316j359:31013175
a69g1124:31018687
dvdeprecation:31040973
pythonprt:31036556
dwnewjupyter:31046869
impr_priority:31057980
26j00206:31048877

@mjbvz
Copy link
Collaborator

mjbvz commented Jul 31, 2024

Let's track this in #129482

@mjbvz mjbvz closed this as completed Jul 31, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants