frunk icon indicating copy to clipboard operation
frunk copied to clipboard

Bug: compilation failed when I don't have frunk-core as dependency

Open juchiast opened this issue 1 year ago • 1 comments

error[E0433]: failed to resolve: could not find `frunk_core` in the list of imported crates
  --> crates/flow/src/flow_set.rs:21:10
   |
21 | #[derive(frunk::LabelledGeneric)]
   |          ^^^^^^^^^^^^^^^^^^^^^^ could not find `frunk_core` in the list of imported crates
   |
   = note: this error originates in the derive macro `frunk::LabelledGeneric` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this module
   |
1  + use frunk::labelled;
   |

error[E0433]: failed to resolve: could not find `frunk_core` in the list of imported crates
  --> crates/flow/src/flow_set.rs:21:10
   |
21 | #[derive(frunk::LabelledGeneric)]
   |          ^^^^^^^^^^^^^^^^^^^^^^ could not find `frunk_core` in the list of imported crates
   |
   = note: this error originates in the derive macro `frunk::LabelledGeneric` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this module
   |
1  + use frunk::hlist;
   |

error[E0433]: failed to resolve: could not find `frunk_core` in the list of imported crates
  --> crates/flow/src/flow_set.rs:21:10
   |
21 | #[derive(frunk::LabelledGeneric)]
   |          ^^^^^^^^^^^^^^^^^^^^^^ could not find `frunk_core` in the list of imported crates
   |
   = note: this error originates in the derive macro `frunk::LabelledGeneric` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this module
   |
1  + use frunk::labelled::chars;

frunk should be able to work on its own.

juchiast avatar Nov 28 '24 04:11 juchiast

Oof yeah, this is one of those annoying/tough nuts to crack

Likely comes from this kind of thing in the macro:

https://github.com/lloydmeta/frunk/blob/ffba8cfa144b8ed02942271a3ea45006100cd029/derives/src/derive_labelled_generic.rs#L36

I'm not sure how best we can solve this so that it works when using just frunk while allowing it to work with piecemeal dependencies.

lloydmeta avatar Nov 28 '24 05:11 lloydmeta