Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Examples] Issues running examples #46

Open
saona-raimundo opened this issue Nov 23, 2022 · 2 comments
Open

[Examples] Issues running examples #46

saona-raimundo opened this issue Nov 23, 2022 · 2 comments

Comments

@saona-raimundo
Copy link

Hi! First of all, thanks for the crate!

I was trying to run the examples but faced some issues and I was wondering
Would accept PRs to improve them?

The issues I faced are the following. Some of them are from the "first-user perspective", I just want to help.

  1. I was not sure what each example was about. There was no README or module documentation on the source code.
  2. The terminal example uses termion, which does not compile on Windows... So I could not run it.
  3. The editor-orbclient example compiles, but panic with [2022-11-23T10:09:18Z ERROR editor_orbclient] failed to load "": The system cannot find the path specified.
  4. The editor-libcosmic example failed to build because xdg::BaseDirectories was not found.

(I am on Windows running rustc 1.64.0)
Some preliminary thoughts about these issues are the following.

  1. The terminal example uses termion modules color and cursor. A more platform-friendly crate with these features may be console. It also ranks higher in https://lib.rs/std so I thought the change would be an improvement.

I have not checked the other examples in detail yet.

@CeleritasCelery
Copy link

I am also having issues running the example on MacOS. the terminal one was the only one that worked.

  • editor-orbclient failed with [2023-02-22T21:11:20Z ERROR editor_orbclient] failed to load "": No such file or directory (os error 2)
  • editor-libcosmic failed because the wayland dependency failed to compile (looks to be linux only).
  • editor-test failed with
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `Cursor { line: 0, index: 1, affinity: Before }`,
 right: `Cursor { line: 0, index: 1, affinity: After }`', examples/editor-test/src/main.rs:104:17

@phsilva
Copy link

phsilva commented Mar 6, 2023

One additional comment on the example is that they don't follow regular cargo examples structure. Although examples are a top-level folder, the following fails:

cargo run --example terminal

it says there are no example named terminal, because on the main Cargo.toml examples are included as members of the workspace, which works of course, but creates a a learning curve by not following the standard cargo structure for examples.

Just for reference, to run example you need:

cargo run --package terminal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants