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

Changes in API not reflected in Bevy Book #890

Closed
Laozey opened this issue Nov 18, 2020 · 5 comments
Closed

Changes in API not reflected in Bevy Book #890

Laozey opened this issue Nov 18, 2020 · 5 comments
Labels
C-Docs An addition or correction to our documentation

Comments

@Laozey
Copy link

Laozey commented Nov 18, 2020

Bevy version

V 0.3.0

Operating system & version

Ubuntu 18.04

What you did

I was following getting started in the Bevy book and at the step 2.3, I copied the code. (I checked if i had missed some part of the code, and added nothing that wasn't mentioned in the book).

What you expected to happen

I expected my result to be the same as write in Bevy Book

What actually happened

I got the following errors after compiling:

- {unknown}
no method named `system` found for fn item `fn(bevy::prelude::Commands) {add_people}` in the current scope
`add_people` is a function, perhaps you wish to call itrustc(E0599)

 - {unknown}
no method named `system` found for fn item `for<'r, 's> fn(&'r Person, &'s Name) {greet_people}` in the current scope
`greet_people` is a function, perhaps you wish to call itrustc(E0599)

Any additional information you would like to add such as screenshots, logs, etc.

My code:

use bevy::prelude::*;

struct Name(String);

struct Person;

fn hello_world() {
    println!("hello world!");
}

fn add_people(mut commands: Commands) {
    commands
        .spawn((Person, Name("Elaina Proctor".to_string())))
        .spawn((Person, Name("Renzo Hume".to_string())))
        .spawn((Person, Name("Zayna Nieves".to_string())));
}

fn greet_people(_person: &Person, name: &Name) {
    println!("hello {}!", name.0);
}

fn main() {
    App::build()
        .add_startup_system(add_people.system())
        .add_system(hello_world.system())
        .add_system(greet_people.system())
        .run();
}

In addition, this error is maybe due to this commit #876, the Bevy Book may need some adjustment

@darnuria
Copy link

darnuria commented Nov 18, 2020

@Laozey is one of my student and would love to be mentored to fix the docs. I am sure! :D

Also I think the right repository was https://github.com/bevyengine/bevy-website/ where the book source belong.

@mockersf
Copy link
Member

👋 welcome !

The issue is that the website follow the released version of bevy, version 0.3.

If you try running the code against the latest version from git, you will have issue... Similarly, you can't run the examples from git against the released version. This is a recurring issue with no obvious solution.

For the example, there's now a note in the readme: https://github.com/bevyengine/bevy/tree/master/examples#%EF%B8%8F-note-for-users-of-releases-on-cratesio

There's also issue #407 discussing publishing git API docs.

The issue would be to have website (or other documentation) for released version and for master, with an easy way to know which is which

@Moxinilian
Copy link
Member

I think the difficult aspect is to keep master bevy up to date with master book at all times. @cart said developer priority should not be focused on documentation as the codebase is quite volatile, but I'm not exactly sure what update cycle for the book it implies (would we only update the book on releases?).

@Moxinilian Moxinilian added the C-Docs An addition or correction to our documentation label Nov 19, 2020
@4-rodrigo-salazar
Copy link
Contributor

4-rodrigo-salazar commented Nov 20, 2020

I think what needs to be resolved is that some people are using bevy git master when they are not working directly on bevy.

We can make this happen less by removing the advice of running against git master from the book, or strongly flag that the book content won't be compatible with git master.

This is at the bottom of the "getting started" part of bevy book. https://bevyengine.org/learn/book/getting-started/ :

NOTE: Bevy is currently being updated at a rapid pace. Taking a dependency on the git repo instead of the cargo crate will allow you to receive the latest updates as fast as possible.

The current phrasing makes it sound like a good idea.

cart pushed a commit to bevyengine/bevy-website that referenced this issue Nov 29, 2020
I agree with (this)[bevyengine/bevy#890 (comment)] comment, so I added some scary warnings.
@ambeeeeee
Copy link
Contributor

ambeeeeee commented Nov 29, 2020

bevyengine/bevy-website#66 is progress to closing this / closes this.

bestsoftwareandcodereviews1 added a commit to bestsoftwareandcodereviews1/bevy-website that referenced this issue Aug 16, 2024
I agree with (this)[bevyengine/bevy#890 (comment)] comment, so I added some scary warnings.
bestsoftwaretopappreviews11 added a commit to bestsoftwaretopappreviews11/bevy-website that referenced this issue Aug 23, 2024
I agree with (this)[bevyengine/bevy#890 (comment)] comment, so I added some scary warnings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Docs An addition or correction to our documentation
Projects
None yet
Development

No branches or pull requests

7 participants