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

Consider switching back from toml_edit to basic-toml #37

Open
djc opened this issue Jun 30, 2023 · 6 comments · May be fixed by #56
Open

Consider switching back from toml_edit to basic-toml #37

djc opened this issue Jun 30, 2023 · 6 comments · May be fixed by #56

Comments

@djc
Copy link

djc commented Jun 30, 2023

toml_edit has relatively heavy dependencies, and, in particular, is more aggressive about MSRV bumps.

@bkchr
Copy link
Owner

bkchr commented Jun 30, 2023

@djc would you be open to provide a pr?

@djc
Copy link
Author

djc commented Jun 30, 2023

I can certainly take a look at it if you're open to the idea!

@djc
Copy link
Author

djc commented Jul 3, 2023

Ahh, I forgot that this was not so straightforward. How would you feel about including a minimal, no-dependency parser for the subset of TOML that the crate needs?

@bkchr
Copy link
Owner

bkchr commented Jul 6, 2023

Sounds also possible. I mean you are right that we don't need that much functionality.

zeenix added a commit to zeenix/proc-macro-crate that referenced this issue Nov 12, 2024
This disables a lot of the serializer code that this crate does not
need. While this does not completely address bkchr#37, it does reduce the
cold compile-time slightly (on my high-end machine): 0.6 seconds.
@sdbondi
Copy link

sdbondi commented Nov 14, 2024

Somewhat related: You currently cannot use indexmap with the borsh feature and borsh with the derive feature due to toml_edit in this crate

[dependencies]
borsh = {version="*", features = ["derive"]}
indexmap = { version = "2.6.0", features =["borsh"]}
error: cyclic package dependency: package `borsh v1.5.3` depends on itself. Cycle:
package `borsh v1.5.3`
    ... which satisfies dependency `borsh = "^1.2"` of package `indexmap v2.6.0`
    ... which satisfies dependency `indexmap = "^2.3.0"` of package `toml_edit v0.22.22`
    ... which satisfies dependency `toml_edit = "^0.22.20"` of package `proc-macro-crate v3.2.0`
    ... which satisfies dependency `proc-macro-crate = "^3"` of package `borsh-derive v1.5.3`
    ... which satisfies dependency `borsh-derive = "~1.5.3"` of package `borsh v1.5.3`

@zeenix
Copy link
Contributor

zeenix commented Nov 21, 2024

So I got totally nerd-snipped by this and I wrote a TOML parsing library with minimum dependencies. Most importantly, it does not depend on indemap. It depends only on winnow and optionally on serde and std. It also provide specific API for Cargo.toml parsing, that this crate can really use.

I'm currently porting the code and will provide a PR soon. I hope it's welcomed. :)

zeenix added a commit to zeenix/proc-macro-crate that referenced this issue Jan 11, 2025
`tomling` crate was specifically created to provide a minimalistic TOML
parser with fewer dependencies and focus on Cargo.toml parsing.

Fixes bkchr#37.
zeenix added a commit to zeenix/proc-macro-crate that referenced this issue Jan 11, 2025
`tomling` crate was specifically created to provide a simple TOML
parser with fewer dependencies and focus on Cargo.toml parsing.

Fixes bkchr#37.
@zeenix zeenix linked a pull request Jan 11, 2025 that will close this issue
zeenix added a commit to zeenix/proc-macro-crate that referenced this issue Jan 11, 2025
`tomling` crate was specifically created to provide a simple TOML
parser with fewer dependencies and focus on Cargo.toml parsing.

Fixes bkchr#37.
zeenix added a commit to zeenix/proc-macro-crate that referenced this issue Jan 11, 2025
`tomling` crate was specifically created to provide a simple TOML
parser with fewer dependencies and focus on Cargo.toml parsing.

Fixes bkchr#37.
zeenix added a commit to zeenix/proc-macro-crate that referenced this issue Jan 13, 2025
`tomling` crate was specifically created to provide a simple TOML
parser with fewer dependencies and focus on Cargo.toml parsing.

Fixes bkchr#37.
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.

4 participants