Skip to content

proc-macro-hack takes excessively long to check with polonius #98029

Open
@joshtriplett

Description

@joshtriplett
/tmp$ cargo new testcrate
     Created binary (application) `testcrate` package
/tmp$ cd testcrate/
/tmp/testcrate$ cargo add proc-macro-hack
    Updating 'https://github.com/rust-lang/crates.io-index' index
      Adding proc-macro-hack v0.5.19 to dependencies.
/tmp/testcrate$ cargo +nightly check
    Updating crates.io index
   Compiling proc-macro-hack v0.5.19
    Checking testcrate v0.1.0 (/tmp/testcrate)
    Finished dev [unoptimized + debuginfo] target(s) in 1.09s
/tmp/testcrate$ RUSTFLAGS=-Zpolonius cargo +nightly check
   Compiling proc-macro-hack v0.5.19
    Checking testcrate v0.1.0 (/tmp/testcrate)
    Finished dev [unoptimized + debuginfo] target(s) in 1m 41s

101x longer to check with polonius than without.

I've run into a few other crates with similar issues, some of which have been reported elsewhere:

serde_derive
tinyvec

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-optimizationCategory: An issue highlighting optimization opportunities or PRs implementing suchI-compiletimeIssue: Problems and improvements with respect to compile times.NLL-poloniusIssues related for using Polonius in the borrow checkerrequires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions