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

Topiary as a git dependency breaks Nix builds with crane #511

Closed
vkleen opened this issue Jun 15, 2023 · 2 comments · Fixed by #517
Closed

Topiary as a git dependency breaks Nix builds with crane #511

vkleen opened this issue Jun 15, 2023 · 2 comments · Fixed by #517

Comments

@vkleen
Copy link
Contributor

vkleen commented Jun 15, 2023

This might be a rather specific failure case, but trying to use Topiary as a git repository dependency breaks Nix builds using crane. The problem is that in topiary/src/configuration.rs there is a include_bytes! macro importing languages.toml from the workspace root.

When crane vendors dependencies, the crates in the workspace end up in the vendor directory separately breaking the workspace structure. In particular, languages.toml is lost in the process. This ends up causing mysterious build failures.

It's debatable whether this really is an issue with Topiary. On the face of it, it feels like an issue with crane, but they might also be forced into doing this by the structure of a cargo vendor directory. I'm also wondering if something like this might lead to problems with publishing the crate to crates.io.

One possible solution would be to move languages.toml into the topiary subdirectory. I've verified that that fixes the immediate problem.

@ErinvanderVeen
Copy link
Collaborator

ErinvanderVeen commented Jun 15, 2023

I have no issue with moving the languages.toml file into the topiary directory, but I would then like to have a symlink in the root.

@torhovland Do you have any opinions on this?

@torhovland
Copy link
Member

I have no strong feelings about this. With your recent PR a user should be able to override languages.toml with a file under ~/.topiary/, and as long as that works, it's all good to me.

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 a pull request may close this issue.

3 participants