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 cleanup #196

Merged
merged 5 commits into from
Sep 5, 2019
Merged

Examples cleanup #196

merged 5 commits into from
Sep 5, 2019

Conversation

zrzka
Copy link
Contributor

@zrzka zrzka commented Sep 3, 2019

  • Removed logging example from the README.md
    • There's no such example
  • Fixed some typos
  • Moved examples/program_examples/command_bar.rs to examples/command_bar.rs
    • Otherwise you can't run it with cargo run --example command_bar
  • Excluded examples/program_examples from the workspace
    • Otherwise you can't run snake & first_depth_search, see below
$ cd examples/program_examples/snake
$ cargo run
cargo run
error: current package believes it's in a workspace when it's not:
current:   /Users/robertvojta/Projects/personal/crossterm/examples/program_examples/snake/Cargo.toml
workspace: /Users/robertvojta/Projects/personal/crossterm/Cargo.toml

this may be fixable by adding `examples/program_examples/snake` to the `workspace.members` array of the manifest located at: /Users/robertvojta/Projects/personal/crossterm/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.

Signed-off-by: Robert Vojta <rvojta@me.com>
Signed-off-by: Robert Vojta <rvojta@me.com>
Signed-off-by: Robert Vojta <rvojta@me.com>
Signed-off-by: Robert Vojta <rvojta@me.com>
Signed-off-by: Robert Vojta <rvojta@me.com>
Copy link
Member

@TimonPost TimonPost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contributions!

@@ -31,6 +31,10 @@ members = [
"crossterm_screen"
]

exclude = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, altough is that a requirement, because I believe it is excluded by default right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's excluded in a way you can't do stuff like cargo run --example snake. But w/o this section, you can't run snake via cargo run even if you're in the snake folder.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, I didn't know of that option, I was looking for that behavior, previously I would just put it in the 'member' tags, run it, and remove it, but that feels hacky and it is. Thanks for pointing out the alternative.

@TimonPost TimonPost merged commit b1daecc into crossterm-rs:master Sep 5, 2019
@zrzka zrzka deleted the zrzka/fix-examples branch September 16, 2019 05:47
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

Successfully merging this pull request may close these issues.

2 participants