Skip to content

Fix status parsing failure on 20260901 releases - #2

Open
autophagy wants to merge 1 commit into
sublipri:mainfrom
autophagy:fix-release-parsing
Open

autophagy wants to merge 1 commit into
sublipri:mainfrom
autophagy:fix-release-parsing

Conversation

@autophagy

Copy link
Copy Markdown

Hi! While trying to use this library with the discogs data dump from 20260901, I ran into an issue with parsing the releases:

λ cargo run --release --features serde --example count discogs_20260901_releases.xml
    Finished [`release` profile [optimized]](https://doc.rust-lang.org/cargo/reference/profiles.html#default-profiles) target(s) in 0.02s
     Running `target/release/examples/count discogs_20260901_releases.xml`
Processing discogs_20260901_releases.xml...

thread 'main' (14672857) panicked at src/release.rs:110:48:
called `Result::unwrap()` on an `Err` value: MissingAttr("status")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

It looks like the status field is no longer included in the dump anymore. This change marks the status as Option so as to not break parsing of previous data dump formats. With this change, I'm able to parse the 20260901 releases properly:

λ cargo run --release --features serde --example count discogs_20260901_releases.xml
    Finished [`release` profile [optimized]](https://doc.rust-lang.org/cargo/reference/profiles.html#default-profiles) target(s) in 0.02s
     Running `target/release/examples/count discogs_20260901_releases.xml`
Processing discogs_20260901_releases.xml...
Parsed 19417067 releases in 05m14.276s (61783.395/s)

Parsing for artists, labels and masters seems to work fine otherwise.

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.

1 participant