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

Fix readme and examples #395

Merged
merged 1 commit into from
Aug 10, 2022
Merged

Fix readme and examples #395

merged 1 commit into from
Aug 10, 2022

Conversation

0xpr03
Copy link
Member

@0xpr03 0xpr03 commented Mar 16, 2022

Rework docs for v5 release.
Also includes cargo fmt and comments for the examples.

Fixes #393, fixes #420
Related to #249

@0xpr03 0xpr03 requested a review from JohnTitor March 16, 2022 12:18
}
```

### With precise events
Copy link
Member Author

Choose a reason for hiding this comment

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

We do still talk about that in lib.rs. It's a planned feature but for now completely wrong. As we always emit precise events.

README.md Outdated

The examples below are aspirational only, to preview what the final release may
have looked like. They may not work. Refer to [the API documentation][docs] instead.

```rust
use notify::{RecommendedWatcher, RecursiveMode, Result, watcher};
use std::time::Duration;
use notify::{RecommendedWatcher, RecursiveMode, Watcher};
Copy link
Member Author

Choose a reason for hiding this comment

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

Our lib.rs example also differs slightly, in that it's not using channels.

@JohnTitor
Copy link
Member

One possible way, to keep them in sync, is to use #![doc = include_str!("../README.md")] (the extended_key_value_attributes feature), which is stabilized in 1.54. I'm okay with or without it.

@JohnTitor
Copy link
Member

JohnTitor commented Jun 15, 2022

We don't have to do MSRV check on examples, change the below if conditions:

- name: check build example
if: matrix.version != 'stable'
run: cargo check -p watcher_kind
- name: test hot_reload_tide
if: matrix.version != 'stable'
run: cargo test -p hot_reload_tide

- if: matrix.version != 'stable' 
+ if: matrix.version == 'nightly'

(I don't remember why we ignore it on stable though...)

I'm going to cleanup CI config in another PR.

@@ -0,0 +1,3 @@
# Watcher kind example
Copy link
Member

Choose a reason for hiding this comment

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

Typo on file extension?

Copy link
Member Author

Choose a reason for hiding this comment

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

uh yeah, also thanks for reviewing but just to make sure: It's not finished, just had some time yesterday night

Copy link
Member

Choose a reason for hiding this comment

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

Alright, ping me if it's ready :)

@0xpr03 0xpr03 closed this Aug 9, 2022
@0xpr03 0xpr03 reopened this Aug 9, 2022
@0xpr03 0xpr03 marked this pull request as draft August 9, 2022 14:15
@0xpr03 0xpr03 force-pushed the fix_readme_examples branch 5 times, most recently from 6c48112 to 2aebb61 Compare August 9, 2022 16:27
@0xpr03 0xpr03 marked this pull request as ready for review August 9, 2022 16:36
@0xpr03 0xpr03 requested a review from JohnTitor August 9, 2022 16:36
@0xpr03
Copy link
Member Author

0xpr03 commented Aug 9, 2022

Next step would be either a last RC or a release.

@JohnTitor
Copy link
Member

Next step would be either a last RC or a release.

I guess a RC release would be preferred as we have some changes since the last release?

@0xpr03 0xpr03 force-pushed the fix_readme_examples branch 2 times, most recently from 52de274 to 1174daa Compare August 10, 2022 12:26
@0xpr03 0xpr03 force-pushed the fix_readme_examples branch 2 times, most recently from 63c1550 to 6b09dd0 Compare August 10, 2022 13:08
@0xpr03 0xpr03 merged commit ae9134c into main Aug 10, 2022
@0xpr03 0xpr03 deleted the fix_readme_examples branch August 10, 2022 13:15
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.

Remove Usage section from readme watcher not available for import
2 participants