Skip to content

Fix text in fixed seq #869

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Mingun
Copy link
Collaborator

@Mingun Mingun commented Jun 14, 2025

This PR fixes two problems:

  • Text events (including CDATA) should be skipped if they is overlapped with elements with fixed name (as reported in text data in tag contents #868)
  • Related: if struct have both $text and $value special keys, text events should be mapped to the $text field

Fixes #868

@Mingun Mingun requested a review from dralley June 14, 2025 23:00
@Mingun Mingun added bug serde Issues related to mapping from Rust types to XML arrays Issues related to mapping XML content onto arrays using serde labels Jun 14, 2025
failures:
    fixed_name::variable_size::text_and_value
    variable_name::variable_size::text_and_value
@Mingun Mingun force-pushed the fix-text-in-fixed-seq branch from 6e6e10e to 86eeeea Compare June 14, 2025 23:08
Mingun added 2 commits June 15, 2025 14:21
failures:
  serde-de-seq:
    fixed_name::variable_size::text_and_value
    variable_name::variable_size::text_and_value
  serde-issues:
    issue868
If sequence expected only tags, skip any texts (CDATA included)
If sequence expected any values, skip texts (CDATA included) if there is a dedicated "$text" field

Fixed:
  serde-de-seq:
    fixed_name::variable_size::text_and_value
    variable_name::variable_size::text_and_value
  serde-issues:
    issue868
@Mingun Mingun force-pushed the fix-text-in-fixed-seq branch from 86eeeea to aa23b65 Compare June 15, 2025 09:22
@codecov-commenter
Copy link

⚠️ 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 60.32%. Comparing base (254fbd2) to head (aa23b65).
Report is 19 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     #869      +/-   ##
==========================================
- Coverage   60.74%   60.32%   -0.43%     
==========================================
  Files          41       42       +1     
  Lines       16044    16578     +534     
==========================================
+ Hits         9746    10000     +254     
- Misses       6298     6578     +280     
Flag Coverage Δ
unittests 60.32% <100.00%> (-0.43%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrays Issues related to mapping XML content onto arrays using serde bug serde Issues related to mapping from Rust types to XML
Projects
None yet
Development

Successfully merging this pull request may close these issues.

text data in tag contents
2 participants