tensorlakeai / indexify

A realtime and indexing and structured extraction engine for Unstructured Data to build Generative AI Applications
https://getindexify.ai
Apache License 2.0
703 stars 77 forks source link

Local development builds fail #691

Closed grampelberg closed 3 weeks ago

grampelberg commented 4 weeks ago

cargo build fails for me locally with:

error: #[derive(RustEmbed)] folder '/Users/thomas/code/indexify/ui/build' does not exist. cwd: '/Users/thomas/code/indexify'
  --> src/server.rs:59:1
   |
59 | / #[folder = "ui/build"]
60 | | pub struct UiAssets;
   | |____________________^

This can be fixed by doing make package-ui first. Looking through the Makefile, I'm not sure what the best solution would be. Ideally, it'd be added to make build but there are downsides there. I'd be happy to do a PR that updates develop.md but that feels like a "fix" that'll get forgotten once the correct solution is there.

diptanu commented 4 weeks ago

@grampelberg We had an automated this by adding some code in build.rs, you can make cargo build the ui. What we couldn't figure out how to do was detect changes in the file and not build the code. Build time was huge every time we made any changes. And what makes it worse is cargo check in visual studio gets stuck.

grampelberg commented 4 weeks ago

Time for Bazel (I jest). It's too bad that rerun-if-changed is crate-wide instead of being conditional for sections. Splitting the UI's embed out to its own crate seems to have fixed the problem.