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

Update example system in documentation #1403

Merged
merged 1 commit into from
Feb 5, 2021
Merged

Conversation

szunami
Copy link
Contributor

@szunami szunami commented Feb 5, 2021

The existing snippet fails to compile with

no method named `system` found for fn item `fn(bevy::prelude::Commands) {example_system}` in the current scope

The existing snippet fails to compile with

```
no method named `system` found for fn item `fn(bevy::prelude::Commands) {example_system}` in the current scope
```
@cart cart merged commit c87d4c1 into bevyengine:master Feb 5, 2021
@bjorn3
Copy link
Contributor

bjorn3 commented Feb 5, 2021

Why isn't the example tested on CI?

@cart
Copy link
Member

cart commented Feb 5, 2021

That ... is a very good question.

@szunami
Copy link
Contributor Author

szunami commented Feb 5, 2021

I believe CI didn't catch this because this fails when you call system() on example_system, which technically doesn't happen within the snippet. That could be added if desirable.

@cart
Copy link
Member

cart commented Feb 5, 2021

iirc theres a way to add "wrapper" code that doesn't show up in the example, but is executed. If so, thats probably the way to approach this.

@MinerSebas
Copy link
Contributor

The Way to hide Code in doctests is documented here: https://doc.rust-lang.org/rustdoc/documentation-tests.html#hiding-portions-of-the-example

@MinerSebas MinerSebas mentioned this pull request Feb 5, 2021
szunami added a commit to szunami/bevy that referenced this pull request Feb 5, 2021
This is intended to act as a CI time assertion that `example_system` is a real system.

See conversation here: bevyengine#1403
szunami added a commit to szunami/bevy that referenced this pull request Feb 5, 2021
This is intended to act as a CI time assertion that `example_system` is a real system.

See conversation here: bevyengine#1403
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.

4 participants