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

Remove get_unchecked comment #2925

Closed
wants to merge 79 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
5583f9a
Android uninstall 31 (#2533)
mockersf Jul 26, 2021
d3ae816
Ci stability and speed improvements (#2551)
mockersf Jul 27, 2021
c83a184
Dedupe move logic in remove_bundle and remove_bundle_intersection (#2…
BoxyUwU Jul 27, 2021
6d6bc2a
Merge AppBuilder into App (#2531)
bjorn3 Jul 27, 2021
234b2ef
Inline world get (#2520)
mockersf Jul 27, 2021
b724a0f
Down with the system! (#2496)
mockersf Jul 27, 2021
4b6238d
Remove empty module (#2558)
BoxyUwU Jul 28, 2021
86cc70b
Refactor ECS to reduce the dependency on a 1-to-1 mapping between com…
bjorn3 Jul 28, 2021
5ffff03
Fix some nightly clippy lints (#2522)
BoxyUwU Jul 29, 2021
155068a
Add 's (state) lifetime to `Fetch` (#2515)
BoxyUwU Jul 29, 2021
54ff7aa
Bump notify to 5.0.0-pre.11 (#2564)
deontologician Jul 29, 2021
43d99bb
Remove bevy_dynamic_plugin as a default (#2578)
DJMcNab Aug 1, 2021
03e2045
fix typo (paramater to parameter) (#2590)
Protowalker Aug 6, 2021
90586a4
Add "ci" job to the bors.toml (#2612)
MinerSebas Aug 6, 2021
336583a
Update EntityMut's location in push_children() and insert_children() …
Davier Aug 10, 2021
49038d0
Remove with bundle filter (#2623)
Hoidigan Aug 10, 2021
0c91317
Change definition of `ScheduleRunnerPlugin` (#2606)
tsoutsman Aug 10, 2021
a023b68
Link Minimal and Default plugins in the docs. (#2583)
mirkoRainer Aug 10, 2021
b13472d
fix missing paths in ECS SystemParam derive macro v2 (#2550)
pbalcer Aug 11, 2021
fafee88
Small script fix (#2591)
Aug 13, 2021
5eeba15
Better error message for unsupported shader features Fixes #869 (#2598)
myisaak Aug 13, 2021
6aedb25
Cleanup FromResources (#2601)
Davier Aug 13, 2021
96f0e02
Implement Clone for Fetches (#2641)
msvbg Aug 14, 2021
d59fc07
Comprehensive CONTRIBUTING.md (#2040)
alice-i-cecile Aug 14, 2021
a89a954
Not me ... us (#2654)
cart Aug 15, 2021
9d45353
System Param Lifetime Split (#2605)
cart Aug 15, 2021
98a08cf
feat: remove_component for ReflectComponent (#2682)
gschup Aug 18, 2021
1a758dd
update ndk-glue to 0.4 (#2684)
mockersf Aug 19, 2021
9788b38
Update glam requirement from 0.15.1 to 0.17.3 (#2500)
dependabot[bot] Aug 19, 2021
d84c7f9
Reduce visibility of various types and fields (#2690)
bjorn3 Aug 19, 2021
62e4e59
Update plugin guidelines (#2692)
NiklasEi Aug 19, 2021
481fa3c
derive Debug, Clone for FixedState (StableAHash) (#2694)
CAD97 Aug 24, 2021
958f8b1
Use Explicit Names for Flex Direction (#2672)
mirkoRainer Aug 24, 2021
47ccebf
Implement IntoSystemDescriptor for SystemDescriptor (#2718)
GarettCooper Aug 24, 2021
c5717b5
Document collide args (#2721)
rukai Aug 24, 2021
b47217b
Spawn specific entities: spawn or insert operations, refactor spawn i…
cart Aug 25, 2021
f38a6e6
Document QueryState (#2298)
jleflang Aug 25, 2021
f6b42b8
check that benches build (#2675)
mockersf Aug 26, 2021
4465583
Changed Zshare-generics to `n` on Windows (#2016)
lukors Aug 30, 2021
d4a552a
Add aarch64-apple-darwin to the config_fast_builds for Apple Silicon …
joshuataylor Aug 30, 2021
dea292d
Derive thiserror::Error for HexColorError (#2740)
johanhelsing Aug 30, 2021
c563dd0
Fix comment typos (#2737)
bilsen Aug 31, 2021
3597992
Fix Option<NonSend<T>> and Option<NonSendMut<T>> (#2757)
bilsen Aug 31, 2021
af20cad
Add error messages for the spooky insertions (#2581)
DJMcNab Sep 1, 2021
321d998
Add convenience methods for checking a set of inputs (#2760)
DJMcNab Sep 1, 2021
ca54478
Fix breakout example scoreboard (#2770)
squidboylan Sep 4, 2021
391d6c6
Label PRs for all target branches (#2701)
NiklasEi Sep 4, 2021
edd822a
Update glam requirement from 0.17.3 to 0.18.0 (#2748)
dependabot[bot] Sep 6, 2021
18c08dd
add get_history function to Diagnostic (#2772)
Sep 6, 2021
e317058
Docs/more nixos instructions (#2775)
thomasheartman Sep 6, 2021
2f6c464
Add builder methods to Transform (#2778)
Lythenas Sep 9, 2021
cbe9e56
Fixes to `World`'s documentation (#2790)
willolisp Sep 9, 2021
4c3c4b5
Nightly clippy fixes (#2702)
sarkahn Sep 9, 2021
27bfbda
Fix scale_factor_override in the winit backend (#2784)
DJMcNab Sep 10, 2021
5ff96b8
Improve many sprites example (#2785)
willolisp Sep 10, 2021
51a5070
add get_single variant (#2793)
IceSentry Sep 10, 2021
e74f7a7
Fix the new nightly CI errors (#2811)
DJMcNab Sep 12, 2021
9effc3e
Replace `.insert_resource(T::default())` calls with `init_resource::<…
MinerSebas Sep 13, 2021
b91541b
fix typo in events test assert message (#2821)
phrohdoh Sep 13, 2021
34f0085
Doc warnings (#2577)
Hoidigan Sep 14, 2021
42409fc
unused deps? (#2809)
gilescope Sep 16, 2021
064af63
Add trace_tracy feature for Tracy profiling (#2832)
superdump Sep 16, 2021
615d43b
Improve bevy_ecs and bevy_app API docs where referenced by the new Be…
Nilirad Sep 17, 2021
29d4faa
Make events reuse buffers (#2850)
TheRawMeatball Sep 22, 2021
b9e0241
update `cargo-manifest` (#2859)
jakobhellermann Sep 22, 2021
d158e08
Fix panic on is_resource_* calls (#2828) (#2863)
dixonwille Sep 24, 2021
fb0aa8d
enable change detection for hierarchy maintenance (#2411)
mockersf Sep 27, 2021
10cbe05
Update hexasphere requirement from 4.0.0 to 5.0.0 (#2880)
dependabot[bot] Sep 27, 2021
c207950
Add despawn_recursive to EntityMut (#2855)
TheRawMeatball Sep 28, 2021
9919933
add_texture returns index to texture (#2864)
hymm Sep 28, 2021
5ba2b9a
Unique WorldId (#2827)
DJMcNab Sep 30, 2021
07ed1d0
Implement and require `#[derive(Component)]` on all component structs…
Frizi Oct 3, 2021
a60fe30
Avoid some format! into immediate format! (#2913)
CAD97 Oct 6, 2021
0887f41
Fix bevy_ecs::schedule::executor_parallel::system span management (#2…
CAD97 Oct 6, 2021
2974293
Add ControlNode for UI (#2908)
TheRawMeatball Oct 6, 2021
9c7ee79
Use get_unchecked on release builds for image_texture_conversion
billyb2 Oct 6, 2021
1221a02
Fixed formatting
billyb2 Oct 6, 2021
e30f96c
Fixed indexing for get_unchecked in image_texture_conversion
billyb2 Oct 6, 2021
9ecb063
Revert + removed comment
billyb2 Oct 11, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion .cargo/config_fast_builds
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zshare-generics=y"]
[target.x86_64-apple-darwin]
rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/bin/zld", "-Zshare-generics=y"]

[target.aarch64-apple-darwin]
rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/bin/zld", "-Zshare-generics=y"]

[target.x86_64-pc-windows-msvc]
linker = "rust-lld.exe"
rustflags = ["-Zshare-generics=y"]
rustflags = ["-Zshare-generics=n"]

# Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only'
# In most cases the gains are negligible, but if you are on macos and have slow compile times you should see significant gains.
Expand Down
18 changes: 18 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# From: https://docs.github.com/en/github/getting-started-with-github/configuring-git-to-handle-line-endings
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.rs text eof=lf
*.toml text eof=lf
*.frag text
*.vert text

# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.ttf binary
4 changes: 0 additions & 4 deletions .github/CONTRIBUTING.md

This file was deleted.

3 changes: 3 additions & 0 deletions .github/bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ status = [
"build (nightly, ubuntu-latest)",
"build-wasm (stable, ubuntu-latest)",
"build-wasm (nightly, ubuntu-latest)",
"build-android",
"markdownlint",
"check-markdown-links",
"run-examples",
"check-doc",
"check-missing-examples-in-docs",
"check-unused-dependencies",
"ci",
"check-benches",
]

use_squash_merge = true
Expand Down
12 changes: 12 additions & 0 deletions .github/contributing/engine_style_guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Style guide: Engine

For more advice on contributing to the engine, see the [relevant section](../../CONTRIBUTING.md#Contributing-your-own-ideas) of CONTRIBUTING.md.

1. Prefer granular imports over glob imports of `bevy::prelude::*` and `bevy::sub_crate::*`.
2. Use a consistent comment style:
1. `///` doc comments belong above `#[derive(Trait)]` invocations.
2. `//` comments should generally go above the line in question, rather than in-line.
3. Avoid `/* */` block comments, even when writing long comments.
4. Use \`variable_name\` code blocks in comments to signify that you're referring to specific types and variables.
5. Start comments with capital letters. End them with a period if they are sentence-like.
3. Use comments to organize long and complex stretches of code that can't sensibly be refactored into separate functions.
64 changes: 64 additions & 0 deletions .github/contributing/example_style_guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Style guide: Examples

For more advice on writing examples, see the [relevant section](../../CONTRIBUTING.md#writing-examples) of CONTRIBUTING.md.

## Organization

1. Examples should live in an appropriate subfolder of `/examples`.
2. Examples should be a single file if possible.
3. Assets live in `./assets`. Try to avoid adding new assets unless strictly necessary to keep the repo small. Don't add "large" asset files.
4. Each example should try to follow this order:
1. Imports
2. A `fn main()` block
3. Example logic
4. \[Optional\] Tests
5. Try to structure app / plugin construction in the same fashion as the actual code.

## Stylistic preferences

1. Use simple, descriptive variable names.
1. Avoid names like `MyComponent` in favor of more descriptive terms like `Events`.
2. Prefer single letter differentiators like `EventsA` and `EventsB` to nonsense words like `EventsFoo` and `EventsBar`.
3. Avoid repeating the type of variables in their name where possible. For example, `Color` should be preferred to `ColorComponent`.
2. Prefer glob imports of `bevy::prelude::*` and `bevy::sub_crate::*` over granular imports (for terseness).
3. Use a consistent comment style:
1. `///` doc comments belong above `#[derive(Trait)]` invocations.
2. `//` comments should generally go above the line in question, rather than in-line.
3. Avoid `/* */` block comments, even when writing long comments.
4. Use \`variable_name\` code blocks in comments to signify that you're referring to specific types and variables.
5. Start comments with capital letters; end them with a period if they are sentence-like.
4. Use comments to organize long and complex stretches of code that can't sensibly be refactored into separate functions.
5. Avoid making variables `pub` unless it is needed for your example.

## Code conventions

1. Refactor configurable values ("magic numbers") out into constants with clear names.
2. Prefer `for` loops over `.for_each`. The latter is faster (for now), but it is less clear for beginners, less idiomatic, and less flexible.
3. Use `.single` and `.single_mut` where appropriate.
4. In Queries, prefer `With<T>` filters over actually fetching unused data with `&T`.
5. Prefer disjoint queries using `With` and `Without` over query sets when you need more than one query in a single system.
6. Prefer structs with named fields over tuple structs except in the case of single-field wrapper types.
7. Use enum-labels over string-labels for system / stage / etc. labels.

## "Feature" examples

These examples demonstrate the usage of specific engine features in clear, minimal ways.

1. Focus on demonstrating exactly one feature in an example
2. Try to keep your names divorced from the context of a specific game, and focused on the feature you are demonstrating.
3. Where they exist, show good alternative approaches to accomplish the same task and explain why you may prefer one over the other.
4. Examples should have a visible effect when run, either in the command line or a graphical window.

## "Game" examples

These examples show how to build simple games in Bevy in a cohesive way.

1. Each of these examples lives in the [/examples/games] folder.
2. Aim for minimum but viable status: the game should be playable and not obviously buggy but does not need to be polished, featureful, or terribly fun.
3. Focus on code quality and demonstrating good, extensible patterns for users.
1. Make good use of enums and states to organize your game logic.
2. Keep components as small as possible but no smaller: all of the data on a component should generally be accessed at once.
3. Keep systems small: they should have a clear single purpose.
4. Avoid duplicating logic across similar entities whenever possible by sharing systems and components.
4. Use `///` doc comments to explain what each function / struct does as if the example were part of a polished production codebase.
5. Arrange your code into modules within the same file to allow for simple code folding / organization.
Loading