Comments (6)
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.
toml-rs was recommended here: #10 (comment)
from cargo-bump.
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.
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.
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.
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)
- Workspace support HOT 4
- Switch to cargo_metadata for automatic manifest file finding
- Add CLI flag for specifying root manifest
- Add ability to specify which package within a workspace is the intended target
- Add and document an `--all` case for workspace support
- Issue a new release once workspace support is done HOT 1
- Script friendly output via a flag HOT 2
- now that the very basics are work, go back and more tests. HOT 1
- update readme with git info HOT 1
- --git-tag does not commit `Cargo.lock` HOT 5
- Prefix option for --git-tag flag HOT 1
- Add the git interactions
- Consider exposing a library version of cargo-bump
- Bumping version removes comments from end of version line
- abandoned? HOT 4
- Update the crate Readme file in the crates.io registry
- Check semver number against API change / infer right number bump HOT 1
- update readme to remove git interactions since it doesn't do that yet HOT 1
- Support pre-release and metadata values
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-bump.