Migrating to 0.5.0
0.5.0 contains breaking changes. This page follows the migration guide in the 0.5.0 release notes; the full list of changes is in the changelog.
All languages
- Text is no longer trimmed. Values keep their whitespace, following each value's XSD
whiteSpacefacet. If you compared titles or names after the parser trimmed them, trim them yourself. - Large inputs return the complete model.
parseused to switch to a streaming path above 10 MB, which returned fewer fields. It now always uses the complete parser; large inputs take about as long per MB as small ones (about 20–24 MiB/s). - New fields. Release dates, P and C lines, genres, parental warnings, labels,
MessageControlType, deal end dates, the track layout and ERN 3.8.2 territory details are read in ERN 3.8.2, 4.2 and 4.3 (parse output reference). Absent values stay empty. - Builder. The build request is the core's
BuildRequestin every language:headerandversionare required, nothing is filled in, and a value the target version requires fails the build with an error naming the field. ERN 3.8.2 output is now schema-valid.
Node.js
ddex-parser
-
Remove every parse option. Each
ParseOptionsfield now throws, for exampleparseSync(xml, { collectStatistics: true }):- the streaming options
mode,autoThreshold,enableStreaming,streamingThreshold; - the options that had no effect:
resolveReferences,includeRaw,maxMemory,timeoutMs,allowBlocking,chunkSize,fidelityLevel,preserve*,canonicalization,collectStatistics,validationLevel,extensionValidation,enableChecksums,memoryLimit,enableDetailedErrors.
parse(xml)andparseSync(xml)without options behave as before. - the streaming options
-
ParsedMessage.statisticsandfidelityInfowere removed. They held zeros and an echo of the options. -
DdexParser.stream()was removed: it returned hard-coded test data. Useparse/parseSync. -
ParsedMessage.resourcesvalues use camelCase keys:resources.A1.resource_idis nowresources.A1.resourceId. -
displayArtist,artist,senderNameandrecipientNameare optional.
ddex-builder
build(request)takes the core build request (snake_case fields; seebuild-request.d.tsand the build request reference).headerandversionare required.batchBuildwas removed.
Python
- Python 3.10 or newer is required (0.4.5 allowed 3.8). The wheels are tagged
cp310-abi3. - The native extension is required.
import ddex_parser/import ddex_builderraiseImportErrorif it cannot load; the message names the cause and the fix (reinstall a wheel for your platform, or runmaturin developin a checkout). The mock classes and fake results are gone, andddex_builder.is_rust_available()always returnsTrue. __version__reports the installed package version.- The flat DataFrame's
sendercolumn holds the sender's name. - The DataFrames gained columns (Python and DataFrames).
DdexBuilder.build(request)andfrom_dataframe(df, schema, request)run the core builder; nothing is filled in.
WASM builder
build(request)takes the coreBuildRequestand is synchronous.- These members returned placeholder values and were removed:
batchBuild, theRelease/Resourceclasses, and the preset and fidelity methods.
Rust
- The graph and flat models have new fields. Struct literals that construct these types need
the new fields (most new fields are
OptionorVec). - The builder's request structs gained fields; use
..Default::default(). ParseMode::Autono longer selectsStream.