Code Monkey home page Code Monkey logo

Comments (6)

wraithan avatar wraithan commented on July 24, 2024

tomllib has not had a release or commit to master in ~3 years. toml-edit was recommended by @gyscos in #9 as it is used in cargo-edit. I want to survey any other libraries that can fit the bill before committing to one, as this is the second time the library I was using has died.

from cargo-bump.

wraithan avatar wraithan commented on July 24, 2024

toml-rs was recommended here: #10 (comment)

from cargo-bump.

wraithan avatar wraithan commented on July 24, 2024

Going to start on this issue by building a test suite that is agnostic to the toml crate. Since the needs from the TOML crate are pretty specific (format preservation) but only has to read/update a single value it should be easy enough to build the different impls once I get the test suite built. Should have had a suite for a while anyway.

from cargo-bump.

wraithan avatar wraithan commented on July 24, 2024

927fb3d Adds a basic test suite and factors the tomllib usage into a single function. Next up build implementations using toml_edit and toml-rs

from cargo-bump.

wraithan avatar wraithan commented on July 24, 2024

Updated top post, toml-rs is not suitable at all, it doesn't preserve comments or formatting.

toml_edit mostly fits the bill, but omits the cases with whitespace in the headers. The ability to parse the cases that tomllib failed on makes up for that problem though.

Moving forward with toml_edit will have to 2.0 since the whitespace preservation is changing which may break some use cases

from cargo-bump.

wraithan avatar wraithan commented on July 24, 2024

4ce6ae3

Fixes this, uses toml_edit as was recommended (and an implementation provided by) @gycos. Didn't use their patch mostly because I had to refactor the code for testing first. Will pull in their other patch for pre-release and meta data before 2.0 release goes out

from cargo-bump.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.