latex-lsp / texlab

An implementation of the Language Server Protocol for LaTeX
GNU General Public License v3.0
1.55k stars 53 forks source link

Logs not parsed for warnings? #426

Closed coxackie closed 3 years ago

coxackie commented 3 years ago

I opened https://github.com/latex-lsp/texlab-vscode/issues/426, but on second thoughts I am not sure whether it is an issue with the extension or the server. Maybe someone can take a look at other implementations (like neovim lsp). In short: Using 3.0.0 versions with settings

    "texlab.build.args": [
        "-lualatex",
        "-interaction=nonstopmode",
        "-synctex=1",
        "%f"
    ],
    "texlab.forwardSearch.executable": "zathura",
    "texlab.forwardSearch.args": [
        "--synctex-forward",
        "%l:1:%f",
        "%p"
    ],
    "texlab.chktex.onOpenAndSave": false,

Note that I am using lualatex. Here is a minimal tex file:

\documentclass{article}

\begin{document}

\begin{equation}\label{eq:one}
  a=b
\end{equation}
Equation (\ref{eq:ones}) gives that $a=b$.

\end{document}

Notice the mistake in using eq:ones instead of eq:one. When I build, everything seems OK, and there are no warnings. If I go to the log file, there is a clear

LaTeX Warning: Reference `eq:ones' on page 1 undefined on input line 9.

[1

{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./Test.aux)

LaTeX Warning: There were undefined references.

)

It appears that the parser is missing this from the log file.

quid256 commented 3 years ago

I'm seeing the same issue while using neovim, so it seems that it's not extension-specific?

Also, I tried to hook into the publishDiagnostics messages coming from texlab and it appears that they continue sending warning diagnostics to my editor even after those warnings are no longer valid, as well as having the behavior that you mention (i.e. not sending warnings when a new warning is introduced)

I also tried using both tectonic and pdflatex, and it doesn't seem that either one works.

wrvsrx commented 3 years ago

It seems that this happens after updating texlab to 3.0.0.

quid256 commented 3 years ago

I tried compiling from source, and it seems that the changes in a7ea0d5f37548d resolved the issue for me.

Would be great if there could maybe be a bugfix release of some kind so that the stable version of texlab wouldn't have this issue?

pfoerster commented 3 years ago

texlab 3.0.1 has been released now. Can you try it out to see if the problem was fixed?

wrvsrx commented 3 years ago

texlab 3.0.1 has been released now. Can you try it out to see if the problem was fixed?

Yes, Thank you!