Skip to content

maturin 1.3.0 panics on develop with 'called Option::unwrap() on a None value' #1796

@badboy

Description

@badboy

Bug Description

The new maturin v1.3.0 now panics on our project:

Platform: macos aarch64
Version: 1.3.0
Args: /Users/jer/mozilla/src/glean/.venv3.11/bin/maturin develop

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/module_writer.rs:875:50
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
make: *** [Makefile:46: build-python] Error 101

The unwrap happens here:

let root_pkg = cargo_metadata.root_package().unwrap();

root_package is not guaranteed to exist.
v1.2.3 works just fine for us.

Your maturin version (maturin --version)

1.3.0

Your Python version (python -V)

3.11.5

Your pip version (pip -V)

23.2.1

What bindings you're using

uniffi

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

  1. git clone https://github.com/mozilla/glean && cd glean
  2. make build-python

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions