ccbrown / iocraft

A Rust crate for beautiful, artisanally crafted CLIs, TUIs, and text-based IO.
https://crates.io/crates/iocraft
Apache License 2.0
339 stars 5 forks source link

Can't run examples #18

Closed AndreKR closed 1 month ago

AndreKR commented 1 month ago

From where do I have to run the examples? When I try to run them from the project directory I get:

cargo run -q --example counter
error: couldn't read `packages\iocraft-macros\src\../examples/counter.rs`: The system cannot find the path specified. (os error 3)
   --> packages\iocraft-macros\src\lib.rs:386:9
    |
386 | #[doc = include_str!("../examples/counter.rs")]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is a file with the same name in a different directory
    |
386 | #[doc = include_str!("../../../examples/counter.rs")]
    |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: couldn't read `packages\iocraft-macros\src\../examples/table.rs`: The system cannot find the path specified. (os error 3)
   --> packages\iocraft-macros\src\lib.rs:395:9
    |
395 | #[doc = include_str!("../examples/table.rs")]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is a file with the same name in a different directory
    |
395 | #[doc = include_str!("../../../examples/table.rs")]
    |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: could not compile `iocraft-macros` (lib) due to 2 previous errors

This is with stable-x86_64-pc-windows-gnu.

ccbrown commented 1 month ago

Thanks for reporting this! Until this point I hadn't tested on Windows, and it looks like the lack of symlink support was breaking the build for you. I fixed up a few things, added Windows to CI, and released a version 0.2.1 which should work for you now:

table-powershell