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

Refactor README code examples #81

Open
Tracked by #102
zzeroo opened this issue Nov 22, 2017 · 10 comments
Open
Tracked by #102

Refactor README code examples #81

zzeroo opened this issue Nov 22, 2017 · 10 comments
Milestone

Comments

@zzeroo
Copy link
Contributor

zzeroo commented Nov 22, 2017

The examples in the projects README does not work if you create a project from them.

I've create working examples:

Currently they contain unnecessary code e.g. https://gist.github.com/zzeroo/c63499d1a320b4eff5325728600e7524#file-readme1-rs-L68-L74 and they match not very well. I mean the first part is not straight an ancestor of the second.

What do you think, can I contribute a better version of the README?

@antoyo
Copy link
Owner

antoyo commented Nov 22, 2017

What's not working with the README examples?
Please not that the second is based on the first, which may be why it doesn't compile.
Thanks.

@zzeroo
Copy link
Contributor Author

zzeroo commented Nov 22, 2017

That's the jumping point. I recognized that. But it's also why I ask first. Maybe I don't overlook the whole.

But please compare my first example with the actual README. The order of the rows should match more or less. There are some missing elements. And some non commented parts which make the code not clear compiling.

The second part was also hard for me as very noobish rookie. It was not clear which parts you have to remove, the relm errors were not helpful either.

@zzeroo
Copy link
Contributor Author

zzeroo commented Nov 22, 2017

but to be honest. You're right. It's just little details:

@antoyo
Copy link
Owner

antoyo commented Nov 22, 2017

Ok, that would be helpful indeed.
Thanks for doing that.
If you need any help, don't hesitate to ask.

@antoyo antoyo added this to the 1.0 milestone Apr 4, 2018
@antoyo
Copy link
Owner

antoyo commented Apr 4, 2018

We should also have a way to automatically test the examples in the readme.

@Eijebong
Copy link
Contributor

Eijebong commented Apr 4, 2018

I remember seeing a crate doing that. I can't remember the name of it though...

@antoyo antoyo mentioned this issue Apr 4, 2018
39 tasks
@antoyo
Copy link
Owner

antoyo commented Apr 20, 2018

Note to myself:
just include test files inside the readme and they will always be up to date.

@Eijebong
Copy link
Contributor

@antoyo You could also write something like lettre/lettre#253

@etrombly etrombly mentioned this issue Oct 4, 2018
@chathaway-codes
Copy link
Contributor

Maybe related to this issue, but the README is currently suggesting version gtk 0.3.0 and relm 0.11.0. That is a few versions behind, according to crates.io (gtk 0.60, and relm 0.16.0 are the versions as the moment of this comment). They should probably be updated, especially for those people who first started with the README, then tried to expand on an example and got a bunch of weird compilation errors.

@chathaway-codes
Copy link
Contributor

created #169 for that small issue

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

4 participants