zed-industries / create-gpui-app

CRA-style tool for creating new gpui apps
MIT License
130 stars 8 forks source link

panic when running README example #19

Closed natemcintosh closed 4 weeks ago

natemcintosh commented 1 month ago

When running the quickstart code, I get

$ create-gpui-app --name my-app                                                                                                                                                                     08/12/2024 02:24:50 PM
thread 'main' panicked at /home/nathanmcintosh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/create-gpui-app-0.1.2/src/main.rs:65:60:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Looking at the relevant line of code, it looks like it is looking for a template that doesn't exist, even after cargo installing the tool. I'd guess maybe it's not being installed as part of the cargo installation?

Cloning the repo, and running cargo package --list to see what gets included during installation, I get:

But not anything from the template folder.

alvarorichard commented 1 month ago

same error with me

ethan-phu commented 1 month ago

same error with me

+1

swaptr commented 1 month ago

Hello, Thanks for the detailed report. Yes I could confirm this on my end. I did some research and it seems like cargo does not track any unused crates with a manifest file and hence none of the templates are being packaged with the tool. I have fixed this in #21 and it should be reflected in the next release.