microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.5k stars 28.65k forks source link

Welcome: Error reading markdown document at ... common/media/theme_picker #228063

Closed bpasero closed 4 days ago

bpasero commented 1 week ago

Steps to Reproduce:

  1. run insiders on a fresh user data dir
  2. welcome opens with an error:
Error reading markdown document at `file:///private/var/folders/fv/p__j7gw9097crr40g7sf2pxw0000gn/T/vscode-bisect/.builds/dc9412125d4e0a480593962ae2687e74e64af728/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker?%7B%22moduleId%22%3A%22..%2Fcommon%2Fmedia%2Ftheme_picker.js%22%7D`: Error: Unable to read file '/private/var/folders/fv/p__j7gw9097crr40g7sf2pxw0000gn/T/vscode-bisect/.builds/dc9412125d4e0a480593962ae2687e74e64af728/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker' (Error: Unable to resolve nonexistent file '/private/var/folders/fv/p__j7gw9097crr40g7sf2pxw0000gn/T/vscode-bisect/.builds/dc9412125d4e0a480593962ae2687e74e64af728/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker')

@bhavyaus probably related to ESM

bpasero commented 1 week ago

Bisect points to https://github.com/microsoft/vscode/compare/11e9922e50c5a8c628cd7d27e802d388818139c0...6fd50371a51285fe8635a99420dd84ab6a7dd122

I assume its from https://github.com/microsoft/vscode/commit/3c2092601e46a27728d0bd41474af8a6367050d1

bpasero commented 1 week ago

@bhavyaus the problem here is that you await import welcome content from disk, but this content is not present in a real build because its not an entry point known to the build process.

I see 2 options:

bpasero commented 6 days ago

If I could choose, I would restore my solution, any objections?

bhavyaus commented 4 days ago

Since this is for built-in walkthroughs only, your change makes sense instead of setting up entry points just for these modules. Revert PR: https://github.com/microsoft/vscode/pull/228534