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

Fix an aux_dir bug and support newer versions of latexmk #1079

Merged
merged 3 commits into from
Apr 21, 2024

Conversation

luavreis
Copy link
Contributor

First, 80d4334 is an independent fix for the fact latexmk outputs the log file to the $aux_dir, instead of the $out_dir. This would cause texlab to not report build errors in some projects, so it's probably related to #836 (this is how I came to it).

Next, since1 latexmk v4.84 the current parsing mechanism of texlab for extracting the aux and out dirs stopped working, because the dirs are printed in a new line. I took the opportunity to use the new -dir-report-only option of latexmk and remove the code that was marked as a 'hack'. As v4.85 also uses a new out2dir option for a final output directory, I also included code to support it in the last commit 7bd2b11, but the man page describes it as "experimental" so I'm not sure if it's desired.

Footnotes

  1. https://www.cantab.net/users/johncollins/latexmk/versions.html

This is supported since latexmk v4.82, dated 24 December 2023, but
output got changed in v4.84 to print the dirs in a new line, breaking
the current parser.
'latexmk' writes the .log file to the user-specified '$aux_dir' path,
instead of the PDF output path.

From the MAN page:

 -auxdir=FOO or -aux-directory=FOO

    Sets the directory for auxiliary output files of *latex (.aux, .log
    etc). These are all the generated files, with the exception of final
    output files (.dvi, .ps, .pdf, .synctex.gz, .synctex). See the
    -outdir/-output-directory option for directories for the main output
    files, and the -out2dir option for the final output files.
Supported since latexmk v4.85. From the man page:

 -out2dir=FOO

   (Experimental new feature.)
   Sets the directory for the final output files of a whole round of compilations.
@luavreis
Copy link
Contributor Author

luavreis commented Apr 18, 2024

Note: this change silently breaks support for older latexmk versions. Perhaps it's desirable to tell the user this is the case somehow?

@pfoerster
Copy link
Member

Thanks for the PR! LGTM.

Note: this change silently breaks support for older latexmk versions. Perhaps it's desirable to tell the user this is the case somehow?

Yes, definitely. We should bump the major version for the next release as this is a breaking change.

@pfoerster pfoerster merged commit 186d657 into latex-lsp:master Apr 21, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants