Skip to content

depyler v3.20.2 Compatibility Update - 50% Examples Now Compile #1

@noahgift

Description

@noahgift

Summary

Tested latest depyler v3.20.2 against all 6 argparse examples. example_positional now compiles successfully, improving compatibility from 2/6 (33%) to 3/6 (50%).

Test Results

Example Status Details
example_simple ✅ Works Full support - compiles and runs
example_flags ✅ Works Full support - compiles and runs
example_positional Works NEW - Fixed in v3.20.2 (was failing in v3.20.1)
example_subcommands ❌ Build fails Subcommand enum comparison issues
example_complex ❌ Build fails Option type handling issues
example_stdlib ❌ Transpile fails Expression type not supported

Key Improvement

example_positional now compiles successfully with depyler compile. This was failing in v3.20.1 with Vec formatting issues.

cd examples/example_positional
depyler compile positional_args.py -o test_positional_args
# ✅ Binary created: test_positional_args

Remaining Issues

example_subcommands (Build Fails)

error[E0369]: binary operation `==` cannot be applied to type `Commands`
  --> src/main.rs:37:36
   |
37 |     let _cse_temp_0 = args.command == "clone";
   |                       ------------ ^^ ------- &str
   |                       |
   |                       Commands

Issue: Enum variants need pattern matching instead of string comparison.

example_complex (Build Fails)

error[E0308]: mismatched types
  --> src/main.rs:94:4
   |
94 | if args.count {
   |    ^^^^^^^^^^ expected `bool`, found `Option<String>`

Issue: Optional arguments not properly handled as Option<T> types.

example_stdlib (Transpile Fails)

Error: Failed to transpile Python to Rust
Caused by: Expression type not yet supported

Issue: Python stdlib module patterns not yet supported.

Environment

  • depyler version: v3.20.2
  • Rust: 1.83.0
  • System: Ubuntu 22.04 LTS

Notes

All examples have manual Rust implementations with 100% I/O equivalence validation, ensuring complete test coverage regardless of depyler compile status.

Related

  • Updated in commit: 0c9df04
  • Documentation: README.md compatibility table updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions