Skip to content

Documentation for variadics #15387

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

Conversation

BenjaminBrienen
Copy link
Contributor

@BenjaminBrienen BenjaminBrienen commented Sep 23, 2024

Objective

Relevant: #15208

Solution

I went ahead and added the variadics documentation in all applicable locations.

Testing

  • I built the documentation and inspected it to see whether the feature is there.

@BenjaminBrienen
Copy link
Contributor Author

@bash do you know why this isn't working? I added the marker attribute but the documentation doesn't have the new look.

@bash
Copy link
Contributor

bash commented Sep 23, 2024

@BenjaminBrienen What command did you use to build the docs? There's some RUSTFLAGS / RUSTDOCFLAGS needed. See #14820 (comment)

@bash
Copy link
Contributor

bash commented Sep 23, 2024

Btw #[doc(fake_variadic)] only works on "variadic" tuples or "variadic" fn pointers. It doesn't work more complex types like SystemState<(T1, T2, ...) unfortunately.

@BenjaminBrienen BenjaminBrienen marked this pull request as ready for review September 23, 2024 14:14
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Sep 23, 2024
@alice-i-cecile alice-i-cecile added C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Reflection Runtime information about types D-Trivial Nice and easy! A great choice to get started with Bevy labels Sep 23, 2024
@MrGVSV
Copy link
Member

MrGVSV commented Sep 23, 2024

Btw #[doc(fake_variadic)] only works on "variadic" tuples or "variadic" fn pointers. It doesn't work more complex types like SystemState<(T1, T2, ...) unfortunately.

Yeah I'm getting an error when attempting to build locally:

error: `#[doc(fake_variadic)]` must be used on the first of a set of tuple or fn pointer trait impls with varying arity
   --> crates/bevy_reflect/src/func/info.rs:334:1
    |
334 | / all_tuples!(
335 | |     #[doc(fake_variadic)]
336 | |     impl_typed_function,
337 | |     0,
...   |
340 | |     arg
341 | | );
    | |_^
    |
    = note: this error originates in the macro `all_tuples` (in Nightly builds, run with -Z macro-backtrace for more info)

@alice-i-cecile alice-i-cecile added D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Sep 23, 2024
Copy link
Member

@MrGVSV MrGVSV left a comment

Choose a reason for hiding this comment

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

CI is passing, but I don't know if it builds with the right flags set. Some of these are failing to build docs (likely due to the type being annotated like @bash mentioned).

@alice-i-cecile alice-i-cecile added S-Needs-Review Needs reviewer attention (from anyone!) to move forward and removed S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Sep 23, 2024
@alice-i-cecile alice-i-cecile added S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 24, 2024
@BenjaminBrienen
Copy link
Contributor Author

@alice-i-cecile I'm ready for this to be reviewed again

Btw #[doc(fake_variadic)] only works on "variadic" tuples or "variadic" fn pointers. It doesn't work more complex types like SystemState<(T1, T2, ...) unfortunately.

Yeah I'm getting an error when attempting to build locally:

error: `#[doc(fake_variadic)]` must be used on the first of a set of tuple or fn pointer trait impls with varying arity
   --> crates/bevy_reflect/src/func/info.rs:334:1
    |
334 | / all_tuples!(
335 | |     #[doc(fake_variadic)]
336 | |     impl_typed_function,
337 | |     0,
...   |
340 | |     arg
341 | | );
    | |_^
    |
    = note: this error originates in the macro `all_tuples` (in Nightly builds, run with -Z macro-backtrace for more info)
PS C:\Users\BenjaminBrienen\source\bevy> set RUSTFLAGS='--cfg docsrs_dep' && set RUSTDOCFLAGS='--cfg=docsrs' && cargo +nightly doc
    Updating crates.io index
     Locking 6 packages to latest compatible versions
      Adding assert_type_match v0.1.1
    Updating encase v0.9.0 -> v0.10.0
    Updating encase_derive v0.9.0 -> v0.10.0
      Adding encase_derive_impl v0.10.0
    Updating glam v0.28.0 -> v0.29.0
    Updating hexasphere v14.1.0 -> v15.0.0
    Blocking waiting for file lock on package cache
    Checking bevy_ptr v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_ptr)
    Checking disqualified v1.0.0
   Compiling bevy_macro_utils v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_macro_utils)
   Compiling bevy_utils_proc_macros v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_utils\macros)
   Compiling assert_type_match v0.1.1
    Checking bevy_tasks v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_tasks)
    Checking glam v0.29.0
 Documenting bevy_macro_utils v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_macro_utils)
 Documenting glam v0.29.0
 Documenting bevy_utils_proc_macros v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_utils\macros)
 Documenting assert_type_match v0.1.1
 Documenting disqualified v1.0.0
 Documenting bevy_ptr v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_ptr)
   Compiling encase_derive_impl v0.10.0
 Documenting bevy_tasks v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_tasks)
   Compiling rustix v0.38.37
    Checking errno v0.3.9
 Documenting encase_derive_impl v0.10.0
    Checking polling v3.7.3
    Checking bytes v1.7.1
    Checking pin-utils v0.1.0
    Checking futures-task v0.3.30
   Compiling httparse v1.9.4
    Checking bevy_utils v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_utils)
   Compiling bevy_reflect_derive v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_reflect\derive)
   Compiling bevy_ecs_macros v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_ecs\macros)
   Compiling bevy_derive v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_derive)
   Compiling encase_derive v0.10.0
   Compiling bevy_asset_macros v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_asset\macros)
   Compiling bevy_encase_derive v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_encase_derive)
   Compiling bevy_render_macros v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_render\macros)
    Checking http v1.1.0
    Checking futures-util v0.3.30
 Documenting errno v0.3.9
    Checking futures-channel v0.3.30
    Checking tokio v1.40.0
    Checking httpdate v1.0.3                                                                                                                                                                                       
 Documenting bevy_reflect_derive v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_reflect\derive)
 Documenting bevy_ecs_macros v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_ecs\macros)                                                                                                             
 Documenting bevy_derive v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_derive)                                                                                                                     
 Documenting bevy_utils v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_utils)                                                                                                                       
 Documenting bevy_asset_macros v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_asset\macros)                                                                                                         
 Documenting bevy_render_macros v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_render\macros)
    Checking async-io v2.3.4                                                                                                                                                                                       
    Checking http-body v1.0.1                                                                                                                                                                                      
 Documenting polling v3.7.3
   Compiling anyhow v1.0.89                                                                                                                                                                                        
 Documenting bytes v1.7.1                                                                                                                                                                                          
    Checking hyper v1.4.1
    Checking async-process v2.3.0                                                                                                                                                                                  
    Checking async-net v2.0.0
 Documenting futures-task v0.3.30                                                                                                                                                                                  
 Documenting pin-utils v0.1.0
    Checking smol v2.0.2
    Checking smol-hyper v0.1.1                                                                                                                                                                                     
    Checking http-body-util v0.1.2
 Documenting httparse v1.9.4                                                                                                                                                                                       
   Compiling bevy_state_macros v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_state\macros)
   Compiling bevy_gizmos_macros v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_gizmos\macros)                                                                                                       
 Documenting futures-channel v0.3.30                                                                                                                                                                               
 Documenting tokio v1.40.0                                                                                                                                                                                         
    Checking bevy_reflect v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_reflect)                                                                                                                   
    Checking encase v0.10.0                                                                                                                                                                                        
    Checking bevy_mikktspace v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_mikktspace)                                                                                                             
    Checking hexasphere v15.0.0                                                                                                                                                                                    
 Documenting httpdate v1.0.3                                                                                                                                                                                       
 Documenting anyhow v1.0.89                                                                                                                                                                                        
    Checking bevy_ecs v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_ecs)                                                                                                                           
    Checking bevy_math v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_math)                                                                                                                         
 Documenting encase_derive v0.10.0                                                                                                                                                                                 
 Documenting bevy_encase_derive v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_encase_derive)                                                                                                       
 Documenting rustix v0.38.37                                                                                                                                                                                       
    Checking bevy_color v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_color)                                                                                                                       
 Documenting bevy_gizmos_macros v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_gizmos\macros)                                                                                                       
    Checking bevy_app v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_app)                                                                                                                           
    Checking bevy_core v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_core)                                                                                                                         
    Checking bevy_input v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_input)                                                                                                                       
    Checking bevy_time v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_time)                                                                                                                         
    Checking bevy_hierarchy v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_hierarchy)                                                                                                               
    Checking bevy_a11y v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_a11y)                                                                                                                         
    Checking bevy_asset v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_asset)                                                                                                                       
    Checking bevy_log v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_log)                                                                                                                           
    Checking bevy_transform v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_transform)                                                                                                               
    Checking bevy_diagnostic v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_diagnostic)                                                                                                             
    Checking bevy_remote v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_remote)                                                                                                                     
    Checking bevy_state v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_state)                                                                                                                       
 Documenting bevy_state_macros v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_state\macros)                                                                                                         
    Checking bevy_window v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_window)                                                                                                                     
    Checking bevy_audio v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_audio)                                                                                                                       
    Checking bevy_winit v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_winit)                                                                                                                       
    Checking bevy_gilrs v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_gilrs)                                                                                                                       
    Checking bevy_render v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_render)                                                                                                                     
 Documenting http v1.1.0                                                                                                                                                                                           
    Checking bevy_core_pipeline v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_core_pipeline)                                                                                                       
    Checking bevy_picking v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_picking)
    Checking bevy_scene v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_scene)
 Documenting bevy_reflect v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_reflect)                                                                                                                   
 Documenting bevy_mikktspace v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_mikktspace)
 Documenting hexasphere v15.0.0
warning: unresolved link to `crate::func::Function`                                                                                                                                                                
   --> crates\bevy_reflect\src\lib.rs:523:19
    |
523 | //! [`Function`]: crate::func::Function
    |                   ^^^^^^^^^^^^^^^^^^^^^ no item named `func` in module `bevy_reflect`
    |
    = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default

    Checking bevy_sprite v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_sprite)                                                                                                                     
    Checking bevy_pbr v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_pbr)
 Documenting futures-util v0.3.30                                                                                                                                                                                  
    Checking bevy_text v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_text)                                                                                                                         
    Checking bevy_ui v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_ui)                                                                                                                             
    Checking bevy_gizmos v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_gizmos)                                                                                                                     
    Checking bevy_animation v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_animation)                                                                                                               
    Checking bevy_gltf v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_gltf)                                                                                                                         
    Checking bevy_internal v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_internal)                                                                                                                 
 Documenting encase v0.10.0                                                                                                                                                                                        
 Documenting async-io v2.3.4                                                                                                                                                                                       
 Documenting http-body v1.0.1                                                                                                                                                                                      
warning: `bevy_reflect` (lib doc) generated 1 warning
 Documenting bevy_ecs v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_ecs)
 Documenting bevy_math v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_math)
 Documenting async-net v2.0.0
 Documenting async-process v2.3.0
 Documenting hyper v1.4.1
 Documenting http-body-util v0.1.2
 Documenting bevy_color v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_color)
 Documenting bevy_app v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_app)
 Documenting smol v2.0.2
 Documenting smol-hyper v0.1.1
 Documenting bevy_core v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_core)
 Documenting bevy_input v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_input)
 Documenting bevy_a11y v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_a11y)
 Documenting bevy_time v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_time)
 Documenting bevy_log v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_log)
 Documenting bevy_asset v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_asset)
 Documenting bevy_hierarchy v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_hierarchy)
 Documenting bevy_diagnostic v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_diagnostic)
 Documenting bevy_window v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_window)
 Documenting bevy_gilrs v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_gilrs)
 Documenting bevy_transform v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_transform)
 Documenting bevy_state v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_state)
 Documenting bevy_remote v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_remote)
 Documenting bevy_winit v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_winit)
 Documenting bevy_audio v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_audio)
 Documenting bevy_render v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_render)
 Documenting bevy_core_pipeline v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_core_pipeline)
 Documenting bevy_picking v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_picking)
 Documenting bevy_scene v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_scene)
 Documenting bevy_sprite v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_sprite)
 Documenting bevy_pbr v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_pbr)
warning: unresolved link to `StandardMaterial::anisotropy_texture`
   --> crates\bevy_pbr\src\pbr_material.rs:505:11
    |
505 |     /// [`StandardMaterial::anisotropy_texture`].
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the struct `StandardMaterial` has no field or associated item named `anisotropy_texture`
    |
    = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default

 Documenting bevy_text v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_text)
warning: `bevy_pbr` (lib doc) generated 1 warning
 Documenting bevy_gizmos v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_gizmos)
 Documenting bevy_ui v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_ui)
 Documenting bevy_animation v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_animation)
 Documenting bevy_gltf v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_gltf)
 Documenting bevy_internal v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy\crates\bevy_internal)
 Documenting bevy v0.15.0-dev (C:\Users\BenjaminBrienen\source\bevy)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 8m 59s
   Generated C:\Users\BenjaminBrienen\source\bevy\target\doc\bevy\index.html
PS C:\Users\BenjaminBrienen\source\bevy> set RUSTFLAGS='--cfg docsrs_dep' && set RUSTDOCFLAGS='--cfg=docsrs' && cargo +nightly doc
warning: unresolved link to `crate::func::Function`
   --> crates\bevy_reflect\src\lib.rs:523:19
    |
523 | //! [`Function`]: crate::func::Function
    |                   ^^^^^^^^^^^^^^^^^^^^^ no item named `func` in module `bevy_reflect`
    |
    = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default

warning: `bevy_reflect` (lib doc) generated 1 warning
warning: unresolved link to `StandardMaterial::anisotropy_texture`
   --> crates\bevy_pbr\src\pbr_material.rs:505:11
    |
505 |     /// [`StandardMaterial::anisotropy_texture`].
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the struct `StandardMaterial` has no field or associated item named `anisotropy_texture`
    |
    = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default

warning: `bevy_pbr` (lib doc) generated 1 warning
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.79s
   Generated C:\Users\BenjaminBrienen\source\bevy\target\doc\bevy\index.html

Copy link
Contributor

@bash bash left a comment

Choose a reason for hiding this comment

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

The latest commit still fails for me with with various error: #[doc(fake_variadic)] must be used on the first of a set of tuple or fn pointer trait impls with varying aritys.

I'm using the latest nightly (2024-09-24) and the following command to build: RUSTFLAGS='--cfg docsrs_dep' RUSTDOCFLAGS='--cfg=docsrs' cargo +nightly doc

Maybe the command that you used didn't correctly export the env vars?

set RUSTFLAGS='--cfg docsrs_dep' && set RUSTDOCFLAGS='--cfg=docsrs' && cargo +nightly doc

If you're using fish you can either use the posix-style syntax that I used above or you have to use set -x to get the variable exported iirc.

@BenjaminBrienen
Copy link
Contributor Author

Maybe the command that you used didn't correctly export the env vars?

Ah, this command did the trick:
$env:RUSTFLAGS='--cfg docsrs_dep'; $env:RUSTDOCFLAGS='--cfg=docsrs'; cargo +nightly doc

Fixing the errors now!

@BenjaminBrienen
Copy link
Contributor Author

The docs generate successfully for me now

@BenjaminBrienen
Copy link
Contributor Author

image

@alice-i-cecile alice-i-cecile removed the S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged label Sep 25, 2024
@BenjaminBrienen BenjaminBrienen force-pushed the Add-fake-variadics-to-Reflect-impls branch from 5220d47 to 06a681a Compare September 27, 2024 12:36
Copy link
Contributor

@13ros27 13ros27 left a comment

Choose a reason for hiding this comment

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

Feel free to ignore (and mark resolved) the whitespace issues
EDIT: Sorry, didn't mean to request changes (I blame gh mobile lol)

@@ -1,4 +1,6 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
// `rustdoc_internals` is needed for `#[doc(fake_variadics)]`
#![allow(internal_features)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this only be enabled on docsrs and maybe docsrs_dep to prevent the miniscule chance of it accidentally being depended on elsewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's what I have there, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant that maybe internal_features should also be under a cfg_attr, should have been clearer

@13ros27
Copy link
Contributor

13ros27 commented Sep 27, 2024

I'm also unsure where impl_system_function came from as that appears to be new? I presume it was implemented somewhere before?

@BenjaminBrienen BenjaminBrienen added S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 27, 2024
@BenjaminBrienen
Copy link
Contributor Author

Changes have been cleaned up. No idea how some of that happened lol.

@@ -671,6 +671,7 @@ impl_reflect_tuple! {0: A, 1: B, 2: C, 3: D, 4: E, 5: F, 6: G, 7: H, 8: I, 9: J,

macro_rules! impl_type_path_tuple {
($(#[$meta:meta])*) => {
$(#[$meta])*
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can remove this if wanted

@alice-i-cecile alice-i-cecile added S-Needs-Review Needs reviewer attention (from anyone!) to move forward and removed S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Sep 29, 2024
@MrGVSV
Copy link
Member

MrGVSV commented Sep 29, 2024

Can you verify that these are working for IntoReturn, GetOwnership, and FromArg? I'm not getting any errors, but my generated docs aren't rendering it properly.

It's probably a me thing, since TypePath also doesn't render correctly.

Copy link
Contributor

@13ros27 13ros27 left a comment

Choose a reason for hiding this comment

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

I haven't tried generating the docs myself (afk) but visually it all looks good to me, thanks for fixing the formatting

@bushrat011899 bushrat011899 added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Oct 2, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Oct 2, 2024
Merged via the queue into bevyengine:main with commit c841dd9 Oct 2, 2024
28 checks passed
robtfm pushed a commit to robtfm/bevy that referenced this pull request Oct 4, 2024
# Objective

Relevant: bevyengine#15208

## Solution

I went ahead and added the variadics documentation in all applicable
locations.

## Testing

- I built the documentation and inspected it to see whether the feature
is there.
@BenjaminBrienen BenjaminBrienen deleted the Add-fake-variadics-to-Reflect-impls branch October 15, 2024 20:33
@BenjaminBrienen BenjaminBrienen removed the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Reflection Runtime information about types C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants