From c2d912e6c905fd59600a2b9730edda78b73e4e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20F=C3=B6rster?= Date: Sat, 5 Aug 2023 21:50:28 +0200 Subject: [PATCH] Fix searching aux files of \included TeX files See #906. --- CHANGELOG.md | 7 ++++++- crates/base-db/src/graph.rs | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a97c7cb4..261b5cf9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- Fix search path for aux files when using `\include` instead of `\input` ([#906](https://github.com/latex-lsp/texlab/issues/906)) + ## [5.8.0] - 2023-07-30 ### Added @@ -23,7 +29,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix parsing paths with `|` ([#568](https://github.com/latex-lsp/texlab/issues/568)) - Fix parsing LaTeX identifiers with `=` ([#568](https://github.com/latex-lsp/texlab/issues/568)) -- Fix search path for aux files when using `\include` instead of `\input` ([[#906](https://github.com/latex-lsp/texlab/issues/906)) ## [5.7.0] - 2023-06-07 diff --git a/crates/base-db/src/graph.rs b/crates/base-db/src/graph.rs index 3e718afd..2dd732a4 100644 --- a/crates/base-db/src/graph.rs +++ b/crates/base-db/src/graph.rs @@ -137,8 +137,13 @@ impl<'a> Graph<'a> { let aux_dir = self.workspace.output_dir(base_dir, config.aux_dir.clone()); let log_dir = self.workspace.output_dir(base_dir, config.log_dir.clone()); + let relative_path = base_dir.make_relative(&source.uri).unwrap(); + + self.add_artifact(source, &aux_dir.join(&relative_path).unwrap(), "aux"); self.add_artifact(source, &aux_dir, "aux"); self.add_artifact(source, base_dir, "aux"); + + self.add_artifact(source, &log_dir.join(&relative_path).unwrap(), "log"); self.add_artifact(source, &log_dir, "log"); self.add_artifact(source, base_dir, "log"); }