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

non-root file getting auto-build & resultant invalid log errors cached in extensions memory #825

Open
goyalyashpal opened this issue Nov 1, 2023 · 2 comments

Comments

@goyalyashpal
Copy link

titles/summaries:

non-root file getting auto-build & resultant invalid log errors cached in extensions memory

details

the build command is somehow getting auto-triggered on the title.tex file in my project and the extension is then staying stuck on these errors till the title.log file is deleted and vscodium window reloaded.

LaTeX Error: Environment titlepage undefined.
LaTeX Error: \begin{document} ended by \end{titlepage}.

following is an example of reproduction of the errors - with the difference that here shown is manually triggering the build, whereas in the main project, it is happening by itself.

MWE directory structure:

$ tree --dirsfirst
.
├── tex
│   └── title.tex
└── document.tex

2 directories, 2 files

$ cat document.tex
\documentclass[12pt,a4paper,oneside,titlepage,final]{report}
\begin{document}
\input{./tex/title.tex}
\maketitle%
Hi!
\end{document}

$ cat tex/title.tex 
\begin{titlepage}
    \title{My Title}
    \author{My Authors}
    \date{}
\end{titlepage}

steps to reproduce:

$ cd tex/
$ latexmk -pdf
   === Press ctrl-c on Error ===

open the root directory in vscodium with texlab enabled.

@pfoerster
Copy link
Member

@goyalyashpal Thanks for the report.

the extension is then staying stuck on these errors till the title.log file is deleted and vscodium window reloaded.

This is a bug in the server is now fixed with the latest commit on master.

following is an example of reproduction of the errors

Unfortunately, I am not able to reproduce this issue with a fresh VSCodium install.

Regarding the automatic builds:

  • Do you have texlab.build.onSave enabled?
  • Do you have enabled continuous mode in your latexmkrc?

Also, it is unusual that the server would try to build the title.tex file, it should build the document.tex file instead. What happens if you trigger a build manually while title.tex is open and focused?

@goyalyashpal
Copy link
Author

goyalyashpal commented Nov 1, 2023

now fixed with the latest commit

thanks 😃 latex-lsp/texlab@a67d340
when will it be possible to update to that via extension itself?

Do you have texlab.build.onSave enabled?

following are all the entries in my settings.json related to texlab:

    "texlab.chktex.onOpenAndSave": false,
    "texlab.bibtexFormatter": "none",
    "texlab.latexFormatter": "none",
    // 2023-11-01 Self - not externally guided
    "texlab.build.auxDirectory": "./build/auxx",
    "texlab.build.args": [
        "-pdf",
        "-interaction=nonstopmode",
        "-synctex=1",
        "%f",
        "-output-directory=./build",
        "-aux-directory=./build/auxx",
    ],
    "[latex]": {
        "editor.defaultFormatter": "efoerster.texlab"
    },

Do you have enabled continuous mode in your latexmkrc?

no, i didn't have any latexmkrc file whatsoever.

What happens if you trigger a build manually while title.tex is open and focused?

if in root directory, triggering latexmk via terminal cli in vscodium, with no latexmkrc file in this MWE - no, the title.tex is not build standalone.

as for the full project, there're way too many things happening there in regards to minted package, not possible to trim it to narrow down.

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Nov 15, 2023
## [5.11.0] - 2023-11-05

### Added

- Add `texlab.inlayHints.labelDefinitions` and `texlab.inlayHints.labelReferences` options ([#753](latex-lsp/texlab#753))
- Display inlay hints for label references by default ([#753](latex-lsp/texlab#753))

### Fixed

- Moving the build logs to the recycle bin will now clear the diagnostics ([texlab-vscode/#825](latex-lsp/texlab-vscode#825))
- Fix false positive when reporting syntax errors for BibTeX accents ([#945](latex-lsp/texlab#945))

## [5.10.1] - 2023-10-10

### Fixed

- Fix regression when renaming commands ([#936](latex-lsp/texlab#936))

## [5.10.0] - 2023-09-30

### Added

- Allow passing additional arguments to `ChkTeX` using `texlab.chktex.additionalArgs` ([#927](latex-lsp/texlab#927))

### Fixed

- Fix loading bibliographies from `kpathsea` search path ([#923](latex-lsp/texlab#923))
- Don't report duplicate results when using goto definition on includes ([#924](latex-lsp/texlab#924))
- Fix project detection when there exist files with the same name ([#923](latex-lsp/texlab#923))
- Do not report parse errors with `$` in paths ([#931](latex-lsp/texlab#931))

## [5.9.2] - 2023-08-14

### Fixed

- Don't crash when using comments inside `\include`-like commands ([#919](latex-lsp/texlab#919))
- Folding ranges include only the contents instead of the entire range of the structure.
  For example, the folding range of an environment will start after the `\begin` and stop before the `\end`
  ([#915](latex-lsp/texlab#915))

## [5.9.1] - 2023-08-11

### Fixed

- Improve performance when completing BibTeX entries ([#493](latex-lsp/texlab#493))
- Don't report unused entries for very large bibliographies
- Avoid redundant reparses after saving documents

## [5.9.0] - 2023-08-06

### Added

- Use bibliographies found in `BIBINPUTS` environment variable ([#493](latex-lsp/texlab#493))
- Add `texlab.build.pdfDirectory` setting ([#911](latex-lsp/texlab#911))

### Fixed

- Fix search path for aux files when using `\include` instead of `\input` ([#906](latex-lsp/texlab#906))

## [5.8.0] - 2023-07-30

### Added

- Report diagnostics for unused and undefined labels
- Report diagnostics for unused BibTeX entries and undefined citations
- Report diagnostics for duplicate BibTeX entries
- Report diagnostics for duplicate labels
- Add `texlab.build.auxDirectory` and `texlab.build.logDirectory` settings ([#906](latex-lsp/texlab#906))

### Deprecated

- Deprecate `texlab.auxDirectory` in favor of `texlab.build.auxDirectory`

### Fixed

- Fix parsing paths with `|` ([#568](latex-lsp/texlab#568))
- Fix parsing LaTeX identifiers with `=` ([#568](latex-lsp/texlab#568))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants