polyxml 0.32.0__tar.gz → 0.33.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {polyxml-0.32.0 → polyxml-0.33.0}/Cargo.lock +6 -6
- {polyxml-0.32.0 → polyxml-0.33.0}/Cargo.toml +1 -1
- {polyxml-0.32.0 → polyxml-0.33.0}/PKG-INFO +1 -1
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/rust/mod.rs +12 -8
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_rust_codegen.rs +4 -4
- {polyxml-0.32.0 → polyxml-0.33.0}/pyproject.toml +1 -1
- {polyxml-0.32.0 → polyxml-0.33.0}/README.md +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/Cargo.toml +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/README.md +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/benches/core_benchmarks.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/benches/support/tag_dispatch_fixtures.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/benches/tag_dispatch.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/cpp/mod.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/csharp/mod.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/go/mod.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/java/codec.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/java/mod.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/java/models.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/mod.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/python/aot.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/python/mod.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/codegen/typescript/mod.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/converters.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/error.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/ir/chunker.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/ir/mod.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/ir/tarjan.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/json.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/lib.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/parser.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/schema.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/schema_parser/mod.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/serializer.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/transcoder.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/src/value.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/fixtures/lexical_union.xsd +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/fixtures/mixed_content.xsd +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/fixtures/ts_mixed_content_inheritance.xsd +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_adversarial_identifiers.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_conformance.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_core.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_cpp_codegen.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_csharp_codegen.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_go_codegen.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_java_codegen.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_json.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_lexical_union_codegen.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_mixed_content.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_pattern_codegen.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_python_codegen.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_rust_codecs.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_schema_audit.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_schema_ir.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_security.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_transcoder.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_ts_codegen.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_unbounded_choice.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/tests/test_xsi_type.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/Cargo.toml +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/README.md +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/benches/aot_vs_dataclass.py +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/src/lib.rs +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/tests/test_conformance.py +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/tests/test_generated_models.py +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/tests/test_json.py +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/tests/test_mixed_content.py +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/tests/test_polyxml.py +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-python/tests/test_xsi_type.py +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/python/polyxml/AGENT_GUIDE.md +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/python/polyxml/__init__.py +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/python/polyxml/compat/__init__.py +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/python/polyxml/compat/xsdata.py +0 -0
- {polyxml-0.32.0 → polyxml-0.33.0}/python/polyxml/py.typed +0 -0
|
@@ -608,7 +608,7 @@ dependencies = [
|
|
|
608
608
|
|
|
609
609
|
[[package]]
|
|
610
610
|
name = "polyxml"
|
|
611
|
-
version = "0.
|
|
611
|
+
version = "0.33.0"
|
|
612
612
|
dependencies = [
|
|
613
613
|
"criterion",
|
|
614
614
|
"heck",
|
|
@@ -629,14 +629,14 @@ dependencies = [
|
|
|
629
629
|
|
|
630
630
|
[[package]]
|
|
631
631
|
name = "polyxml-c"
|
|
632
|
-
version = "0.
|
|
632
|
+
version = "0.33.0"
|
|
633
633
|
dependencies = [
|
|
634
634
|
"polyxml",
|
|
635
635
|
]
|
|
636
636
|
|
|
637
637
|
[[package]]
|
|
638
638
|
name = "polyxml-cli"
|
|
639
|
-
version = "0.
|
|
639
|
+
version = "0.33.0"
|
|
640
640
|
dependencies = [
|
|
641
641
|
"clap",
|
|
642
642
|
"glob",
|
|
@@ -650,7 +650,7 @@ dependencies = [
|
|
|
650
650
|
|
|
651
651
|
[[package]]
|
|
652
652
|
name = "polyxml-js"
|
|
653
|
-
version = "0.
|
|
653
|
+
version = "0.33.0"
|
|
654
654
|
dependencies = [
|
|
655
655
|
"napi",
|
|
656
656
|
"napi-build",
|
|
@@ -660,7 +660,7 @@ dependencies = [
|
|
|
660
660
|
|
|
661
661
|
[[package]]
|
|
662
662
|
name = "polyxml-python"
|
|
663
|
-
version = "0.
|
|
663
|
+
version = "0.33.0"
|
|
664
664
|
dependencies = [
|
|
665
665
|
"lexical-core",
|
|
666
666
|
"polyxml",
|
|
@@ -670,7 +670,7 @@ dependencies = [
|
|
|
670
670
|
|
|
671
671
|
[[package]]
|
|
672
672
|
name = "polyxml-wasm"
|
|
673
|
-
version = "0.
|
|
673
|
+
version = "0.33.0"
|
|
674
674
|
dependencies = [
|
|
675
675
|
"polyxml",
|
|
676
676
|
"quick-xml",
|
|
@@ -42,7 +42,7 @@ pub struct RustOptions {
|
|
|
42
42
|
pub pyo3_module_name: Option<String>,
|
|
43
43
|
/// Custom header text to prepend to generated files (default: None).
|
|
44
44
|
pub custom_header: Option<String>,
|
|
45
|
-
/// Split oversized modules into bounded topological chunks (
|
|
45
|
+
/// Split oversized modules into bounded topological chunks (optional setting, default: false).
|
|
46
46
|
#[serde(default)]
|
|
47
47
|
pub split_units: Option<bool>,
|
|
48
48
|
/// Target maximum types per compilation unit chunk (default: 250).
|
|
@@ -304,16 +304,14 @@ impl RustCodegen {
|
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
/// Generate a multi-file or single-file module representation.
|
|
307
|
-
/// When `split_units` is requested
|
|
308
|
-
///
|
|
309
|
-
/// and a parent `mod.rs` that re-exports all chunks.
|
|
307
|
+
/// When `split_units` is requested, emits topologically sorted, bounded chunk modules
|
|
308
|
+
/// (`chunk_00.rs`, `chunk_01.rs`, ...) and a parent `mod.rs` that re-exports all chunks.
|
|
310
309
|
pub fn generate_files(&self, ir: &SchemaIR, base_name: &str) -> Vec<(String, String)> {
|
|
311
310
|
set_type_name_map(build_type_name_map(ir, |local| {
|
|
312
311
|
AsPascalCase(local).to_string()
|
|
313
312
|
}));
|
|
314
313
|
|
|
315
|
-
let
|
|
316
|
-
let should_split = self.options.split_units.unwrap_or(emitted_count > 400);
|
|
314
|
+
let should_split = self.options.split_units.unwrap_or(false);
|
|
317
315
|
let chunk_size = self.options.chunk_size.unwrap_or(250);
|
|
318
316
|
|
|
319
317
|
if !should_split {
|
|
@@ -354,7 +352,7 @@ impl RustCodegen {
|
|
|
354
352
|
let mut files = Vec::new();
|
|
355
353
|
|
|
356
354
|
// 1. Chunks
|
|
357
|
-
for chunk in
|
|
355
|
+
for (chunk_idx, chunk) in plan.chunks.iter().enumerate() {
|
|
358
356
|
let mut out = String::new();
|
|
359
357
|
if let Some(ref header) = self.options.custom_header {
|
|
360
358
|
let trimmed = header.trim();
|
|
@@ -371,7 +369,13 @@ impl RustCodegen {
|
|
|
371
369
|
);
|
|
372
370
|
|
|
373
371
|
self.emit_imports(&mut out, !types_with_lifetime.is_empty());
|
|
374
|
-
out.
|
|
372
|
+
out.push('\n');
|
|
373
|
+
if self.options.emit_codecs {
|
|
374
|
+
out.push_str("use super::{read_element_text, skip_xml_element};\n");
|
|
375
|
+
}
|
|
376
|
+
for prev in &plan.chunks[..chunk_idx] {
|
|
377
|
+
let _ = writeln!(out, "use super::{}::*;", prev.name);
|
|
378
|
+
}
|
|
375
379
|
|
|
376
380
|
for qname in &chunk.types {
|
|
377
381
|
if let Some(type_def) = ir.types.get(qname) {
|
|
@@ -1265,12 +1265,12 @@ fn test_rust_topological_scc_chunking() {
|
|
|
1265
1265
|
|
|
1266
1266
|
// chunk_00 must contain Leaf
|
|
1267
1267
|
assert!(files[0].1.contains("pub type Leaf"));
|
|
1268
|
-
// chunk_01 must contain Mid and
|
|
1268
|
+
// chunk_01 must contain Mid and import prior chunk_00
|
|
1269
1269
|
assert!(files[1].1.contains("pub struct Mid"));
|
|
1270
|
-
assert!(files[1].1.contains("use super::*;"));
|
|
1271
|
-
// chunk_02 must contain Root
|
|
1270
|
+
assert!(files[1].1.contains("use super::chunk_00::*;"));
|
|
1271
|
+
// chunk_02 must contain Root and import prior chunks
|
|
1272
1272
|
assert!(files[2].1.contains("pub struct Root"));
|
|
1273
|
-
assert!(files[2].1.contains("use super::*;"));
|
|
1273
|
+
assert!(files[2].1.contains("use super::chunk_01::*;"));
|
|
1274
1274
|
|
|
1275
1275
|
// mod.rs must re-export all chunks
|
|
1276
1276
|
let mod_rs = &files[3].1;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{polyxml-0.32.0 → polyxml-0.33.0}/crates/polyxml-core/benches/support/tag_dispatch_fixtures.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|