fix: upgrade to dprint-core 0.69.1 - #8
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades
dprint-corefrom 0.67.4 to 0.69.0.Source changes
Only one source file needed changes, both at the boundary with
dprint-core's plugin handler trait, due to the removal ofanyhowfromdprint-corein 0.68.0:src/wasm_plugin.rsSyncPluginHandler::check_config_updatesnow returnsResult<Vec<ConfigChange>, dprint_core::plugins::FormatError>instead ofanyhow::Result<..>.format's call toformat_textnow maps the error withFormatError::newbefore?, since?no longer convertsanyhow::Errorinto the core error type.No changes were needed for the 0.69.0
GeneratedValue::is_known_multi_lineaddition — this plugin delegates tosqlformatand does not usedprint-core's IR helpers.anyhow
anyhowis still a dependency, used only for the return type of the publicformat_text(anyhow::Result<Option<String>>). That function is infallible today (it never returnsErr), so the dependency could be dropped entirely, but doing so would change the crate's public API, so it was left out of this upgrade and can be done separately as afix(BREAKING)change like in the json/markdown/typescript plugins.Verification
cargo check --all-targets— cleancargo build --target wasm32-unknown-unknown --features wasm --release— cleancargo test— all pass (3 unit + 2 integration tests covering 9 spec files + 2 doctests); no spec expectations changeddprint fmt --excludes "**/*.rs"— no changes (rustfmt was not run in this environment)