maghoff / bart

A compile time templating language for Rust inspired by Mustache
https://crates.io/crates/bart
MIT License
37 stars 7 forks source link

Use CARGO_MANIFEST_DIR instead of current directory #25

Closed ryo33 closed 1 year ago

ryo33 commented 1 year ago

If you use bart in a cargo workspace, you are in trouble. This is because bart doesn't respect CARGO_MANIFEST_DIR. In a cargo workspace, the current directory varies depending on the command you run, such as cargo build or cargo test.

jsinger67 commented 1 year ago

Hi @maghoff, first I would like to thank you for bart because it was the best fit for my use case of generating source code - very useful👌! As the owner of parol I would like to advocate to merge @ryo33's pull request. Also I would be happy if there will be a new published version of bart published on crates.io containing his enhancement. If you have any question or change requests please let us (me or @ryo33) know about it. We will be eager to adjust it accordingly.

maghoff commented 1 year ago

Hi! Thanks for this pull request, and thanks for your kind words. I'd like to get this issue fixed.

It's difficult for me to accept this PR outright, because it bundles separate changes into the same changeset. I would appreciate if you would split it so each changeset only pertains to one issue. Improving the error messages, for example, is welcome, but unrelated to the commit message.

I'm sorry for being late in my response.

ryo33 commented 1 year ago

I've fixed it.

maghoff commented 1 year ago

There! I have now finally been able to test this, then merge and publish as bart_derive version 0.1.5.

Thanks!