James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.7k stars 531 forks source link

No root file found in new version 9.8.0 #3787

Closed fol-ly closed 1 year ago

fol-ly commented 1 year ago

Environment*

The Issue*

Reproduction Steps

  1. create a Multi File projects
  2. update to version 9.8.0

Expected Behavior

Logs

LaTeX Workshop Output*

[13:34:30][Logger] New log placeholder %WS1% registered for d:\folder .
[13:34:30][Config] latex-workshop.latex.outDir: "tmp" .
[13:34:30][Config] latex-workshop.latex.autoClean.run: "onBuilt" .
[13:34:30][Config] latex-workshop.view.pdf.internal.synctex.keybinding: "double-click" .
[13:34:30][Config] latex-workshop.synctex.afterBuild.enabled: true .
[13:34:30][Config] latex-workshop.intellisense.file.base: "both" .
[13:34:30][Manager] Set $LATEXWORKSHOP_DOCKER_LATEX: ""
[13:34:30][Builder] pdflatex is provided by MiKTeX.
[13:34:30][Server] Creating LaTeX Workshop http and websocket server.
[13:34:30][Server] Server successfully started: {"address":"127.0.0.1","family":"IPv4","port":62697} .
[13:34:30][Extension] Initializing LaTeX Workshop.
[13:34:30][Extension] Extension root: c:\Users\name\.vscode\extensions\james-yu.latex-workshop-9.8.0
[13:34:30][Extension] $PATH: C:\Python310\Scripts\;C:\Python310\;C:\Program Files\AdoptOpenJDK\jdk-15.0.2.7-hotspot\bin;C:\Program Files\AdoptOpenJDK\jdk-11.0.10.9-hotspot\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin;C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64;C:\perl\c\bin;C:\perl\perl\site\bin;C:\perl\perl\bin;C:\tools\BCURRAN3;C:\Program Files (x86)\FAHClient;C:\Program Files (x86)\dotnet\C:\Users\name\AppData\Local\Microsoft\WindowsApps;C:\Users\name\AppData\Local\Programs\MiKTeX\miktex\bin\x64\;C:\Program Files\Oracle\VirtualBox;C:\Users\name\AppData\Local\Programs\Microsoft VS Code\bin
[13:34:30][Extension] $SHELL: undefined
[13:34:30][Extension] $LANG: undefined
[13:34:30][Extension] $LC_ALL: undefined
[13:34:30][Extension] process.platform: win32
[13:34:30][Extension] process.arch: x64
[13:34:30][Extension] vscode.env.appName: Visual Studio Code
[13:34:30][Extension] vscode.env.remoteName: undefined
[13:34:30][Extension] vscode.env.uiKind: 1
[13:34:30][Extension] LaTeX Workshop initialized.
[13:34:30][Format][Bib] Bibtex format config: {"tab":"  ","case":"lowercase","left":"{","right":"}","trailingComma":false,"sort":["key"],"alignOnEqual":true,"sortFields":false,"fieldsOrder":[],"firstEntries":["string","xdata"]}
[13:34:30][Extension] Trigger characters for intellisense of LaTeX documents: ["\\",",","{"]
[13:34:30][Manager] Current workspace folders: ["file:///d:/folder"]
[13:34:30][Manager] Current workspaceRootDir: file:///d:/folder
[13:34:30][Server] valdOrigin is http://127.0.0.1:62697
[13:34:30][Viewer][Panel] Restoring at column 1 with state {"pdfFileUri":"file:///d:/folder/temp/main.pdf","scale":"auto","scrollMode":0,"sidebarView":0,"spreadMode":0,"scrollTop":3477.60009765625,"scrollLeft":0,"trim":0,"synctexEnabled":true,"autoReloadEnabled":true}.
[13:34:30][Viewer][Panel] Internal PDF viewer at http://127.0.0.1:62697/viewer.html?file=pdf..ZmlsZSUzQSUyRiUyRiUyRmQlM0ElMkZQaHlzaWtfU3R1ZGl1bSUyRk1hc3RlcmFyYmVpdCUyRkFyYmVpdCUyRnRtcCUyRk1hc3RlcmFyYmVpdC5wZGY .
[13:34:30][Cacher][Watcher] Watched %WS1%\tmp\main.pdf with a new watcher on %WS1%\tmp .
[13:34:30][Cacher][Path] Non-existent .fls for %WS1%\file1.tex .
[13:34:30][Cacher][Path] Non-existent .fls for %WS1%\file2.tex .
[13:34:30][Cacher][Path] Non-existent .fls for %WS1%\file3.tex .
[13:34:30][Structure] Structure cleared on undefined root.
[13:34:31][Viewer] Handle data type: open
[13:34:31][Server] Preview PDF file: file:///d:/folder/tmp/main.pdf
[13:34:31][Viewer] Handle data type: loaded
[13:34:31][Viewer] SyncTex after build invoked.
[13:34:31][Locator] No root file found.

Developer Tools Console

log.ts:398  WARN [twxs.cmake]: Cannot register 'cmake.cmakePath'. This property is already registered.
TMScopeRegistry.ts:45 Overwriting grammar scope name to file mapping for scope text.tex.
Old grammar file: file:///c%3A/Users/name/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/TeX.tmLanguage.json.
New grammar file: file:///c%3A/Users/name/.vscode/extensions/james-yu.latex-workshop-9.8.0/syntax/TeX.tmLanguage.json
register @ TMScopeRegistry.ts:45
TMScopeRegistry.ts:45 Overwriting grammar scope name to file mapping for scope text.tex.latex.
Old grammar file: file:///c%3A/Users/name/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/LaTeX.tmLanguage.json.
New grammar file: file:///c%3A/Users/name/.vscode/extensions/james-yu.latex-workshop-9.8.0/syntax/LaTeX.tmLanguage.json
register @ TMScopeRegistry.ts:45
TMScopeRegistry.ts:45 Overwriting grammar scope name to file mapping for scope text.bibtex.
Old grammar file: file:///c%3A/Users/name/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/Bibtex.tmLanguage.json.
New grammar file: file:///c%3A/Users/name/.vscode/extensions/james-yu.latex-workshop-9.8.0/syntax/Bibtex.tmLanguage.json
register @ TMScopeRegistry.ts:45
TMScopeRegistry.ts:45 Overwriting grammar scope name to file mapping for scope text.tex.markdown_latex_combined.
Old grammar file: file:///c%3A/Users/name/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json.
New grammar file: file:///c%3A/Users/name/.vscode/extensions/james-yu.latex-workshop-9.8.0/syntax/markdown-latex-combined.tmLanguage.json
register @ TMScopeRegistry.ts:45
TMScopeRegistry.ts:45 Overwriting grammar scope name to file mapping for scope source.cpp.embedded.latex.
Old grammar file: file:///c%3A/Users/name/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json.
New grammar file: file:///c%3A/Users/name/.vscode/extensions/james-yu.latex-workshop-9.8.0/syntax/cpp-grammar-bailout.tmLanguage.json
register @ TMScopeRegistry.ts:45
TMScopeRegistry.ts:45 Overwriting grammar scope name to file mapping for scope source.cpp.embedded.macro.
Old grammar file: file:///c%3A/Users/name/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/cpp/syntaxes/cpp.embedded.macro.tmLanguage.json.
New grammar file: file:///c%3A/Users/name/.vscode/extensions/jeff-hykin.better-cpp-syntax-1.17.2/autogenerated/cpp.embedded.macro.tmLanguage.json
register @ TMScopeRegistry.ts:45
TMScopeRegistry.ts:45 Overwriting grammar scope name to file mapping for scope source.cpp.
Old grammar file: file:///c%3A/Users/name/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/cpp/syntaxes/cpp.tmLanguage.json.
New grammar file: file:///c%3A/Users/name/.vscode/extensions/jeff-hykin.better-cpp-syntax-1.17.2/autogenerated/cpp.tmLanguage.json
register @ TMScopeRegistry.ts:45
console.ts:137 [Extension Host]% Object
T @ console.ts:137
log.ts:392  INFO [perf] Render performance baseline is 31ms
DevTools failed to load source map: Could not load content for http://127.0.0.1:62697/out/viewer/latexworkshop.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://127.0.0.1:62697/build/pdf.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://127.0.0.1:62697/out/viewer/components/connection.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://127.0.0.1:62697/out/viewer/components/htmleditor.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://127.0.0.1:62697/out/viewer/components/synctex.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://127.0.0.1:62697/out/viewer/components/externalpromise.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://127.0.0.1:62697/out/viewer/components/pagetrimmer.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://127.0.0.1:62697/out/viewer/components/utils.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://127.0.0.1:62697/out/viewer/components/viewerhistory.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://127.0.0.1:62697/viewer/viewer.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://127.0.0.1:62697/build/pdf.worker.js.map: Fetch through target failed: Target not supported; Fallback: Unknown error

Anything Else?

James-Yu commented 1 year ago

Yes, we changed the way how root is detected, and it can be buggy. Can you please provide a minimal working example for me to debug? Thanks.

fol-ly commented 1 year ago

I think I have a minimal working example.

\begin{document}

\input{file.tex}

\end{document}



- When I delete `[a4paper,headsepline,numbers=noenddot,bibliography=totocnumbered,12pt,twoside,
BCOR=10mm]`
and restart, everything is working. 
fol-ly commented 1 year ago

Just saw that you fixed it, thank you!

James-Yu commented 1 year ago

An emergency fix 9.8.1 is out and ready for updating in few minutes.

jlelong commented 1 year ago

I think we should apply the same fix to https://github.com/James-Yu/LaTeX-Workshop/blob/8f3e8ab8dfbe284a7b2a54dd6f3f9cf9acab0e52/src/components/manager.ts#L396

James-Yu commented 1 year ago

Exactly! Fixed in b49efcb4