Skip to content

generator: make CARGO_MANIFEST_DIR part of ConfigKey#395

Merged
Kijewski merged 2 commits intoaskama-rs:masterfrom
strickczq:master
Apr 11, 2025
Merged

generator: make CARGO_MANIFEST_DIR part of ConfigKey#395
Kijewski merged 2 commits intoaskama-rs:masterfrom
strickczq:master

Conversation

@strickczq
Copy link
Copy Markdown
Contributor

Rust-analyzer appears to share the same CACHE across crates in a workspace, causing template path resolution errors.

This PR fixes the issue by adding root (the crate's manifest directory) as a field to ConfigKey, ensuring each crate uses its own template cache.

@Kijewski
Copy link
Copy Markdown
Member

Thank you very much for reporting the error, and immediately finding the fix!

I added a commit to your PR to move the manifest_root() call into Config::new(). This way no other file needed to be changed.

@strickczq
Copy link
Copy Markdown
Contributor Author

Great!

@Kijewski Kijewski changed the title fix #394 generator: make CARGO_MANIFEST_DIR part of ConfigKey Apr 11, 2025
@Kijewski Kijewski merged commit 7727d40 into askama-rs:master Apr 11, 2025
41 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.

3 participants