Skip to content

Improve deprecation messages in events/attributes.rs - #1016

Open
xkr47 wants to merge 1 commit into
tafia:masterfrom
xkr47:patch-1
Open

Improve deprecation messages in events/attributes.rs#1016
xkr47 wants to merge 1 commit into
tafia:masterfrom
xkr47:patch-1

Conversation

@xkr47

@xkr47 xkr47 commented Sep 7, 2026

Copy link
Copy Markdown

Save users from having to read the source to retain the deprecated functionality by adding the necessary parameter changes to the deprecation notices.

Comment thread src/events/attributes.rs
/// [`encoding`]: ../../index.html#encoding
#[cfg(any(doc, not(feature = "encoding")))]
#[deprecated = "use `Self::normalized_value()`"]
#[deprecated = "use `Self::normalized_value(XmlVersion::Implicit1_0)`"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking the value you use here might depend on the actual XML version of the document - 1.0 is certainly the most common, and for many known documents the user may not need to check, but they probably should.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least in the case of unescaping events though, I'm working on some changes to EOL normalization that ought to make it unnecessary.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.08%. Comparing base (e00ae5c) to head (d58d7bf).
⚠️ Report is 76 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1016      +/-   ##
==========================================
- Coverage   57.31%   55.08%   -2.23%     
==========================================
  Files          46       51       +5     
  Lines       18197    18817     +620     
==========================================
- Hits        10429    10366      -63     
- Misses       7768     8451     +683     
Flag Coverage Δ
unittests 55.08% <ø> (-2.23%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Mingun

Mingun commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

I agree with @dralley -- the proposed change is the wrong way to migrate. The correct way is to read XML declaration and use the value, defined in it.

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 this pull request may close these issues.

4 participants