You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scripts without import/export appear to be duplicated #104
This is an issue with files that don't have imports or exports and are then treated as a global script file. One trick might be to add a tsconfig flag to ignore output_dont_import.tsx?
I tried adding an exclude option to languages.typescript.typescriptDefaults.setCompilerOptions (in src/components/editor/setupSolid.ts) but it doesn't seem to fix the problem.
It seems that src/components/editor/monacoTabs.tsx's MonacoTabs creates two models: the model at the top of the function and the model for each tab in tabs. I'm seeing the same source code in both the root model and a tab, which is presumably the source of the problem. [...] Could we remove one of the duplicates (presumably the top-level model?)?
Hmm, it seems to be nondeterministic, and possibly failing only with nonshortened Playground link. Try loading that link and shift-reloading once or twice. But definitely still happens sometimes I'm afraid.
I just realized I may never have explained what the code at the top of the file is: that is the compiled output that you see in the output tab. Currently that is what happens when all of the tabs run through rollup (although in the beta, that will just be what happens when the current tab runs through babel)
I'm not quite sure what you're referring to. Top of what file?
FWIW, I just reproduced this bug by loading the Playground link, and then appending some blank lines at the end of the file. (It didn't reproduce upon reloading anymore.)
Top of the monacoTabs file. the reason you are seeing two duplicate models is because one of those models is the full bundled output (which happens to be the same if there is only one tab)
Activity
edemaine commentedon May 10, 2022
Amusingly, I think #100 will fix this, because it adds an
importto all.tsxfiles. Thanks @otonashixav. 😄milomg commentedon May 15, 2022
Hmm, I'm having a hard time reproducing this. Can you confirm that the playground link above still works for you?
edemaine commentedon May 15, 2022
Hmm, it seems to be nondeterministic, and possibly failing only with nonshortened Playground link. Try loading that link and shift-reloading once or twice. But definitely still happens sometimes I'm afraid.
milomg commentedon Jun 18, 2022
I just realized I may never have explained what the code at the top of the file is: that is the compiled output that you see in the output tab. Currently that is what happens when all of the tabs run through rollup (although in the beta, that will just be what happens when the current tab runs through babel)
edemaine commentedon Jun 20, 2022
I'm not quite sure what you're referring to. Top of what file?
FWIW, I just reproduced this bug by loading the Playground link, and then appending some blank lines at the end of the file. (It didn't reproduce upon reloading anymore.)
milomg commentedon Jun 20, 2022
Top of the monacoTabs file. the reason you are seeing two duplicate models is because one of those models is the full bundled output (which happens to be the same if there is only one tab)