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

Draftmode in build recipes lead to no errors in "Problems" #2893

Closed
SirHamburger opened this issue Oct 6, 2021 · 7 comments
Closed

Draftmode in build recipes lead to no errors in "Problems" #2893

SirHamburger opened this issue Oct 6, 2021 · 7 comments
Labels
dev Development discussions

Comments

@SirHamburger
Copy link

SirHamburger commented Oct 6, 2021

Preliminary questions [Required]

Disable all the other extensions except for LaTeX Workshop, restart VS Code, and check that you still see this issue. [Required]

You still see this issue?: Yes

Make sure to visit the wiki FAQ before filling an issue.

You visited the wiki?: Yes

Describe the bug [Required]

Failing while draftmode in a buildprocess doesn't raise errors

To Reproduce

Steps to reproduce the behavior:

  1. Create a new Folder
  2. Create a tex-file
  3. Create the vscode settings with a draft recipe:
{
  "latex-workshop.latex.recipes": [
    {
      "name": "pdflatexdraft (3x)",
      "tools": ["pdflatexdraft", "pdflatexdraft", "pdflatexdraft"]
    }
  ],
  "latex-workshop.latex.tools": [
    {
      "name": "pdflatexdraft",
      "command": "pdflatex",
      "args": [
        "-draftmode",
        "-synctex=1",
        "-interaction=nonstopmode",
        "-file-line-error",
        "%DOC%"
      ]
    },
  ]
}
  1. Add following code to the tex file:
\documentclass{book}
\begin{document}
   \ddots
\end{document}
  1. The build fails but now errors are shown in "Problems"

Expected behavior

A clear and concise description of what you expected to happen.
The error is shown in "Problems"

Logs [Required]

Please paste the whole log messages here, not parts of ones. The log should start with Initializing LaTeX Workshop. It is very important to identify problems.

LaTeX Workshop Output [Required]

To access the log, click the 'TeX' icon on the Activity Bar on the left side, select 'View Log Messages', then select 'View LaTeX Workshop extension log'.

[14:33:21] Initializing LaTeX Workshop.
[14:33:21] Extension root: c:\Users\si5wi6\.vscode\extensions\james-yu.latex-workshop-8.20.2
[14:33:21] $PATH: C:\Program Files\ImageMagick-7.0.11-Q16-HDRI;C:\Python39\Scripts\;C:\Python39\;C:\Python27\;C:\Python27\Scripts;C:\Program Files\AdoptOpenJDK\jdk-14.0.2.12-hotspot\bin;C:\Program Files\AdoptOpenJDK\jdk-11.0.8.10-hotspot\bin;C:\Python38\Scripts\;C:\Python38\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Users\si5wi6\AppData\Roaming\npm;C:\Program Files\dotnet\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\dotnet\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Git\cmd;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\Microsoft VS Code Insiders\bin;C:\Program Files (x86)\PDFtk\bin\;C:\Program Files\Puppet Labs\Puppet\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\texlive\2021\bin\win32;C:\Users\si5wi6\Documents\Git\GitLabRepoPreeVision\latex-methodenhandbuecher\Global\datatooltk\bin;C:\Users\si5wi6\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\si5wi6\.dotnet\tools
[14:33:21] $SHELL: undefined
[14:33:21] vscode.env.appName: Visual Studio Code
[14:33:21] vscode.env.remoteName: undefined
[14:33:21] vscode.env.uiKind: 1
[14:33:21] latex-workshop.bind.enter.key: true
[14:33:21] latex-workshop.docker.enabled: false
[14:33:21] latex-workshop.docker.image.latex: ""
[14:33:21] latex-workshop.intellisense.package.enabled: true
[14:33:21] latex-workshop.intellisense.update.aggressive.enabled: true
[14:33:21] latex-workshop.intellisense.update.delay: 1000
[14:33:21] latex-workshop.latex.autoBuild.run: "onFileChange"
[14:33:21] latex-workshop.latex.outDir: "%DIR%"
[14:33:21] latex-workshop.latex.recipes: [
 {
  "name": "latexmk 🔃",
  "tools": [
   "latexmk"
  ]
 },
 {
  "name": "latexmk (latexmkrc)",
  "tools": [
   "latexmk_rconly"
  ]
 },
 {
  "name": "latexmk (lualatex)",
  "tools": [
   "lualatexmk"
  ]
 },
 {
  "name": "pdflatex ➞ bibtex ➞ pdflatex × 2",
  "tools": [
   "pdflatex",
   "bibtex",
   "pdflatex",
   "pdflatex"
  ]
 },
 {
  "name": "Compile Rnw files",
  "tools": [
   "rnw2tex",
   "latexmk"
  ]
 },
 {
  "name": "Compile Jnw files",
  "tools": [
   "jnw2tex",
   "latexmk"
  ]
 },
 {
  "name": "tectonic",
  "tools": [
   "tectonic"
  ]
 }
]
[14:33:21] latex-workshop.latex.tools: [
 {
  "name": "latexmk",
  "command": "latexmk",
  "args": [
   "-synctex=1",
   "-interaction=nonstopmode",
   "-file-line-error",
   "-pdf",
   "-outdir=%OUTDIR%",
   "%DOC%"
  ],
  "env": {}
 },
 {
  "name": "lualatexmk",
  "command": "latexmk",
  "args": [
   "-synctex=1",
   "-interaction=nonstopmode",
   "-file-line-error",
   "-lualatex",
   "-outdir=%OUTDIR%",
   "%DOC%"
  ],
  "env": {}
 },
 {
  "name": "latexmk_rconly",
  "command": "latexmk",
  "args": [
   "%DOC%"
  ],
  "env": {}
 },
 {
  "name": "pdflatex",
  "command": "pdflatex",
  "args": [
   "-synctex=1",
   "-interaction=nonstopmode",
   "-file-line-error",
   "%DOC%"
  ],
  "env": {}
 },
 {
  "name": "bibtex",
  "command": "bibtex",
  "args": [
   "%DOCFILE%"
  ],
  "env": {}
 },
 {
  "name": "rnw2tex",
  "command": "Rscript",
  "args": [
   "-e",
   "knitr::opts_knit$set(concordance = TRUE); knitr::knit('%DOCFILE_EXT%')"
  ],
  "env": {}
 },
 {
  "name": "jnw2tex",
  "command": "julia",
  "args": [
   "-e",
   "using Weave; weave(\"%DOC_EXT%\", doctype=\"tex\")"
  ],
  "env": {}
 },
 {
  "name": "jnw2texmintex",
  "command": "julia",
  "args": [
   "-e",
   "using Weave; weave(\"%DOC_EXT%\", doctype=\"texminted\")"
  ],
  "env": {}
 },
 {
  "name": "tectonic",
  "command": "tectonic",
  "args": [
   "--synctex",
   "--keep-logs",
   "%DOC%.tex"
  ],
  "env": {}
 }
]
[14:33:21] latex-workshop.viewer.pdf.internal.keyboardEvent: "auto"
[14:33:21] Creating a new file watcher.
[14:33:21] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{"stabilityThreshold":250}}
[14:33:21] Creating PDF file watcher.
[14:33:21] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{}}
[14:33:21] Creating Bib file watcher.
[14:33:21] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{"stabilityThreshold":250}}
[14:33:21] Set $LATEXWORKSHOP_DOCKER_LATEX: ""
[14:33:21] [Server] Creating LaTeX Workshop http and websocket server.
[14:33:21] LaTeX Workshop initialized.
[14:33:21] Trigger characters for intellisense of LaTeX documents: ["\\",",","{"]
[14:33:21] Bibtex format config: {"tab":"  ","case":"lowercase","left":"{","right":"}","trailingComma":false,"sort":["key"],"alignOnEqual":true,"sortFields":false,"fieldsOrder":[]}
[14:33:21] Current workspace folders: ["file:///c:/Users/si5wi6/Desktop/Test"]
[14:33:21] Current workspaceRootDir: file:///c:/Users/si5wi6/Desktop/Test
[14:33:21] [Server] Server successfully started: {"address":"127.0.0.1","family":"IPv4","port":62702}
[14:33:21] Snippet data loaded.
[14:33:22] Cannot find fls file: c:\Users\si5wi6\Desktop\Test\test.fls
[14:33:32] Configutation changed to { latex-workshop.latex.recipes: [{"name":"pdflatexdraft (3x)","tools":["pdflatexdraft","pdflatexdraft","pdflatexdraft"]}] }
[14:33:32] Configutation changed to { latex-workshop.latex.tools: [{"name":"pdflatexdraft","command":"pdflatex","args":["-draftmode","-synctex=1","-interaction=nonstopmode","-file-line-error","%DOC%"]}] }
[14:33:34] Current workspace folders: ["file:///c:/Users/si5wi6/Desktop/Test"]
[14:33:34] Current workspaceRootDir: file:///c:/Users/si5wi6/Desktop/Test
[14:33:34] Current workspace folders: ["file:///c:/Users/si5wi6/Desktop/Test"]
[14:33:34] Current workspaceRootDir: file:///c:/Users/si5wi6/Desktop/Test
[14:33:34] Cannot find fls file: c:\Users\si5wi6\Desktop\Test\test.fls
[14:33:34] Cannot find fls file: c:\Users\si5wi6\Desktop\Test\test.fls
[14:33:41] Parsing a file and its subfiles: c:\Users\si5wi6\Desktop\Test\test.tex
[14:33:41] Parse fls file.
[14:33:41] Cannot find fls file: c:\Users\si5wi6\Desktop\Test\test.fls
[14:33:41] Added to file watcher: c:\Users\si5wi6\Desktop\Test\test.tex
[14:33:41] Checking for duplicate labels: c:\Users\si5wi6\Desktop\Test\test.tex.
[14:33:41] Checking for duplicate labels: c:\Users\si5wi6\Desktop\Test\test.tex.
[14:33:44] Parsing a file and its subfiles: c:\Users\si5wi6\Desktop\Test\test.tex
[14:33:44] Parse fls file.
[14:33:44] Cannot find fls file: c:\Users\si5wi6\Desktop\Test\test.fls
[14:33:44] Checking for duplicate labels: c:\Users\si5wi6\Desktop\Test\test.tex.
[14:33:52] Parsing a file and its subfiles: c:\Users\si5wi6\Desktop\Test\test.tex
[14:33:52] Parse fls file.
[14:33:52] Cannot find fls file: c:\Users\si5wi6\Desktop\Test\test.fls
[14:33:52] Checking for duplicate labels: c:\Users\si5wi6\Desktop\Test\test.tex.
[14:33:53] onDidSaveTextDocument triggered: file:///c:/Users/si5wi6/Desktop/Test/test.tex
[14:33:53] File watcher - file changed: c:\Users\si5wi6\Desktop\Test\test.tex
[14:33:53] Parsing a file and its subfiles: c:\Users\si5wi6\Desktop\Test\test.tex
[14:33:53] Checking for duplicate labels: c:\Users\si5wi6\Desktop\Test\test.tex.
[14:33:53] Auto build started detecting the change of a file: c:\Users\si5wi6\Desktop\Test\test.tex
[14:33:53] BUILD command invoked.
[14:33:53] The document of the active editor: file:///c%3A/Users/si5wi6/Desktop/Test/test.tex
[14:33:53] The languageId of the document: latex
[14:33:53] Current workspace folders: ["file:///c:/Users/si5wi6/Desktop/Test"]
[14:33:53] Current workspaceRootDir: file:///c:/Users/si5wi6/Desktop/Test
[14:33:53] Found root file from active editor: c:\Users\si5wi6\Desktop\Test\test.tex
[14:33:53] Root file changed: from undefined to c:\Users\si5wi6\Desktop\Test\test.tex
[14:33:53] Start to find all dependencies.
[14:33:53] Root file languageId: latex
[14:33:53] Reset file watcher.
[14:33:53] Parsing a file and its subfiles: c:\Users\si5wi6\Desktop\Test\test.tex
[14:33:53] Parse fls file.
[14:33:53] Cannot find fls file: c:\Users\si5wi6\Desktop\Test\test.fls
[14:33:53] Building root file: c:\Users\si5wi6\Desktop\Test\test.tex
[14:33:53] Added to file watcher: c:\Users\si5wi6\Desktop\Test\test.tex
[14:33:53] Build root file c:\Users\si5wi6\Desktop\Test\test.tex
[14:33:53] outDir: c:/Users/si5wi6/Desktop/Test
[14:33:53] Recipe step 1: pdflatex, -draftmode,-synctex=1,-interaction=nonstopmode,-file-line-error,c:/Users/si5wi6/Desktop/Test/test
[14:33:53] Recipe step env: undefined
[14:33:53] cwd: c:\Users\si5wi6\Desktop\Test
[14:33:53] LaTeX build process spawned. PID: 61320.
[14:33:53] Checking for duplicate labels: c:\Users\si5wi6\Desktop\Test\test.tex.
[14:33:53] Recipe returns with error: 1/null. PID: 61320. message: .
[14:33:53] The environment variable $PATH: undefined
[14:33:53] The environment variable $SHELL: undefined
[14:33:53] Cleaning auxiliary files and retrying build after toolchain error.
[14:33:53] Clean glob matched files: {"globs":["*.aux","*.bbl","*.blg","*.idx","*.ind","*.lof","*.lot","*.out","*.toc","*.acn","*.acr","*.alg","*.glg","*.glo","*.gls","*.fls","*.log","*.fdb_latexmk","*.snm","*.synctex(busy)","*.synctex.gz(busy)","*.nav"],"outdir":"c:\\Users\\si5wi6\\Desktop\\Test"}
[14:33:53] Cleaning file: c:\Users\si5wi6\Desktop\Test\test.aux
[14:33:53] Cleaning file: c:\Users\si5wi6\Desktop\Test\test.log
[14:33:53] Recipe step 1: pdflatex, -draftmode,-synctex=1,-interaction=nonstopmode,-file-line-error,c:/Users/si5wi6/Desktop/Test/test
[14:33:53] Recipe step env: undefined
[14:33:53] cwd: c:\Users\si5wi6\Desktop\Test
[14:33:53] LaTeX build process spawned. PID: 10236.
[14:33:54] Recipe returns with error: 1/null. PID: 10236. message: .
[14:33:54] The environment variable $PATH: undefined
[14:33:54] The environment variable $SHELL: undefined
[14:33:54] Parsing a file and its subfiles: c:\Users\si5wi6\Desktop\Test\test.tex
[14:33:54] Parse fls file.
[14:33:54] Cannot find fls file: c:\Users\si5wi6\Desktop\Test\test.fls
[14:33:54] Checking for duplicate labels: c:\Users\si5wi6\Desktop\Test\test.tex.
[14:33:55] Manager.fileWatcher.getWatched: {"c:\\Users\\si5wi6\\Desktop\\Test":["test.tex"]}
[14:33:55] Manager.filesWatched: ["c:\\Users\\si5wi6\\Desktop\\Test\\test.tex"]
[14:33:55] BibWatcher.bibWatcher.getWatched: {}
[14:33:55] BibWatcher.bibsWatched: []
[14:33:55] PdfWatcher.pdfWatcher.getWatched: {}
[14:33:55] PdfWatcher.pdfsWatched: []
[14:33:58] Current workspace folders: ["file:///c:/Users/si5wi6/Desktop/Test"]
[14:33:58] Current workspaceRootDir: file:///c:/Users/si5wi6/Desktop/Test
[14:33:58] Found root file from active editor: c:\Users\si5wi6\Desktop\Test\test.tex
[14:33:58] Keep using the same root file: c:\Users\si5wi6\Desktop\Test\test.tex
[14:34:00] Manager.fileWatcher.getWatched: {"c:\\Users\\si5wi6\\Desktop\\Test":["test.tex"]}
[14:34:00] Manager.filesWatched: ["c:\\Users\\si5wi6\\Desktop\\Test\\test.tex"]
[14:34:00] BibWatcher.bibWatcher.getWatched: {}
[14:34:00] BibWatcher.bibsWatched: []
[14:34:00] PdfWatcher.pdfWatcher.getWatched: {}
[14:34:00] PdfWatcher.pdfsWatched: []
[14:35:12] LOG command invoked: default

Developer Tools Console [Required]

To access the log, click 'help' -> 'Toggle Developer Tools' -> 'Console'. Paste anything suspicious.

notificationsAlerts.ts:40 Recipe terminated with error.
onDidChangeNotification @ notificationsAlerts.ts:40
service-worker.js:158 Could not resolve unknown resource /c:/Users/si5wi6/.vscode/extensions/james-yu.latex-workshop-8.20.2/resources/snippetview/snippetview.css

Screenshots

If applicable, add screenshots to help explain your problem.
image
image

Desktop [Required]

Please write exact version numbers. Please don't write latest instead of exact numbers.

  • OS: Windows 10
  • VS Code version: 1.60.2
  • Extension version: 8.20.2
  • TeX distribution version: TeX Live 2021.20210902

Additional questions

Are you using VSCodium?

No

Are you using the Snap or Flatpack versions of VS Code?

No

Are you using LaTeX Workshop with VS Code Remote?

No

If the answer is Yes, please write which one you are using. Write the versions of the remote extension.

  • Remote Containers/Remote SSH/Remote WSL
  • Remote Extension Version: [e.g. 0.48.0]

Additional context

Add any other context about the problem here.

@tamuratak tamuratak added the need more info More information needed to identify the issue label Oct 6, 2021
@tamuratak

This comment has been minimized.

@SirHamburger SirHamburger changed the title Question LuaLatex build recipes doesn't trigger "Problems" Draftmode in build recipes lead to no errors in "Problems" Oct 6, 2021
@tamuratak tamuratak added the can't reproduce Issue cannot be reproduced label Oct 6, 2021
@tamuratak

This comment has been minimized.

@tamuratak tamuratak removed need more info More information needed to identify the issue can't reproduce Issue cannot be reproduced labels Oct 6, 2021
@tamuratak
Copy link
Contributor

I can reproduce the issue.

@tamuratak tamuratak reopened this Oct 6, 2021
@tamuratak
Copy link
Contributor

In draft mode, the line, Output written on filename.pdf, doesn't exist in the output of the LaTeX compiler.

const latexPattern = /^Output\swritten\son\s(.*)\s\(.*\)\.$/gm

if (log.match(latexPattern) || log.match(latexFatalPattern)) {

@jlelong
Copy link
Collaborator

jlelong commented Oct 6, 2021

Apparently -draftmode is not equivalent to passing draft to documentclass: see https://tex.stackexchange.com/a/129748

I am not sure we should change the behaviour of the extension.

@SirHamburger
Copy link
Author

I use -draftmode for the first two compiles and build the whole document afterwards with a full build (to speed it up a little). But for me it's ok to ignore that issue but maybe add a comment in the readme or maybe a warning in the log file if it's used.

@tamuratak tamuratak added the dev Development discussions label Oct 6, 2021
Repository owner locked as resolved and limited conversation to collaborators Oct 6, 2021
@tamuratak
Copy link
Contributor

tamuratak commented Oct 6, 2021

I see. We would not have to fix the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dev Development discussions
Projects
None yet
Development

No branches or pull requests

3 participants