projg2 / pycargoebuild

A generator for Rust/Cargo ebuilds written in Python
GNU General Public License v2.0
28 stars 7 forks source link

Cargo.lock version '4 unsupported #34

Closed theoparis closed 4 weeks ago

theoparis commented 1 month ago
DESKTOP-CN5SMAK /var/db/repos/rust-overlay/gui-apps/milkshake-terminal # pycargoebuild ~/milkshake-terminal/
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.12/pycargoebuild", line 8, in <module>
    sys.exit(entry_point())
             ^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pycargoebuild/__main__.py", line 438, in entry_point
    sys.exit(main(*sys.argv))
             ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pycargoebuild/__main__.py", line 262, in main
    workspace = get_workspace_root(directory)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pycargoebuild/__main__.py", line 179, in get_workspace_root
    crates=frozenset(get_crates(cargo_lock)),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pycargoebuild/cargo.py", line 176, in get_crates
    raise NotImplementedError(
NotImplementedError: Cargo.lock version '4 unsupported

Repo to reproduce this with: https://github.com/mizz1e/milkshake-terminal

mgorny commented 4 weeks ago

I see it with uv too, so at least i have a diff to investigate. I wish upstream would make it clearer what they've changed.

mgorny commented 4 weeks ago

Ok, so apparently v4 guarantees that parameters in source are URL-encoded. I don't think this really requires any changes on our end, besides allowing v4.