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

No error diagnostics when setting build directory to a subdirectory #563

Closed
qsdrqs opened this issue Feb 18, 2022 · 3 comments
Closed

No error diagnostics when setting build directory to a subdirectory #563

qsdrqs opened this issue Feb 18, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@qsdrqs
Copy link

qsdrqs commented Feb 18, 2022

Hi, firstly many thanks for your work!
I'm facing an issue that there will be no error diagnostics output when I set my output to a subdirectory.
It will work fine when I don't use a subdirectory.

My vscode setting is below:

{
    "texlab.auxDirectory": "latex.out",
    "texlab.build.onSave": true,
    "texlab.build.args": [
        "-pdf",
        "-interaction=nonstopmode",
        "-synctex=1",
        "%f",
        "-outdir=./latex.out"
    ],
    "texlab.server.autoDownload": true,
    "window.zoomLevel": 3
}

Here is the way to reproduce it.

First, create a tex file under an empty directory as

\documentclass[UTF8]{article}                                                                                                                                                    
\begin{document} %COMPILE ERROR                                                                                                                                                  
test                                                                                                                                                                             
\end{document}

Then delete a character to make some error. For example, modify begin to bgin like following, and run texlab builtin "build" command. It will show up "build error" like below, but no error diagnostic is reported.

image

Besides, when I restart vscode at this time, I will be able to see the diagnostic error but it won't disappear after I correct it. I need to restart my vscode again then it will disappear.

image

I'm wondering is there any missing in my config? Thank you for your help!

@dbucher97
Copy link

I have the same problem with texlab configured with nvim-lspconfig. Configuration looks similar

texlab = {
  build = {
    args = {
      "-pdf",
      "-interaction=nonstopmode",
      "-synctex=1",
      "-outdir=./build",
      "%f",
    },
    onSave = false,
  },
  auxDirectory = "build",
}

Build files are correctly produced in the build directory. However, errors and warnings do not get updated by texlab. But, when I restart vim I see the diagnostics from the previous build.

When no build directory is set, everything works fine 👍 .

Thanks for your help! 😃

pfoerster added a commit that referenced this issue Feb 18, 2022
@pfoerster
Copy link
Member

Thanks for the detailed report!

I was able to reproduce the issue on my machine. The problem was caused by the file watching mechanism, which did not watch the output directory by default (one workaround would have been opening the aux file and rebuilding). This should be fixed with 1090831.

@pfoerster pfoerster added the bug Something isn't working label Feb 18, 2022
@qsdrqs
Copy link
Author

qsdrqs commented Feb 18, 2022

Great! I tested it and it really fix that problem. Many thanks for your fast work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants