Skip to content

cargo fix cannot be used with sqlx offline mode #1229

Closed
@ihor-rud

Description

@ihor-rud

Hi,
Running cargo fix on a project that uses sqlx::query! in offline mode panics while compilation.

error: proc macro panicked
...
= help: message: Invalid `cargo metadata` output: Error("EOF while parsing a value", line: 1, column: 0)
= note: this error originates in the macro `sqlx::query` (in Nightly builds, run with -Z macro-backtrace for more info)

It look like calling cargo metadata under cargo fix has different behavior. It expects to receive additional argument if __CARGO_FIX_PLZ is set.

I'd be happy to submit a PR but I dont know what would be the best fix to that.

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