-
Notifications
You must be signed in to change notification settings - Fork 17
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
Library generator removes all comments on Cargo.toml #35
Comments
yea, its definitely related to the toml parsing library I'm using. I'm open to changing it if there's a better one that you know of. |
To remain all possible comments is really a hard work, and finally I'm coding a full support DOM-like thing to support unlimited use case, which already cost me weeks, a bit crazy fight. Just wonder, maybe I got complicated thinking, is there any serialize tool in the world can remain full comment, for example in rust environment, even for other format like yaml or json5? Maybe I can be inspired, thank you! |
I am not an expert in this field but preserving comments in Rust tooling is not uncommon. One example is cargo-edit which uses toml_edit under the hood to achieve that. |
@LongTengDao Thanks a lot, will you also allow for configuring the quotes used when stringifying? That would help reduce diffs |
The quote changes are really deal breaker. |
I have created a #59 PR. It should solve the problem |
Hey @Cammisuli, how is it going?
I just found out that the generator for new libraries is removing all comments on
Cargo.toml
. This is a bit bothersome because I find it very useful when running a monorepo to explain some dependencies and group them, for instance:This has been extremely helpful for new Rust developers who still need to learn the ecosystem.
To reproduce, paste the above dependencies on root
Cargo.toml
with comments and run a generator:yarn nx g @monodon/rust:lib my-lib
I need to dig more, but it's probably related to LongTengDao/j-toml#19 ?
The text was updated successfully, but these errors were encountered: