cargo-minimize icon indicating copy to clipboard operation
cargo-minimize copied to clipboard

No change while bisecting, current was empty somehow

Open Noratrieb opened this issue 2 years ago • 2 comments

  213349ms  INFO cargo_minimize::processor src/query/mod.rs: After privatize: no
  215275ms  INFO cargo_minimize::processor src/query/mod.rs: After privatize: no
  217217ms  INFO cargo_minimize::processor src/query/mod.rs: After privatize: no
  222527ms  INFO cargo_minimize::processor src/query/mod.rs: After privatize: yes
  222527ms  INFO cargo_minimize::processor src/query/mod.rs: After privatize: no changes
thread 'main' panicked at 'internal error: entered unreachable code: No change while bisecting, current was empty somehow: {AstPath([])}', src/processor/checker.rs:173:17

while running the privatize pass on [email protected]

Noratrieb avatar Jan 23 '23 07:01 Noratrieb

Rerunning cargo-minimize fixes it

Noratrieb avatar Jan 23 '23 07:01 Noratrieb

fa0b3021a95c3ba640f2dd996c80c3b58cb3cc13 probably helps but what is really needed is a proper way to do this tracking..

I think I should probably start with a HasName trait implemented for all the syn structs. And then using a bunch of macros define my own visitor trait that tracks this properly

Noratrieb avatar Jan 23 '23 08:01 Noratrieb