Skip to content

CARGO environment variable not set when cargo check runs through ra #7462

Closed
@jplatte

Description

@jplatte

When trying to use one of SQLx'es query macros (using the master branch), this error currently happens in VSCodium when ra runs cargo check:

proc macro returned error: proc-macro panicked: `CARGO` must be set
proc macro returned error: proc-macro panicked: Lazy instance has previously been poisoned
proc macro returned error: proc-macro panicked: Lazy instance has previously been poisoned
... (one poisoned error for every but the first query macro invocation)

The error comes from here: https://github.com/launchbadge/sqlx/blob/df393128f8b07e3b858e65446b2a508a73bf5135/sqlx-macros/src/query/mod.rs#L33

Since cargo there is only used to run cargo metadata, it would most likely be fine for 99% of the cases to fall back to cargo, but it would be nice if it just worked as-is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macromacro expansionS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions