-
Notifications
You must be signed in to change notification settings - Fork 25
Move to toml
from toml_edit
#512
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
Conversation
The implementation is just as simple, `toml_edit` preserves extra information that we don't need, and `toml`'s v0.9.0 release provides some nice speedups.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new:
❯ bevy build web -v
debug: using defaults from bevy_cli config:
features = ["dev"]
default-features = false
rustflags = [
"--cfg",
'getrandom_backend="wasm_js"',
]
info: compiling to WebAssembly...
old:
❯ bevy build web -v
debug: using defaults from bevy_cli config:
features = ["dev"]
default-features = false
rustflags = ["--cfg", 'getrandom_backend="wasm_js"']
I think that's absolutely fine, but what annoys me a bit now that I see it (was already like this before):
Hmmm now that's bothering me too! Let me make a little change real quick... |
This was originally a normal dependency bump for our lockfiles, but...
toml
v0.9.0 has released with fun performance improvements! Check out Ed Page's blog post on it, there's some cool insights there.One of the biggest things that stood out to me is that
toml
no longer depends ontoml_edit
. My original reasoning for usingtoml_edit
instead of the usualserde
+toml
combo is becausetoml
v0.8 and earlier usedtoml_edit
under the hood. Since they both used the same infrastructure, and we didn't really needserde
, I figured it would be more efficient to just usetoml_edit
.This is no longer the case!
toml
now does its own parsing and is faster thantoml_edit
. We don't need the extra functionality oftoml_edit
, so this PR drops it completely and switches totoml
+serde
.Most of the migration was simple and 1:1, but there are some spots that need extra testing to ensure they stay the same behaviorally:
impl Display for CliConfig
(it may printCliConfig
slightly differently)configure_default_web_profiles()
(I believeDocumentMut
pretty much translatesTable
, but it needs confirmation!)