Skip to content

Fix build determinism and macro path management#710

Merged
GuillaumeGomez merged 2 commits intoaskama-rs:mainfrom
GuillaumeGomez:fix-relative-paths
Mar 21, 2026
Merged

Fix build determinism and macro path management#710
GuillaumeGomez merged 2 commits intoaskama-rs:mainfrom
GuillaumeGomez:fix-relative-paths

Conversation

@GuillaumeGomez
Copy link
Collaborator

@GuillaumeGomez GuillaumeGomez commented Mar 19, 2026

Fixes #704.
Fixes #706.
Fixes #708.

Without this fix, when running the newly added test we get:

error: couldn't read `testing/tests/./auxiliary/../templates/base-decl.txt`: No such file or directory (os error 2)
 --> testing/tests/paths.rs:6:18
  |
6 |         #[derive(askama::Template)]
  |                  ^^^^^^^^^^^^^^^^
  |
 ::: testing/tests/./auxiliary/paths.rs:1:1
  |
1 | define_template!();
  | ------------------ in this macro invocation
  |
  = note: this error originates in the macro `askama::helpers::core::include_bytes` which comes from the expansion of the macro `define_template` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `askama_testing` (test "paths") due to 1 previous error

Initial fix was written by @cgundy.

cc @cipriancraciun @cgundy

@GuillaumeGomez GuillaumeGomez merged commit 5a0f612 into askama-rs:main Mar 21, 2026
50 checks passed
@GuillaumeGomez GuillaumeGomez deleted the fix-relative-paths branch March 21, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant