From a36440512cb8a41732dd4b28cbdf87b533ee663c Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Tue, 17 Oct 2023 15:27:59 +0200 Subject: [PATCH] Make codegen I/O-free and agnostic to output location (#3888) **Commit by commit** This is necessary refactoring work for the upcoming `attr.rust.custom_crate` attribute, itself necessary for the upcoming serde-codegen support, itself necessary for the upcoming blueprint experimentations as well as #3741. ### Changes 1. The `CodeGenerator` trait as well as all post-processing helpers (gitattributes, orphan detection...) are now I/O-free. ```rust pub type GeneratedFiles = std::collections::BTreeMap; pub trait CodeGenerator { fn generate( &mut self, reporter: &crate::Reporter, objects: &crate::Objects, arrow_registry: &crate::ArrowRegistry, ) -> GeneratedFiles; } ``` 2. All post-processing helpers are now agnostic to the location output. This is very important as it makes it possible to generate e.g. rust code out of the `re_types` crate without everything crumbling down. A side-effect is that gitattributes files are now finer-grained. 3. The Rust codegen pass is now crate agnostic: it is driven by the workspace path rather than a specific crate path. Necessary for the upcoming `attr.rust.custom_crate`. 4. All codegen passes now follow the exact same 4-step structure: ``` // 1. Generate in-memory code files. let mut gen = MyGenerator::new(); let mut files = gen.generate(reporter, objects, arrow_registry); // 2. Generate in-memory attribute files. generate_gitattributes_for_generated_files(&mut files); // 3. Write all in-memory files to disk. write_files(&gen.pkg_path, &gen.testing_pkg_path, &files); // 4. Remove orphaned files. crate::codegen::common::remove_orphaned_files(reporter, &files); ``` 5. The documentation codegen pass now removes its orphans, which is why some `md` files were removed in this PR. --- - Unblocks #3741 - Unblocks https://github.com/rerun-io/rerun/issues/3495 --- crates/re_types/.gitattributes | 133 -------- crates/re_types/src/archetypes/.gitattributes | 27 ++ crates/re_types/src/blueprint/.gitattributes | 6 + crates/re_types/src/components/.gitattributes | 36 ++ crates/re_types/src/datatypes/.gitattributes | 34 ++ .../src/testing/archetypes/.gitattributes | 8 + crates/re_types/src/testing/blueprint/mod.rs | 1 - .../src/testing/components/.gitattributes | 25 ++ .../src/testing/datatypes/.gitattributes | 14 + .../src/bin/build_re_types.rs | 4 +- crates/re_types_builder/src/codegen/common.rs | 105 +++--- .../re_types_builder/src/codegen/cpp/mod.rs | 46 +-- .../re_types_builder/src/codegen/docs/mod.rs | 14 +- crates/re_types_builder/src/codegen/mod.rs | 10 +- crates/re_types_builder/src/codegen/python.rs | 138 +------- .../re_types_builder/src/codegen/rust/api.rs | 126 ++----- crates/re_types_builder/src/lib.rs | 312 +++++++++++++++--- docs/content/reference/types/.gitattributes | 85 ----- .../reference/types/archetypes/.gitattributes | 26 ++ .../reference/types/components/.gitattributes | 35 ++ .../reference/types/components/origin2d.md | 11 - .../reference/types/components/origin3d.md | 14 - .../reference/types/datatypes/.gitattributes | 33 ++ .../reference/types/datatypes/color.md | 16 - rerun_cpp/.gitattributes | 255 -------------- rerun_cpp/src/.gitattributes | 146 -------- rerun_cpp/src/rerun/.gitattributes | 169 +--------- rerun_cpp/src/rerun/archetypes/.gitattributes | 49 +++ rerun_cpp/src/rerun/blueprint/.gitattributes | 7 + rerun_cpp/src/rerun/components/.gitattributes | 67 ++++ rerun_cpp/src/rerun/datatypes/.gitattributes | 63 ++++ rerun_cpp/tests/generated/.gitattributes | 7 + .../tests/generated/archetypes/.gitattributes | 11 + .../tests/generated/components/.gitattributes | 45 +++ .../tests/generated/datatypes/.gitattributes | 23 ++ rerun_py/rerun_sdk/rerun/.gitattributes | 94 ------ .../rerun_sdk/rerun/archetypes/.gitattributes | 27 ++ .../rerun_sdk/rerun/blueprint/.gitattributes | 6 + .../rerun_sdk/rerun/components/.gitattributes | 36 ++ .../rerun_sdk/rerun/datatypes/.gitattributes | 34 ++ rerun_py/tests/test_types/.gitattributes | 42 --- .../test_types/archetypes/.gitattributes | 8 + .../tests/test_types/blueprint/.gitattributes | 4 + .../test_types/components/.gitattributes | 25 ++ .../tests/test_types/datatypes/.gitattributes | 14 + 45 files changed, 1063 insertions(+), 1328 deletions(-) delete mode 100644 crates/re_types/.gitattributes create mode 100644 crates/re_types/src/archetypes/.gitattributes create mode 100644 crates/re_types/src/blueprint/.gitattributes create mode 100644 crates/re_types/src/components/.gitattributes create mode 100644 crates/re_types/src/datatypes/.gitattributes create mode 100644 crates/re_types/src/testing/archetypes/.gitattributes delete mode 100644 crates/re_types/src/testing/blueprint/mod.rs create mode 100644 crates/re_types/src/testing/components/.gitattributes create mode 100644 crates/re_types/src/testing/datatypes/.gitattributes create mode 100644 docs/content/reference/types/archetypes/.gitattributes create mode 100644 docs/content/reference/types/components/.gitattributes delete mode 100644 docs/content/reference/types/components/origin2d.md delete mode 100644 docs/content/reference/types/components/origin3d.md create mode 100644 docs/content/reference/types/datatypes/.gitattributes delete mode 100644 docs/content/reference/types/datatypes/color.md delete mode 100644 rerun_cpp/.gitattributes delete mode 100644 rerun_cpp/src/.gitattributes create mode 100644 rerun_cpp/src/rerun/archetypes/.gitattributes create mode 100644 rerun_cpp/src/rerun/blueprint/.gitattributes create mode 100644 rerun_cpp/src/rerun/components/.gitattributes create mode 100644 rerun_cpp/src/rerun/datatypes/.gitattributes create mode 100644 rerun_cpp/tests/generated/.gitattributes create mode 100644 rerun_cpp/tests/generated/archetypes/.gitattributes create mode 100644 rerun_cpp/tests/generated/components/.gitattributes create mode 100644 rerun_cpp/tests/generated/datatypes/.gitattributes delete mode 100644 rerun_py/rerun_sdk/rerun/.gitattributes create mode 100644 rerun_py/rerun_sdk/rerun/archetypes/.gitattributes create mode 100644 rerun_py/rerun_sdk/rerun/blueprint/.gitattributes create mode 100644 rerun_py/rerun_sdk/rerun/components/.gitattributes create mode 100644 rerun_py/rerun_sdk/rerun/datatypes/.gitattributes delete mode 100644 rerun_py/tests/test_types/.gitattributes create mode 100644 rerun_py/tests/test_types/archetypes/.gitattributes create mode 100644 rerun_py/tests/test_types/blueprint/.gitattributes create mode 100644 rerun_py/tests/test_types/components/.gitattributes create mode 100644 rerun_py/tests/test_types/datatypes/.gitattributes diff --git a/crates/re_types/.gitattributes b/crates/re_types/.gitattributes deleted file mode 100644 index 184fa46b078d..000000000000 --- a/crates/re_types/.gitattributes +++ /dev/null @@ -1,133 +0,0 @@ -# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs - -.gitattributes linguist-generated=true -src/archetypes/annotation_context.rs linguist-generated=true -src/archetypes/arrows3d.rs linguist-generated=true -src/archetypes/asset3d.rs linguist-generated=true -src/archetypes/bar_chart.rs linguist-generated=true -src/archetypes/boxes2d.rs linguist-generated=true -src/archetypes/boxes3d.rs linguist-generated=true -src/archetypes/clear.rs linguist-generated=true -src/archetypes/depth_image.rs linguist-generated=true -src/archetypes/disconnected_space.rs linguist-generated=true -src/archetypes/image.rs linguist-generated=true -src/archetypes/line_strips2d.rs linguist-generated=true -src/archetypes/line_strips3d.rs linguist-generated=true -src/archetypes/mesh3d.rs linguist-generated=true -src/archetypes/mod.rs linguist-generated=true -src/archetypes/pinhole.rs linguist-generated=true -src/archetypes/points2d.rs linguist-generated=true -src/archetypes/points3d.rs linguist-generated=true -src/archetypes/segmentation_image.rs linguist-generated=true -src/archetypes/tensor.rs linguist-generated=true -src/archetypes/text_document.rs linguist-generated=true -src/archetypes/text_log.rs linguist-generated=true -src/archetypes/time_series_scalar.rs linguist-generated=true -src/archetypes/transform3d.rs linguist-generated=true -src/archetypes/view_coordinates.rs linguist-generated=true -src/blueprint/auto_space_views.rs linguist-generated=true -src/blueprint/mod.rs linguist-generated=true -src/blueprint/panel_view.rs linguist-generated=true -src/components/annotation_context.rs linguist-generated=true -src/components/blob.rs linguist-generated=true -src/components/class_id.rs linguist-generated=true -src/components/clear_is_recursive.rs linguist-generated=true -src/components/color.rs linguist-generated=true -src/components/depth_meter.rs linguist-generated=true -src/components/disconnected_space.rs linguist-generated=true -src/components/draw_order.rs linguist-generated=true -src/components/half_sizes2d.rs linguist-generated=true -src/components/half_sizes3d.rs linguist-generated=true -src/components/instance_key.rs linguist-generated=true -src/components/keypoint_id.rs linguist-generated=true -src/components/line_strip2d.rs linguist-generated=true -src/components/line_strip3d.rs linguist-generated=true -src/components/material.rs linguist-generated=true -src/components/media_type.rs linguist-generated=true -src/components/mesh_properties.rs linguist-generated=true -src/components/mod.rs linguist-generated=true -src/components/out_of_tree_transform3d.rs linguist-generated=true -src/components/pinhole_projection.rs linguist-generated=true -src/components/position2d.rs linguist-generated=true -src/components/position3d.rs linguist-generated=true -src/components/radius.rs linguist-generated=true -src/components/resolution.rs linguist-generated=true -src/components/rotation3d.rs linguist-generated=true -src/components/scalar.rs linguist-generated=true -src/components/scalar_scattering.rs linguist-generated=true -src/components/tensor_data.rs linguist-generated=true -src/components/text.rs linguist-generated=true -src/components/text_log_level.rs linguist-generated=true -src/components/transform3d.rs linguist-generated=true -src/components/vector3d.rs linguist-generated=true -src/components/view_coordinates.rs linguist-generated=true -src/datatypes/angle.rs linguist-generated=true -src/datatypes/annotation_info.rs linguist-generated=true -src/datatypes/class_description.rs linguist-generated=true -src/datatypes/class_description_map_elem.rs linguist-generated=true -src/datatypes/class_id.rs linguist-generated=true -src/datatypes/float32.rs linguist-generated=true -src/datatypes/keypoint_id.rs linguist-generated=true -src/datatypes/keypoint_pair.rs linguist-generated=true -src/datatypes/mat3x3.rs linguist-generated=true -src/datatypes/mat4x4.rs linguist-generated=true -src/datatypes/material.rs linguist-generated=true -src/datatypes/mesh_properties.rs linguist-generated=true -src/datatypes/mod.rs linguist-generated=true -src/datatypes/quaternion.rs linguist-generated=true -src/datatypes/rgba32.rs linguist-generated=true -src/datatypes/rotation3d.rs linguist-generated=true -src/datatypes/rotation_axis_angle.rs linguist-generated=true -src/datatypes/scale3d.rs linguist-generated=true -src/datatypes/tensor_buffer.rs linguist-generated=true -src/datatypes/tensor_data.rs linguist-generated=true -src/datatypes/tensor_dimension.rs linguist-generated=true -src/datatypes/transform3d.rs linguist-generated=true -src/datatypes/translation_and_mat3x3.rs linguist-generated=true -src/datatypes/translation_rotation_scale3d.rs linguist-generated=true -src/datatypes/utf8.rs linguist-generated=true -src/datatypes/uvec2d.rs linguist-generated=true -src/datatypes/uvec3d.rs linguist-generated=true -src/datatypes/uvec4d.rs linguist-generated=true -src/datatypes/vec2d.rs linguist-generated=true -src/datatypes/vec3d.rs linguist-generated=true -src/datatypes/vec4d.rs linguist-generated=true -src/testing/archetypes/affix_fuzzer1.rs linguist-generated=true -src/testing/archetypes/affix_fuzzer2.rs linguist-generated=true -src/testing/archetypes/affix_fuzzer3.rs linguist-generated=true -src/testing/archetypes/affix_fuzzer4.rs linguist-generated=true -src/testing/archetypes/mod.rs linguist-generated=true -src/testing/blueprint/mod.rs linguist-generated=true -src/testing/components/affix_fuzzer1.rs linguist-generated=true -src/testing/components/affix_fuzzer10.rs linguist-generated=true -src/testing/components/affix_fuzzer11.rs linguist-generated=true -src/testing/components/affix_fuzzer12.rs linguist-generated=true -src/testing/components/affix_fuzzer13.rs linguist-generated=true -src/testing/components/affix_fuzzer14.rs linguist-generated=true -src/testing/components/affix_fuzzer15.rs linguist-generated=true -src/testing/components/affix_fuzzer16.rs linguist-generated=true -src/testing/components/affix_fuzzer17.rs linguist-generated=true -src/testing/components/affix_fuzzer18.rs linguist-generated=true -src/testing/components/affix_fuzzer19.rs linguist-generated=true -src/testing/components/affix_fuzzer2.rs linguist-generated=true -src/testing/components/affix_fuzzer20.rs linguist-generated=true -src/testing/components/affix_fuzzer21.rs linguist-generated=true -src/testing/components/affix_fuzzer3.rs linguist-generated=true -src/testing/components/affix_fuzzer4.rs linguist-generated=true -src/testing/components/affix_fuzzer5.rs linguist-generated=true -src/testing/components/affix_fuzzer6.rs linguist-generated=true -src/testing/components/affix_fuzzer7.rs linguist-generated=true -src/testing/components/affix_fuzzer8.rs linguist-generated=true -src/testing/components/affix_fuzzer9.rs linguist-generated=true -src/testing/components/mod.rs linguist-generated=true -src/testing/datatypes/affix_fuzzer1.rs linguist-generated=true -src/testing/datatypes/affix_fuzzer2.rs linguist-generated=true -src/testing/datatypes/affix_fuzzer20.rs linguist-generated=true -src/testing/datatypes/affix_fuzzer21.rs linguist-generated=true -src/testing/datatypes/affix_fuzzer3.rs linguist-generated=true -src/testing/datatypes/affix_fuzzer4.rs linguist-generated=true -src/testing/datatypes/affix_fuzzer5.rs linguist-generated=true -src/testing/datatypes/flattened_scalar.rs linguist-generated=true -src/testing/datatypes/mod.rs linguist-generated=true -src/testing/datatypes/primitive_component.rs linguist-generated=true -src/testing/datatypes/string_component.rs linguist-generated=true diff --git a/crates/re_types/src/archetypes/.gitattributes b/crates/re_types/src/archetypes/.gitattributes new file mode 100644 index 000000000000..4b6035b6779b --- /dev/null +++ b/crates/re_types/src/archetypes/.gitattributes @@ -0,0 +1,27 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +annotation_context.rs linguist-generated=true +arrows3d.rs linguist-generated=true +asset3d.rs linguist-generated=true +bar_chart.rs linguist-generated=true +boxes2d.rs linguist-generated=true +boxes3d.rs linguist-generated=true +clear.rs linguist-generated=true +depth_image.rs linguist-generated=true +disconnected_space.rs linguist-generated=true +image.rs linguist-generated=true +line_strips2d.rs linguist-generated=true +line_strips3d.rs linguist-generated=true +mesh3d.rs linguist-generated=true +mod.rs linguist-generated=true +pinhole.rs linguist-generated=true +points2d.rs linguist-generated=true +points3d.rs linguist-generated=true +segmentation_image.rs linguist-generated=true +tensor.rs linguist-generated=true +text_document.rs linguist-generated=true +text_log.rs linguist-generated=true +time_series_scalar.rs linguist-generated=true +transform3d.rs linguist-generated=true +view_coordinates.rs linguist-generated=true diff --git a/crates/re_types/src/blueprint/.gitattributes b/crates/re_types/src/blueprint/.gitattributes new file mode 100644 index 000000000000..b46991b3b487 --- /dev/null +++ b/crates/re_types/src/blueprint/.gitattributes @@ -0,0 +1,6 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +auto_space_views.rs linguist-generated=true +mod.rs linguist-generated=true +panel_view.rs linguist-generated=true diff --git a/crates/re_types/src/components/.gitattributes b/crates/re_types/src/components/.gitattributes new file mode 100644 index 000000000000..0392b9d5b928 --- /dev/null +++ b/crates/re_types/src/components/.gitattributes @@ -0,0 +1,36 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +annotation_context.rs linguist-generated=true +blob.rs linguist-generated=true +class_id.rs linguist-generated=true +clear_is_recursive.rs linguist-generated=true +color.rs linguist-generated=true +depth_meter.rs linguist-generated=true +disconnected_space.rs linguist-generated=true +draw_order.rs linguist-generated=true +half_sizes2d.rs linguist-generated=true +half_sizes3d.rs linguist-generated=true +instance_key.rs linguist-generated=true +keypoint_id.rs linguist-generated=true +line_strip2d.rs linguist-generated=true +line_strip3d.rs linguist-generated=true +material.rs linguist-generated=true +media_type.rs linguist-generated=true +mesh_properties.rs linguist-generated=true +mod.rs linguist-generated=true +out_of_tree_transform3d.rs linguist-generated=true +pinhole_projection.rs linguist-generated=true +position2d.rs linguist-generated=true +position3d.rs linguist-generated=true +radius.rs linguist-generated=true +resolution.rs linguist-generated=true +rotation3d.rs linguist-generated=true +scalar.rs linguist-generated=true +scalar_scattering.rs linguist-generated=true +tensor_data.rs linguist-generated=true +text.rs linguist-generated=true +text_log_level.rs linguist-generated=true +transform3d.rs linguist-generated=true +vector3d.rs linguist-generated=true +view_coordinates.rs linguist-generated=true diff --git a/crates/re_types/src/datatypes/.gitattributes b/crates/re_types/src/datatypes/.gitattributes new file mode 100644 index 000000000000..fef3075e51ac --- /dev/null +++ b/crates/re_types/src/datatypes/.gitattributes @@ -0,0 +1,34 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +angle.rs linguist-generated=true +annotation_info.rs linguist-generated=true +class_description.rs linguist-generated=true +class_description_map_elem.rs linguist-generated=true +class_id.rs linguist-generated=true +float32.rs linguist-generated=true +keypoint_id.rs linguist-generated=true +keypoint_pair.rs linguist-generated=true +mat3x3.rs linguist-generated=true +mat4x4.rs linguist-generated=true +material.rs linguist-generated=true +mesh_properties.rs linguist-generated=true +mod.rs linguist-generated=true +quaternion.rs linguist-generated=true +rgba32.rs linguist-generated=true +rotation3d.rs linguist-generated=true +rotation_axis_angle.rs linguist-generated=true +scale3d.rs linguist-generated=true +tensor_buffer.rs linguist-generated=true +tensor_data.rs linguist-generated=true +tensor_dimension.rs linguist-generated=true +transform3d.rs linguist-generated=true +translation_and_mat3x3.rs linguist-generated=true +translation_rotation_scale3d.rs linguist-generated=true +utf8.rs linguist-generated=true +uvec2d.rs linguist-generated=true +uvec3d.rs linguist-generated=true +uvec4d.rs linguist-generated=true +vec2d.rs linguist-generated=true +vec3d.rs linguist-generated=true +vec4d.rs linguist-generated=true diff --git a/crates/re_types/src/testing/archetypes/.gitattributes b/crates/re_types/src/testing/archetypes/.gitattributes new file mode 100644 index 000000000000..e18df19294f5 --- /dev/null +++ b/crates/re_types/src/testing/archetypes/.gitattributes @@ -0,0 +1,8 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +affix_fuzzer1.rs linguist-generated=true +affix_fuzzer2.rs linguist-generated=true +affix_fuzzer3.rs linguist-generated=true +affix_fuzzer4.rs linguist-generated=true +mod.rs linguist-generated=true diff --git a/crates/re_types/src/testing/blueprint/mod.rs b/crates/re_types/src/testing/blueprint/mod.rs deleted file mode 100644 index 3cb8e2ec35f1..000000000000 --- a/crates/re_types/src/testing/blueprint/mod.rs +++ /dev/null @@ -1 +0,0 @@ -// DO NOT EDIT! This file was auto-generated by crates/re_types_builder/src/codegen/rust/api.rs diff --git a/crates/re_types/src/testing/components/.gitattributes b/crates/re_types/src/testing/components/.gitattributes new file mode 100644 index 000000000000..0406bdfb500c --- /dev/null +++ b/crates/re_types/src/testing/components/.gitattributes @@ -0,0 +1,25 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +affix_fuzzer1.rs linguist-generated=true +affix_fuzzer10.rs linguist-generated=true +affix_fuzzer11.rs linguist-generated=true +affix_fuzzer12.rs linguist-generated=true +affix_fuzzer13.rs linguist-generated=true +affix_fuzzer14.rs linguist-generated=true +affix_fuzzer15.rs linguist-generated=true +affix_fuzzer16.rs linguist-generated=true +affix_fuzzer17.rs linguist-generated=true +affix_fuzzer18.rs linguist-generated=true +affix_fuzzer19.rs linguist-generated=true +affix_fuzzer2.rs linguist-generated=true +affix_fuzzer20.rs linguist-generated=true +affix_fuzzer21.rs linguist-generated=true +affix_fuzzer3.rs linguist-generated=true +affix_fuzzer4.rs linguist-generated=true +affix_fuzzer5.rs linguist-generated=true +affix_fuzzer6.rs linguist-generated=true +affix_fuzzer7.rs linguist-generated=true +affix_fuzzer8.rs linguist-generated=true +affix_fuzzer9.rs linguist-generated=true +mod.rs linguist-generated=true diff --git a/crates/re_types/src/testing/datatypes/.gitattributes b/crates/re_types/src/testing/datatypes/.gitattributes new file mode 100644 index 000000000000..219bae48072a --- /dev/null +++ b/crates/re_types/src/testing/datatypes/.gitattributes @@ -0,0 +1,14 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +affix_fuzzer1.rs linguist-generated=true +affix_fuzzer2.rs linguist-generated=true +affix_fuzzer20.rs linguist-generated=true +affix_fuzzer21.rs linguist-generated=true +affix_fuzzer3.rs linguist-generated=true +affix_fuzzer4.rs linguist-generated=true +affix_fuzzer5.rs linguist-generated=true +flattened_scalar.rs linguist-generated=true +mod.rs linguist-generated=true +primitive_component.rs linguist-generated=true +string_component.rs linguist-generated=true diff --git a/crates/re_types_builder/src/bin/build_re_types.rs b/crates/re_types_builder/src/bin/build_re_types.rs index c10384d5eb8b..7c4ba263f4c5 100644 --- a/crates/re_types_builder/src/bin/build_re_types.rs +++ b/crates/re_types_builder/src/bin/build_re_types.rs @@ -15,7 +15,6 @@ const DEFINITIONS_DIR_PATH: &str = "crates/re_types/definitions"; const ENTRYPOINT_PATH: &str = "crates/re_types/definitions/rerun/archetypes.fbs"; const DOC_EXAMPLES_DIR_PATH: &str = "docs/code-examples"; const CPP_OUTPUT_DIR_PATH: &str = "rerun_cpp"; -const RUST_OUTPUT_DIR_PATH: &str = "crates/re_types/."; const PYTHON_OUTPUT_DIR_PATH: &str = "rerun_py/rerun_sdk/rerun"; const PYTHON_TESTING_OUTPUT_DIR_PATH: &str = "rerun_py/tests/test_types"; const DOCS_CONTENT_DIR_PATH: &str = "docs/content/reference/types"; @@ -72,7 +71,6 @@ fn main() { let definitions_dir_path = workspace_dir.join(DEFINITIONS_DIR_PATH); let entrypoint_path = workspace_dir.join(ENTRYPOINT_PATH); let cpp_output_dir_path = workspace_dir.join(CPP_OUTPUT_DIR_PATH); - let rust_output_dir_path = workspace_dir.join(RUST_OUTPUT_DIR_PATH); let python_output_dir_path = workspace_dir.join(PYTHON_OUTPUT_DIR_PATH); let python_testing_output_dir_path = workspace_dir.join(PYTHON_TESTING_OUTPUT_DIR_PATH); let docs_content_dir_path = workspace_dir.join(DOCS_CONTENT_DIR_PATH); @@ -120,7 +118,7 @@ fn main() { ), || re_types_builder::generate_rust_code( &reporter, - rust_output_dir_path, + workspace_dir, &objects, &arrow_registry ), diff --git a/crates/re_types_builder/src/codegen/common.rs b/crates/re_types_builder/src/codegen/common.rs index c5fffcbe9596..a91c9c5b129f 100644 --- a/crates/re_types_builder/src/codegen/common.rs +++ b/crates/re_types_builder/src/codegen/common.rs @@ -6,7 +6,7 @@ use anyhow::Context as _; use camino::Utf8PathBuf; use itertools::Itertools as _; -use crate::{Docs, Reporter}; +use crate::{Docs, GeneratedFiles, Reporter}; fn is_blank>(line: T) -> bool { line.as_ref().chars().all(char::is_whitespace) @@ -301,66 +301,71 @@ impl StringExt for String { } } -/// Remove all files in the given folder that are not in the given set. -pub fn remove_old_files_from_folder( - reporter: &Reporter, - folder_path: Utf8PathBuf, - filepaths: &BTreeSet, -) { +/// Remove orphaned files in all directories present in `files`. +pub fn remove_orphaned_files(reporter: &Reporter, files: &GeneratedFiles) { re_tracing::profile_function!(); - re_log::debug!("Checking for old files in {folder_path}"); - let iter = std::fs::read_dir(folder_path).ok(); - if iter.is_none() { - return; - } + let folder_paths: BTreeSet<_> = files + .keys() + .filter_map(|filepath| filepath.parent()) + .collect(); + + for folder_path in folder_paths { + re_log::debug!("Checking for orphaned files in {folder_path}"); - for entry in iter.unwrap().flatten() { - if entry.file_type().unwrap().is_dir() { + let iter = std::fs::read_dir(folder_path).ok(); + if iter.is_none() { + re_log::debug!("Skipping orphan check in {folder_path}: not a folder (?)"); continue; } - let filepath = Utf8PathBuf::try_from(entry.path()).unwrap(); - - if let Some(stem) = filepath.as_str().strip_suffix("_ext.rs") { - let generated_path = Utf8PathBuf::try_from(format!("{stem}.rs")).unwrap(); - if !generated_path.exists() { - reporter.error( - filepath.as_str(), - "", - format!("Found orphaned {filepath} with no matching {generated_path}"), - ); + + for entry in iter.unwrap().flatten() { + if entry.file_type().unwrap().is_dir() { + continue; + } + let filepath = Utf8PathBuf::try_from(entry.path()).unwrap(); + + if let Some(stem) = filepath.as_str().strip_suffix("_ext.rs") { + let generated_path = Utf8PathBuf::try_from(format!("{stem}.rs")).unwrap(); + if !generated_path.exists() { + reporter.error( + filepath.as_str(), + "", + format!("Found orphaned {filepath} with no matching {generated_path}"), + ); + } + continue; } - continue; - } - if let Some(stem) = filepath.as_str().strip_suffix("_ext.py") { - let generated_path = Utf8PathBuf::try_from(format!("{stem}.py")).unwrap(); - if !generated_path.exists() { - reporter.error( - filepath.as_str(), - "", - format!("Found orphaned {filepath} with no matching {generated_path}"), - ); + if let Some(stem) = filepath.as_str().strip_suffix("_ext.py") { + let generated_path = Utf8PathBuf::try_from(format!("{stem}.py")).unwrap(); + if !generated_path.exists() { + reporter.error( + filepath.as_str(), + "", + format!("Found orphaned {filepath} with no matching {generated_path}"), + ); + } + continue; } - continue; - } - if let Some(stem) = filepath.as_str().strip_suffix("_ext.cpp") { - let generated_hpp_path = Utf8PathBuf::try_from(format!("{stem}.hpp")).unwrap(); - if !generated_hpp_path.exists() { - reporter.error( - filepath.as_str(), - "", - format!("Found orphaned {filepath} with no matching {generated_hpp_path}"), - ); + if let Some(stem) = filepath.as_str().strip_suffix("_ext.cpp") { + let generated_hpp_path = Utf8PathBuf::try_from(format!("{stem}.hpp")).unwrap(); + if !generated_hpp_path.exists() { + reporter.error( + filepath.as_str(), + "", + format!("Found orphaned {filepath} with no matching {generated_hpp_path}"), + ); + } + continue; } - continue; - } - if !filepaths.contains(&filepath) { - re_log::info!("Removing {filepath:?}"); - if let Err(err) = std::fs::remove_file(&filepath) { - panic!("Failed to remove {filepath:?}: {err}"); + if !files.contains_key(&filepath) { + re_log::info!("Removing {filepath:?}"); + if let Err(err) = std::fs::remove_file(&filepath) { + panic!("Failed to remove {filepath:?}: {err}"); + } } } } diff --git a/crates/re_types_builder/src/codegen/cpp/mod.rs b/crates/re_types_builder/src/codegen/cpp/mod.rs index 0ede635bf402..e1dbf27c3ef9 100644 --- a/crates/re_types_builder/src/codegen/cpp/mod.rs +++ b/crates/re_types_builder/src/codegen/cpp/mod.rs @@ -3,8 +3,6 @@ mod forward_decl; mod includes; mod method; -use std::collections::BTreeSet; - use camino::{Utf8Path, Utf8PathBuf}; use itertools::Itertools; use proc_macro2::{Ident, TokenStream}; @@ -12,11 +10,8 @@ use quote::{format_ident, quote}; use rayon::prelude::*; use crate::{ - codegen::{ - autogen_warning, - common::{collect_examples_for_api_docs, write_file}, - }, - format_path, ArrowRegistry, Docs, ElementType, Object, ObjectField, ObjectKind, + codegen::{autogen_warning, common::collect_examples_for_api_docs}, + format_path, ArrowRegistry, Docs, ElementType, GeneratedFiles, Object, ObjectField, ObjectKind, ObjectSpecifics, Objects, Reporter, Type, ATTR_CPP_NO_FIELD_CTORS, }; @@ -94,11 +89,6 @@ fn string_from_token_stream(token_stream: &TokenStream, source_path: Option<&Utf code } -fn format_code(code: &str) -> String { - clang_format::clang_format_with_style(code, &clang_format::ClangFormatStyle::File) - .expect("Failed to run clang-format") -} - pub struct CppCodeGenerator { output_path: Utf8PathBuf, } @@ -109,11 +99,10 @@ impl crate::CodeGenerator for CppCodeGenerator { reporter: &Reporter, objects: &Objects, _arrow_registry: &ArrowRegistry, - ) -> BTreeSet { + ) -> GeneratedFiles { ObjectKind::ALL .par_iter() - .map(|object_kind| self.generate_folder(reporter, objects, *object_kind)) - .flatten() + .flat_map(|object_kind| self.generate_folder(reporter, objects, *object_kind)) .collect() } } @@ -127,14 +116,15 @@ impl CppCodeGenerator { fn generate_folder( &self, - reporter: &Reporter, + _reporter: &Reporter, objects: &Objects, object_kind: ObjectKind, - ) -> BTreeSet { + ) -> GeneratedFiles { let folder_name = object_kind.plural_snake_case(); let folder_path_sdk = self.output_path.join("src/rerun").join(folder_name); let folder_path_testing = self.output_path.join("tests/generated").join(folder_name); - let mut filepaths = BTreeSet::default(); + + let mut files_to_write = GeneratedFiles::default(); // Generate folder contents: let ordered_objects = objects.ordered_objects(object_kind.into()); @@ -151,24 +141,22 @@ impl CppCodeGenerator { let (hpp, cpp) = generate_hpp_cpp(objects, obj, hpp_includes, &hpp_type_extensions); for (extension, tokens) in [("hpp", hpp), ("cpp", cpp)] { - let mut string = string_from_token_stream(&tokens, obj.relative_filepath()); + let mut contents = string_from_token_stream(&tokens, obj.relative_filepath()); if let Some(hpp_extension_string) = &hpp_extension_string { - string = string.replace( + contents = contents.replace( &format!("\"{HEADER_EXTENSION_TOKEN}\""), // NOLINT hpp_extension_string, ); } - let string = format_code(&string); let folder_path = if obj.is_testing() { &folder_path_testing } else { &folder_path_sdk }; let filepath = folder_path.join(format!("{filename_stem}.{extension}")); - write_file(&filepath, &string); - let inserted = filepaths.insert(filepath); + let previous = files_to_write.insert(filepath, contents); assert!( - inserted, + previous.is_none(), "Multiple objects with the same name: {:?}", obj.name ); @@ -196,15 +184,11 @@ impl CppCodeGenerator { .parent() .unwrap() .join(format!("{folder_name}.hpp")); - let string = string_from_token_stream(&tokens, None); - let string = format_code(&string); - write_file(&filepath, &string); - filepaths.insert(filepath); + let contents = string_from_token_stream(&tokens, None); + files_to_write.insert(filepath, contents); } - super::common::remove_old_files_from_folder(reporter, folder_path_sdk, &filepaths); - - filepaths + files_to_write } } diff --git a/crates/re_types_builder/src/codegen/docs/mod.rs b/crates/re_types_builder/src/codegen/docs/mod.rs index 3ddc849dcf8f..5062e6120a03 100644 --- a/crates/re_types_builder/src/codegen/docs/mod.rs +++ b/crates/re_types_builder/src/codegen/docs/mod.rs @@ -1,12 +1,12 @@ use crate::codegen::common::ExampleInfo; use crate::objects::FieldKind; use crate::CodeGenerator; +use crate::GeneratedFiles; use crate::Object; use crate::ObjectKind; use crate::Objects; use crate::Reporter; use camino::Utf8PathBuf; -use std::collections::BTreeSet; use std::fmt::Write; type ObjectMap = std::collections::BTreeMap; @@ -36,10 +36,10 @@ impl CodeGenerator for DocsCodeGenerator { reporter: &Reporter, objects: &Objects, _arrow_registry: &crate::ArrowRegistry, - ) -> BTreeSet { + ) -> GeneratedFiles { re_tracing::profile_function!(); - let mut filepaths = BTreeSet::new(); + let mut files_to_write = GeneratedFiles::default(); let (mut archetypes, mut components, mut datatypes) = (Vec::new(), Vec::new(), Vec::new()); let object_map = &objects.objects; @@ -62,8 +62,7 @@ impl CodeGenerator for DocsCodeGenerator { object.kind.plural_snake_case(), object.snake_case_name() )); - super::common::write_file(&path, &page); - filepaths.insert(path); + files_to_write.insert(path, page); } for (kind, order, prelude, objects) in [ @@ -90,11 +89,10 @@ impl CodeGenerator for DocsCodeGenerator { let path = self .docs_dir .join(format!("{}.md", kind.plural_snake_case())); - super::common::write_file(&path, &page); - filepaths.insert(path); + files_to_write.insert(path, page); } - filepaths + files_to_write } } diff --git a/crates/re_types_builder/src/codegen/mod.rs b/crates/re_types_builder/src/codegen/mod.rs index 23280e543f8a..59354aaea158 100644 --- a/crates/re_types_builder/src/codegen/mod.rs +++ b/crates/re_types_builder/src/codegen/mod.rs @@ -1,14 +1,18 @@ +pub type GeneratedFiles = std::collections::BTreeMap; + /// Implements the codegen pass. pub trait CodeGenerator { /// Generates user-facing code from [`crate::Objects`]. /// - /// Returns the paths of all generated files. + /// Returns the expected paths and contents of all generated files. + /// It is the responsibility of the caller to actually do something with that data (e.g. write + /// them to disk). fn generate( &mut self, reporter: &crate::Reporter, objects: &crate::Objects, arrow_registry: &crate::ArrowRegistry, - ) -> std::collections::BTreeSet; + ) -> GeneratedFiles; } // --- @@ -29,7 +33,7 @@ pub(crate) use macros::autogen_warning; // Hack for declaring macros as `pub(cra // --- -mod common; +pub(crate) mod common; use self::common::{get_documentation, StringExt}; mod cpp; diff --git a/crates/re_types_builder/src/codegen/python.rs b/crates/re_types_builder/src/codegen/python.rs index 67f9c043cd01..d91e6fbda417 100644 --- a/crates/re_types_builder/src/codegen/python.rs +++ b/crates/re_types_builder/src/codegen/python.rs @@ -5,7 +5,6 @@ use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; use anyhow::Context as _; use camino::{Utf8Path, Utf8PathBuf}; use itertools::Itertools; -use rayon::prelude::*; use crate::{ codegen::{ @@ -13,8 +12,9 @@ use crate::{ common::{collect_examples_for_api_docs, Example}, StringExt as _, }, - format_path, ArrowRegistry, CodeGenerator, Docs, ElementType, Object, ObjectField, ObjectKind, - Objects, Reporter, Type, ATTR_PYTHON_ALIASES, ATTR_PYTHON_ARRAY_ALIASES, + format_path, ArrowRegistry, CodeGenerator, Docs, ElementType, GeneratedFiles, Object, + ObjectField, ObjectKind, Objects, Reporter, Type, ATTR_PYTHON_ALIASES, + ATTR_PYTHON_ARRAY_ALIASES, }; use super::common::ExampleInfo; @@ -75,8 +75,8 @@ impl PythonObjectExt for Object { } pub struct PythonCodeGenerator { - pkg_path: Utf8PathBuf, - testing_pkg_path: Utf8PathBuf, + pub pkg_path: Utf8PathBuf, + pub testing_pkg_path: Utf8PathBuf, } impl PythonCodeGenerator { @@ -94,8 +94,8 @@ impl CodeGenerator for PythonCodeGenerator { reporter: &Reporter, objects: &Objects, arrow_registry: &ArrowRegistry, - ) -> BTreeSet { - let mut files_to_write: BTreeMap = Default::default(); + ) -> GeneratedFiles { + let mut files_to_write = GeneratedFiles::default(); for object_kind in ObjectKind::ALL { self.generate_folder( @@ -122,16 +122,7 @@ impl CodeGenerator for PythonCodeGenerator { */ } - self.write_files(&files_to_write); - - let filepaths = files_to_write.keys().cloned().collect(); - - for kind in ObjectKind::ALL { - let folder_path = self.pkg_path.join(kind.plural_snake_case()); - super::common::remove_old_files_from_folder(reporter, folder_path, &filepaths); - } - - filepaths + files_to_write } } @@ -436,50 +427,6 @@ impl PythonCodeGenerator { write_init_file(&kind_path, &mods, files_to_write); write_init_file(&test_kind_path, &test_mods, files_to_write); } - - fn write_files(&self, files_to_write: &BTreeMap) { - re_tracing::profile_function!(); - - // Running `black` once for each file is very slow, so we write all - // files to a temporary folder, format it, and copy back the results. - - let tempdir = tempfile::tempdir().unwrap(); - let tempdir_path = Utf8PathBuf::try_from(tempdir.path().to_owned()).unwrap(); - - files_to_write.par_iter().for_each(|(filepath, source)| { - let formatted_source_path = self.format_path_for_tmp_dir(filepath, &tempdir_path); - super::common::write_file(&formatted_source_path, source); - }); - - format_python_dir(&tempdir_path).unwrap(); - - // Read back and copy to the final destination: - files_to_write - .par_iter() - .for_each(|(filepath, _original_source)| { - let formatted_source_path = self.format_path_for_tmp_dir(filepath, &tempdir_path); - let formatted_source = std::fs::read_to_string(formatted_source_path).unwrap(); - super::common::write_file(filepath, &formatted_source); - }); - } - - fn format_path_for_tmp_dir( - &self, - filepath: &Utf8Path, - tempdir_path: &Utf8PathBuf, - ) -> Utf8PathBuf { - // If the prefix is pkg_path, strip it, and then append to tempdir - // However, if the prefix is testing_pkg_path, strip it and insert an extra - // "testing" to avoid name collisions. - filepath.strip_prefix(&self.pkg_path).map_or_else( - |_| { - tempdir_path - .join("testing") - .join(filepath.strip_prefix(&self.testing_pkg_path).unwrap()) - }, - |f| tempdir_path.join(f), - ) - } } fn write_init_file( @@ -1855,72 +1802,3 @@ fn quote_metadata_map(metadata: &BTreeMap) -> String { .join(", "); format!("{{{kvs}}}") } - -fn format_python_dir(dir: &Utf8PathBuf) -> anyhow::Result<()> { - re_tracing::profile_function!(); - - // The order below is important and sadly we need to call black twice. Ruff does not yet - // fix line-length (See: https://github.com/astral-sh/ruff/issues/1904). - // - // 1) Call black, which among others things fixes line-length - // 2) Call ruff, which requires line-lengths to be correct - // 3) Call black again to cleanup some whitespace issues ruff might introduce - - run_black_on_dir(dir).context("black")?; - run_ruff_on_dir(dir).context("ruff")?; - run_black_on_dir(dir).context("black")?; - Ok(()) -} - -fn python_project_path() -> Utf8PathBuf { - let path = crate::rerun_workspace_path() - .join("rerun_py") - .join("pyproject.toml"); - assert!(path.exists(), "Failed to find {path:?}"); - path -} - -fn run_black_on_dir(dir: &Utf8PathBuf) -> anyhow::Result<()> { - re_tracing::profile_function!(); - use std::process::{Command, Stdio}; - - let proc = Command::new("black") - .arg(format!("--config={}", python_project_path())) - .arg(dir) - .stdout(Stdio::piped()) - .stderr(Stdio::piped()) - .spawn()?; - - let output = proc.wait_with_output()?; - - if output.status.success() { - Ok(()) - } else { - let stdout = String::from_utf8_lossy(&output.stdout).trim().to_owned(); - let stderr = String::from_utf8_lossy(&output.stderr).trim().to_owned(); - anyhow::bail!("{stdout}\n{stderr}") - } -} - -fn run_ruff_on_dir(dir: &Utf8PathBuf) -> anyhow::Result<()> { - re_tracing::profile_function!(); - use std::process::{Command, Stdio}; - - let proc = Command::new("ruff") - .arg(format!("--config={}", python_project_path())) - .arg("--fix") - .arg(dir) - .stdout(Stdio::piped()) - .stderr(Stdio::piped()) - .spawn()?; - - let output = proc.wait_with_output()?; - - if output.status.success() { - Ok(()) - } else { - let stdout = String::from_utf8_lossy(&output.stdout).trim().to_owned(); - let stderr = String::from_utf8_lossy(&output.stderr).trim().to_owned(); - anyhow::bail!("{stdout}\n{stderr}") - } -} diff --git a/crates/re_types_builder/src/codegen/rust/api.rs b/crates/re_types_builder/src/codegen/rust/api.rs index 799594aaac8f..e91c96a482a7 100644 --- a/crates/re_types_builder/src/codegen/rust/api.rs +++ b/crates/re_types_builder/src/codegen/rust/api.rs @@ -1,11 +1,10 @@ -use std::collections::{BTreeMap, BTreeSet}; +use std::collections::{BTreeMap, BTreeSet, HashSet}; use anyhow::Context as _; use camino::{Utf8Path, Utf8PathBuf}; use itertools::Itertools as _; use proc_macro2::TokenStream; use quote::{format_ident, quote}; -use rayon::prelude::*; use crate::{ codegen::{ @@ -38,14 +37,13 @@ use super::{arrow::quote_fqname_as_type_path, util::string_from_quoted}; // --- pub struct RustCodeGenerator { - crate_path: Utf8PathBuf, + pub workspace_path: Utf8PathBuf, } impl RustCodeGenerator { - pub fn new(crate_path: impl Into) -> Self { - Self { - crate_path: crate_path.into(), - } + pub fn new(workspace_path: impl Into) -> Self { + let workspace_path = workspace_path.into(); + Self { workspace_path } } } @@ -55,7 +53,7 @@ impl CodeGenerator for RustCodeGenerator { reporter: &Reporter, objects: &Objects, arrow_registry: &ArrowRegistry, - ) -> BTreeSet { + ) -> BTreeMap { let mut files_to_write: BTreeMap = Default::default(); for object_kind in ObjectKind::ALL { @@ -68,25 +66,7 @@ impl CodeGenerator for RustCodeGenerator { ); } - write_files(&files_to_write); - let filepaths = files_to_write.keys().cloned().collect(); - - for kind in ObjectKind::ALL { - let folder_path = self.crate_path.join("src").join(kind.plural_snake_case()); - crate::codegen::common::remove_old_files_from_folder(reporter, folder_path, &filepaths); - - let test_folder_path = self - .crate_path - .join("src/testing") - .join(kind.plural_snake_case()); - crate::codegen::common::remove_old_files_from_folder( - reporter, - test_folder_path, - &filepaths, - ); - } - - filepaths + files_to_write } } @@ -99,46 +79,49 @@ impl RustCodeGenerator { object_kind: ObjectKind, files_to_write: &mut BTreeMap, ) { - let folder_name = object_kind.plural_snake_case(); - let kind_path = self.crate_path.join("src").join(folder_name); - let kind_testing_path = self.crate_path.join("src/testing").join(folder_name); + let crates_root_path = self.workspace_path.join("crates"); + + let mut all_modules: HashSet<_> = HashSet::default(); // Generate folder contents: let ordered_objects = objects.ordered_objects(object_kind.into()); for &obj in &ordered_objects { - let filename_stem = obj.snake_case_name(); - let filename = format!("{filename_stem}.rs"); + let crate_name = "re_types"; // NOTE: this will support other values soon + let module_name = obj.kind.plural_snake_case(); - let filepath = if obj.is_testing() { - kind_testing_path.join(filename) + let crate_path = crates_root_path.join(crate_name); + let module_path = if obj.is_testing() { + crate_path.join("src/testing").join(module_name) } else { - kind_path.join(filename) + crate_path.join("src").join(module_name) }; + + let filename_stem = obj.snake_case_name(); + let filename = format!("{filename_stem}.rs"); + + let filepath = module_path.join(filename); + let code = generate_object_file(reporter, objects, arrow_registry, obj); + all_modules.insert(( + crate_name, + module_name, + obj.is_testing(), + module_path.clone(), + )); files_to_write.insert(filepath, code); } - // src/{datatypes|components|archetypes}/mod.rs - generate_mod_file( - &kind_path, - &ordered_objects - .iter() - .filter(|obj| !obj.is_testing()) - .copied() - .collect_vec(), - files_to_write, - ); - // src/testing/{datatypes|components|archetypes}/mod.rs - generate_mod_file( - &kind_testing_path, - &ordered_objects + for (_crate_name, _module_name, is_testing, module_path) in all_modules { + let relevant_objs = &ordered_objects .iter() - .filter(|obj| obj.is_testing()) + .filter(|obj| obj.is_testing() == is_testing) .copied() - .collect_vec(), - files_to_write, - ); + .collect_vec(); + + // src/{testing/}{datatypes|components|archetypes}/mod.rs + generate_mod_file(&module_path, relevant_objs, files_to_write); + } } } @@ -237,43 +220,6 @@ fn generate_mod_file( files_to_write.insert(path, code); } -fn write_files(files_to_write: &BTreeMap) { - re_tracing::profile_function!(); - // TODO(emilk): running `cargo fmt` once for each file is very slow. - // It would probably be faster to write all files to a temporary folder, run carg-fmt on - // that folder, and then copy the results to the final destination (if the files has changed). - files_to_write.par_iter().for_each(|(path, source)| { - write_file(path, source.clone()); - }); -} - -fn write_file(filepath: &Utf8PathBuf, mut code: String) { - re_tracing::profile_function!(); - - code = code.replace(" :: ", "::"); // Fix `bytemuck :: Pod` -> `bytemuck::Pod`. - - // Even though we already have used `prettyplease` we also - // need to run `cargo fmt`, since it catches some things `prettyplease` missed. - // We need to run `cago fmt` several times because it is not idempotent; - // see https://github.com/rust-lang/rustfmt/issues/5824 - for _ in 0..2 { - // NOTE: We're purposefully ignoring the error here. - // - // In the very unlikely chance that the user doesn't have the `fmt` component installed, - // there's still no good reason to fail the build. - // - // The CI will catch the unformatted file at PR time and complain appropriately anyhow. - - re_tracing::profile_scope!("rust-fmt"); - use rust_format::Formatter as _; - if let Ok(formatted) = rust_format::RustFmt::default().format_str(&code) { - code = formatted; - } - } - - crate::codegen::common::write_file(filepath, &code); -} - /// Replace `#[doc = "…"]` attributes with `/// …` doc comments, /// while also removing trailing whitespace. fn replace_doc_attrb_with_doc_comment(code: &String) -> String { diff --git a/crates/re_types_builder/src/lib.rs b/crates/re_types_builder/src/lib.rs index c12b7ebb5ca8..bfc018af3350 100644 --- a/crates/re_types_builder/src/lib.rs +++ b/crates/re_types_builder/src/lib.rs @@ -113,6 +113,8 @@ )] mod reflection; +use std::collections::BTreeMap; + use anyhow::Context as _; use re_build_tools::{ compute_crate_hash, compute_dir_filtered_hash, compute_dir_hash, compute_strings_hash, @@ -136,7 +138,8 @@ pub mod report; pub use self::arrow_registry::{ArrowRegistry, LazyDatatype, LazyField}; pub use self::codegen::{ - CodeGenerator, CppCodeGenerator, DocsCodeGenerator, PythonCodeGenerator, RustCodeGenerator, + CodeGenerator, CppCodeGenerator, DocsCodeGenerator, GeneratedFiles, PythonCodeGenerator, + RustCodeGenerator, }; pub use self::objects::{ Attributes, Docs, ElementType, Object, ObjectField, ObjectKind, ObjectSpecifics, Objects, Type, @@ -265,32 +268,43 @@ pub fn generate_lang_agnostic( (objects, arrow_registry) } -/// Generates a .gitattributes file that marks up all generated files as generated -fn generate_gitattributes_for_generated_files( - output_path: &impl AsRef, - files: impl Iterator, -) { - let filename = ".gitattributes"; - let path = output_path.as_ref().join(filename); - - let generated_files = std::iter::once(filename.to_owned()) // The attributes itself is generated! - .chain(files.map(|path| { - format_path( - path.strip_prefix(output_path.as_ref().as_std_path()) - .context("Failed to make path relative to output path.") - .unwrap(), - ) - })) - .map(|s| format!("{s} linguist-generated=true")) - .collect::>(); - - let content = format!( - "# DO NOT EDIT! This file is generated by {}\n\n{}\n", - format_path(file!()), - generated_files.join("\n") - ); +/// Generates .gitattributes files that mark up all generated files as generated. +fn generate_gitattributes_for_generated_files(files_to_write: &mut GeneratedFiles) { + re_tracing::profile_function!(); + + const FILENAME: &str = ".gitattributes"; - codegen::write_file(&path, &content); + let mut filepaths_per_folder = BTreeMap::default(); + + for filepath in files_to_write.keys() { + let dirpath = filepath.parent().unwrap(); + let files: &mut Vec<_> = filepaths_per_folder.entry(dirpath.to_owned()).or_default(); + files.push(filepath.clone()); + } + + for (dirpath, files) in filepaths_per_folder { + let gitattributes_path = dirpath.join(FILENAME); + + let generated_files = std::iter::once(FILENAME.to_owned()) // The attributes itself is generated! + .chain(files.iter().map(|filepath| { + format_path( + filepath + .strip_prefix(&dirpath) + .context("Failed to make {filepath} relative to {dirpath}.") + .unwrap(), + ) + })) + .map(|s| format!("{s} linguist-generated=true")) + .collect::>(); + + let content = format!( + "# DO NOT EDIT! This file is generated by {}\n\n{}\n", + format_path(file!()), + generated_files.join("\n") + ); + + files_to_write.insert(gitattributes_path, content); + } } /// This will automatically emit a `rerun-if-changed` clause for all the files that were hashed. @@ -365,9 +379,40 @@ pub fn generate_cpp_code( arrow_registry: &ArrowRegistry, ) { re_tracing::profile_function!(); + + // 1. Generate code files. let mut gen = CppCodeGenerator::new(output_path.as_ref()); - let filepaths = gen.generate(reporter, objects, arrow_registry); - generate_gitattributes_for_generated_files(&output_path, filepaths.into_iter()); + let mut files = gen.generate(reporter, objects, arrow_registry); + // 2. Generate attribute files. + generate_gitattributes_for_generated_files(&mut files); + // 3. Write all files. + { + use rayon::prelude::*; + + re_tracing::profile_scope!("write_files"); + + files.par_iter().for_each(|(filepath, contents)| { + // There's more than cpp/hpp files in here, don't run clang-format on them! + let contents = if matches!(filepath.extension(), Some("cpp" | "hpp")) { + format_code(contents) + } else { + contents.clone() + }; + crate::codegen::common::write_file(filepath, &contents); + }); + } + // 4. Remove orphaned files. + // NOTE: In rerun_cpp we have a directory where we share generated code with handwritten code. + // Make sure to filter out that directory, or else we will end up removing those handwritten + // files. + let root_src = output_path.as_ref().join("src/rerun"); + files.retain(|filepath, _| !filepath.starts_with(&root_src)); + crate::codegen::common::remove_orphaned_files(reporter, &files); + + fn format_code(code: &str) -> String { + clang_format::clang_format_with_style(code, &clang_format::ClangFormatStyle::File) + .expect("Failed to run clang-format") + } } /// Generates Rust code. @@ -392,14 +437,58 @@ pub fn generate_cpp_code( /// ``` pub fn generate_rust_code( reporter: &Reporter, - output_crate_path: impl AsRef, + workspace_path: impl Into, objects: &Objects, arrow_registry: &ArrowRegistry, ) { re_tracing::profile_function!(); - let mut gen = RustCodeGenerator::new(output_crate_path.as_ref()); - let filepaths = gen.generate(reporter, objects, arrow_registry); - generate_gitattributes_for_generated_files(&output_crate_path, filepaths.into_iter()); + + // 1. Generate code files. + let mut gen = RustCodeGenerator::new(workspace_path); + let mut files = gen.generate(reporter, objects, arrow_registry); + // 2. Generate attribute files. + generate_gitattributes_for_generated_files(&mut files); + // 3. Write all files. + write_files(&files); + // 4. Remove orphaned files. + crate::codegen::common::remove_orphaned_files(reporter, &files); + + fn write_files(files: &GeneratedFiles) { + use rayon::prelude::*; + + re_tracing::profile_function!(); + + files.par_iter().for_each(|(path, source)| { + write_file(path, source.clone()); + }); + } + + fn write_file(filepath: &Utf8PathBuf, mut contents: String) { + re_tracing::profile_function!(); + + contents = contents.replace(" :: ", "::"); // Fix `bytemuck :: Pod` -> `bytemuck::Pod`. + + // Even though we already have used `prettyplease` we also + // need to run `cargo fmt`, since it catches some things `prettyplease` missed. + // We need to run `cago fmt` several times because it is not idempotent; + // see https://github.com/rust-lang/rustfmt/issues/5824 + for _ in 0..2 { + // NOTE: We're purposefully ignoring the error here. + // + // In the very unlikely chance that the user doesn't have the `fmt` component installed, + // there's still no good reason to fail the build. + // + // The CI will catch the unformatted file at PR time and complain appropriately anyhow. + + re_tracing::profile_scope!("rust-fmt"); + use rust_format::Formatter as _; + if let Ok(formatted) = rust_format::RustFmt::default().format_str(&contents) { + contents = formatted; + } + } + + crate::codegen::common::write_file(filepath, &contents); + } } /// Generates Python code. @@ -431,22 +520,133 @@ pub fn generate_python_code( arrow_registry: &ArrowRegistry, ) { re_tracing::profile_function!(); + + // 1. Generate code files. let mut gen = PythonCodeGenerator::new(output_pkg_path.as_ref(), testing_output_pkg_path.as_ref()); - let filepaths = gen.generate(reporter, objects, arrow_registry); - generate_gitattributes_for_generated_files( - &output_pkg_path, - filepaths - .iter() - .filter(|f| f.starts_with(output_pkg_path.as_ref())) - .cloned(), - ); - generate_gitattributes_for_generated_files( - &testing_output_pkg_path, - filepaths - .into_iter() - .filter(|f| f.starts_with(testing_output_pkg_path.as_ref())), - ); + let mut files = gen.generate(reporter, objects, arrow_registry); + // 2. Generate attribute files. + generate_gitattributes_for_generated_files(&mut files); + // 3. Write all files. + write_files(&gen.pkg_path, &gen.testing_pkg_path, &files); + // 4. Remove orphaned files. + crate::codegen::common::remove_orphaned_files(reporter, &files); + + fn write_files(pkg_path: &Utf8Path, testing_pkg_path: &Utf8Path, files: &GeneratedFiles) { + use rayon::prelude::*; + + re_tracing::profile_function!(); + + // Running `black` once for each file is very slow, so we write all + // files to a temporary folder, format it, and copy back the results. + + let tempdir = tempfile::tempdir().unwrap(); + let tempdir_path = Utf8PathBuf::try_from(tempdir.path().to_owned()).unwrap(); + + files.par_iter().for_each(|(filepath, source)| { + let formatted_source_path = + format_path_for_tmp_dir(pkg_path, testing_pkg_path, filepath, &tempdir_path); + crate::codegen::common::write_file(&formatted_source_path, source); + }); + + format_python_dir(&tempdir_path).unwrap(); + + // Read back and copy to the final destination: + files.par_iter().for_each(|(filepath, _original_source)| { + let formatted_source_path = + format_path_for_tmp_dir(pkg_path, testing_pkg_path, filepath, &tempdir_path); + let formatted_source = std::fs::read_to_string(formatted_source_path).unwrap(); + crate::codegen::common::write_file(filepath, &formatted_source); + }); + } + + fn format_path_for_tmp_dir( + pkg_path: &Utf8Path, + testing_pkg_path: &Utf8Path, + filepath: &Utf8Path, + tempdir_path: &Utf8Path, + ) -> Utf8PathBuf { + // If the prefix is pkg_path, strip it, and then append to tempdir + // However, if the prefix is testing_pkg_path, strip it and insert an extra + // "testing" to avoid name collisions. + filepath.strip_prefix(pkg_path).map_or_else( + |_| { + tempdir_path + .join("testing") + .join(filepath.strip_prefix(testing_pkg_path).unwrap()) + }, + |f| tempdir_path.join(f), + ) + } + + fn format_python_dir(dir: &Utf8PathBuf) -> anyhow::Result<()> { + re_tracing::profile_function!(); + + // The order below is important and sadly we need to call black twice. Ruff does not yet + // fix line-length (See: https://github.com/astral-sh/ruff/issues/1904). + // + // 1) Call black, which among others things fixes line-length + // 2) Call ruff, which requires line-lengths to be correct + // 3) Call black again to cleanup some whitespace issues ruff might introduce + + run_black_on_dir(dir).context("black")?; + run_ruff_on_dir(dir).context("ruff")?; + run_black_on_dir(dir).context("black")?; + Ok(()) + } + + fn python_project_path() -> Utf8PathBuf { + let path = crate::rerun_workspace_path() + .join("rerun_py") + .join("pyproject.toml"); + assert!(path.exists(), "Failed to find {path:?}"); + path + } + + fn run_black_on_dir(dir: &Utf8PathBuf) -> anyhow::Result<()> { + re_tracing::profile_function!(); + use std::process::{Command, Stdio}; + + let proc = Command::new("black") + .arg(format!("--config={}", python_project_path())) + .arg(dir) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .spawn()?; + + let output = proc.wait_with_output()?; + + if output.status.success() { + Ok(()) + } else { + let stdout = String::from_utf8_lossy(&output.stdout).trim().to_owned(); + let stderr = String::from_utf8_lossy(&output.stderr).trim().to_owned(); + anyhow::bail!("{stdout}\n{stderr}") + } + } + + fn run_ruff_on_dir(dir: &Utf8PathBuf) -> anyhow::Result<()> { + re_tracing::profile_function!(); + use std::process::{Command, Stdio}; + + let proc = Command::new("ruff") + .arg(format!("--config={}", python_project_path())) + .arg("--fix") + .arg(dir) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .spawn()?; + + let output = proc.wait_with_output()?; + + if output.status.success() { + Ok(()) + } else { + let stdout = String::from_utf8_lossy(&output.stdout).trim().to_owned(); + let stderr = String::from_utf8_lossy(&output.stderr).trim().to_owned(); + anyhow::bail!("{stdout}\n{stderr}") + } + } } pub fn generate_docs( @@ -456,10 +656,26 @@ pub fn generate_docs( arrow_registry: &ArrowRegistry, ) { re_tracing::profile_function!(); + re_log::info!("Generating docs to {}", output_docs_dir.as_ref()); + + // 1. Generate code files. let mut gen = DocsCodeGenerator::new(output_docs_dir.as_ref()); - let filepaths = gen.generate(reporter, objects, arrow_registry); - generate_gitattributes_for_generated_files(&output_docs_dir, filepaths.into_iter()); + let mut files = gen.generate(reporter, objects, arrow_registry); + // 2. Generate attribute files. + generate_gitattributes_for_generated_files(&mut files); + // 3. Write all files. + { + use rayon::prelude::*; + + re_tracing::profile_scope!("write_files"); + + files.par_iter().for_each(|(filepath, contents)| { + crate::codegen::common::write_file(filepath, contents); + }); + } + // 4. Remove orphaned files. + crate::codegen::common::remove_orphaned_files(reporter, &files); } pub(crate) fn rerun_workspace_path() -> camino::Utf8PathBuf { diff --git a/docs/content/reference/types/.gitattributes b/docs/content/reference/types/.gitattributes index 421425799b44..bb0c06770dac 100644 --- a/docs/content/reference/types/.gitattributes +++ b/docs/content/reference/types/.gitattributes @@ -1,91 +1,6 @@ # DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs .gitattributes linguist-generated=true -archetypes/annotation_context.md linguist-generated=true -archetypes/arrows3d.md linguist-generated=true -archetypes/asset3d.md linguist-generated=true -archetypes/bar_chart.md linguist-generated=true -archetypes/boxes2d.md linguist-generated=true -archetypes/boxes3d.md linguist-generated=true -archetypes/clear.md linguist-generated=true -archetypes/depth_image.md linguist-generated=true -archetypes/disconnected_space.md linguist-generated=true -archetypes/image.md linguist-generated=true -archetypes/line_strips2d.md linguist-generated=true -archetypes/line_strips3d.md linguist-generated=true -archetypes/mesh3d.md linguist-generated=true -archetypes/pinhole.md linguist-generated=true -archetypes/points2d.md linguist-generated=true -archetypes/points3d.md linguist-generated=true -archetypes/segmentation_image.md linguist-generated=true -archetypes/tensor.md linguist-generated=true -archetypes/text_document.md linguist-generated=true -archetypes/text_log.md linguist-generated=true -archetypes/time_series_scalar.md linguist-generated=true -archetypes/transform3d.md linguist-generated=true -archetypes/view_coordinates.md linguist-generated=true archetypes.md linguist-generated=true -components/annotation_context.md linguist-generated=true -components/blob.md linguist-generated=true -components/class_id.md linguist-generated=true -components/clear_is_recursive.md linguist-generated=true -components/color.md linguist-generated=true -components/depth_meter.md linguist-generated=true -components/disconnected_space.md linguist-generated=true -components/draw_order.md linguist-generated=true -components/half_sizes2d.md linguist-generated=true -components/half_sizes3d.md linguist-generated=true -components/instance_key.md linguist-generated=true -components/keypoint_id.md linguist-generated=true -components/line_strip2d.md linguist-generated=true -components/line_strip3d.md linguist-generated=true -components/material.md linguist-generated=true -components/media_type.md linguist-generated=true -components/mesh_properties.md linguist-generated=true -components/out_of_tree_transform3d.md linguist-generated=true -components/pinhole_projection.md linguist-generated=true -components/position2d.md linguist-generated=true -components/position3d.md linguist-generated=true -components/radius.md linguist-generated=true -components/resolution.md linguist-generated=true -components/rotation3d.md linguist-generated=true -components/scalar.md linguist-generated=true -components/scalar_scattering.md linguist-generated=true -components/tensor_data.md linguist-generated=true -components/text.md linguist-generated=true -components/text_log_level.md linguist-generated=true -components/transform3d.md linguist-generated=true -components/vector3d.md linguist-generated=true -components/view_coordinates.md linguist-generated=true components.md linguist-generated=true -datatypes/angle.md linguist-generated=true -datatypes/annotation_info.md linguist-generated=true -datatypes/class_description.md linguist-generated=true -datatypes/class_description_map_elem.md linguist-generated=true -datatypes/class_id.md linguist-generated=true -datatypes/float32.md linguist-generated=true -datatypes/keypoint_id.md linguist-generated=true -datatypes/keypoint_pair.md linguist-generated=true -datatypes/mat3x3.md linguist-generated=true -datatypes/mat4x4.md linguist-generated=true -datatypes/material.md linguist-generated=true -datatypes/mesh_properties.md linguist-generated=true -datatypes/quaternion.md linguist-generated=true -datatypes/rgba32.md linguist-generated=true -datatypes/rotation3d.md linguist-generated=true -datatypes/rotation_axis_angle.md linguist-generated=true -datatypes/scale3d.md linguist-generated=true -datatypes/tensor_buffer.md linguist-generated=true -datatypes/tensor_data.md linguist-generated=true -datatypes/tensor_dimension.md linguist-generated=true -datatypes/transform3d.md linguist-generated=true -datatypes/translation_and_mat3x3.md linguist-generated=true -datatypes/translation_rotation_scale3d.md linguist-generated=true -datatypes/utf8.md linguist-generated=true -datatypes/uvec2d.md linguist-generated=true -datatypes/uvec3d.md linguist-generated=true -datatypes/uvec4d.md linguist-generated=true -datatypes/vec2d.md linguist-generated=true -datatypes/vec3d.md linguist-generated=true -datatypes/vec4d.md linguist-generated=true datatypes.md linguist-generated=true diff --git a/docs/content/reference/types/archetypes/.gitattributes b/docs/content/reference/types/archetypes/.gitattributes new file mode 100644 index 000000000000..9916dcf7538b --- /dev/null +++ b/docs/content/reference/types/archetypes/.gitattributes @@ -0,0 +1,26 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +annotation_context.md linguist-generated=true +arrows3d.md linguist-generated=true +asset3d.md linguist-generated=true +bar_chart.md linguist-generated=true +boxes2d.md linguist-generated=true +boxes3d.md linguist-generated=true +clear.md linguist-generated=true +depth_image.md linguist-generated=true +disconnected_space.md linguist-generated=true +image.md linguist-generated=true +line_strips2d.md linguist-generated=true +line_strips3d.md linguist-generated=true +mesh3d.md linguist-generated=true +pinhole.md linguist-generated=true +points2d.md linguist-generated=true +points3d.md linguist-generated=true +segmentation_image.md linguist-generated=true +tensor.md linguist-generated=true +text_document.md linguist-generated=true +text_log.md linguist-generated=true +time_series_scalar.md linguist-generated=true +transform3d.md linguist-generated=true +view_coordinates.md linguist-generated=true diff --git a/docs/content/reference/types/components/.gitattributes b/docs/content/reference/types/components/.gitattributes new file mode 100644 index 000000000000..c00750866921 --- /dev/null +++ b/docs/content/reference/types/components/.gitattributes @@ -0,0 +1,35 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +annotation_context.md linguist-generated=true +blob.md linguist-generated=true +class_id.md linguist-generated=true +clear_is_recursive.md linguist-generated=true +color.md linguist-generated=true +depth_meter.md linguist-generated=true +disconnected_space.md linguist-generated=true +draw_order.md linguist-generated=true +half_sizes2d.md linguist-generated=true +half_sizes3d.md linguist-generated=true +instance_key.md linguist-generated=true +keypoint_id.md linguist-generated=true +line_strip2d.md linguist-generated=true +line_strip3d.md linguist-generated=true +material.md linguist-generated=true +media_type.md linguist-generated=true +mesh_properties.md linguist-generated=true +out_of_tree_transform3d.md linguist-generated=true +pinhole_projection.md linguist-generated=true +position2d.md linguist-generated=true +position3d.md linguist-generated=true +radius.md linguist-generated=true +resolution.md linguist-generated=true +rotation3d.md linguist-generated=true +scalar.md linguist-generated=true +scalar_scattering.md linguist-generated=true +tensor_data.md linguist-generated=true +text.md linguist-generated=true +text_log_level.md linguist-generated=true +transform3d.md linguist-generated=true +vector3d.md linguist-generated=true +view_coordinates.md linguist-generated=true diff --git a/docs/content/reference/types/components/origin2d.md b/docs/content/reference/types/components/origin2d.md deleted file mode 100644 index 29e3f3fcb838..000000000000 --- a/docs/content/reference/types/components/origin2d.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: "Origin2D" ---- - -A point of origin in 2D space. - -## Fields - -* origin: [`Vec2D`](../datatypes/vec2d.md) - - diff --git a/docs/content/reference/types/components/origin3d.md b/docs/content/reference/types/components/origin3d.md deleted file mode 100644 index 5124636d6885..000000000000 --- a/docs/content/reference/types/components/origin3d.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: "Origin3D" ---- - -A point of origin in 3D space. - -## Fields - -* origin: [`Vec3D`](../datatypes/vec3d.md) - - -## Used by - -* [`Arrows3D`](../archetypes/arrows3d.md) diff --git a/docs/content/reference/types/datatypes/.gitattributes b/docs/content/reference/types/datatypes/.gitattributes new file mode 100644 index 000000000000..5b7704c1188d --- /dev/null +++ b/docs/content/reference/types/datatypes/.gitattributes @@ -0,0 +1,33 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +angle.md linguist-generated=true +annotation_info.md linguist-generated=true +class_description.md linguist-generated=true +class_description_map_elem.md linguist-generated=true +class_id.md linguist-generated=true +float32.md linguist-generated=true +keypoint_id.md linguist-generated=true +keypoint_pair.md linguist-generated=true +mat3x3.md linguist-generated=true +mat4x4.md linguist-generated=true +material.md linguist-generated=true +mesh_properties.md linguist-generated=true +quaternion.md linguist-generated=true +rgba32.md linguist-generated=true +rotation3d.md linguist-generated=true +rotation_axis_angle.md linguist-generated=true +scale3d.md linguist-generated=true +tensor_buffer.md linguist-generated=true +tensor_data.md linguist-generated=true +tensor_dimension.md linguist-generated=true +transform3d.md linguist-generated=true +translation_and_mat3x3.md linguist-generated=true +translation_rotation_scale3d.md linguist-generated=true +utf8.md linguist-generated=true +uvec2d.md linguist-generated=true +uvec3d.md linguist-generated=true +uvec4d.md linguist-generated=true +vec2d.md linguist-generated=true +vec3d.md linguist-generated=true +vec4d.md linguist-generated=true diff --git a/docs/content/reference/types/datatypes/color.md b/docs/content/reference/types/datatypes/color.md deleted file mode 100644 index 12718949b73c..000000000000 --- a/docs/content/reference/types/datatypes/color.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: "Color" ---- - -An RGBA color with unmultiplied/separate alpha, in sRGB gamma space with linear alpha. - -The color is stored as a 32-bit integer, where the most significant -byte is `R` and the least significant byte is `A`. - - - -## Used by - -* [`Color`](../components/color.md) -* [`AnnotationInfo`](../datatypes/annotation_info.md) -* [`Material`](../datatypes/material.md) diff --git a/rerun_cpp/.gitattributes b/rerun_cpp/.gitattributes deleted file mode 100644 index 2e54db6c91b1..000000000000 --- a/rerun_cpp/.gitattributes +++ /dev/null @@ -1,255 +0,0 @@ -# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs - -.gitattributes linguist-generated=true -src/rerun/archetypes/annotation_context.cpp linguist-generated=true -src/rerun/archetypes/annotation_context.hpp linguist-generated=true -src/rerun/archetypes/arrows3d.cpp linguist-generated=true -src/rerun/archetypes/arrows3d.hpp linguist-generated=true -src/rerun/archetypes/asset3d.cpp linguist-generated=true -src/rerun/archetypes/asset3d.hpp linguist-generated=true -src/rerun/archetypes/bar_chart.cpp linguist-generated=true -src/rerun/archetypes/bar_chart.hpp linguist-generated=true -src/rerun/archetypes/boxes2d.cpp linguist-generated=true -src/rerun/archetypes/boxes2d.hpp linguist-generated=true -src/rerun/archetypes/boxes3d.cpp linguist-generated=true -src/rerun/archetypes/boxes3d.hpp linguist-generated=true -src/rerun/archetypes/clear.cpp linguist-generated=true -src/rerun/archetypes/clear.hpp linguist-generated=true -src/rerun/archetypes/depth_image.cpp linguist-generated=true -src/rerun/archetypes/depth_image.hpp linguist-generated=true -src/rerun/archetypes/disconnected_space.cpp linguist-generated=true -src/rerun/archetypes/disconnected_space.hpp linguist-generated=true -src/rerun/archetypes/image.cpp linguist-generated=true -src/rerun/archetypes/image.hpp linguist-generated=true -src/rerun/archetypes/line_strips2d.cpp linguist-generated=true -src/rerun/archetypes/line_strips2d.hpp linguist-generated=true -src/rerun/archetypes/line_strips3d.cpp linguist-generated=true -src/rerun/archetypes/line_strips3d.hpp linguist-generated=true -src/rerun/archetypes/mesh3d.cpp linguist-generated=true -src/rerun/archetypes/mesh3d.hpp linguist-generated=true -src/rerun/archetypes/pinhole.cpp linguist-generated=true -src/rerun/archetypes/pinhole.hpp linguist-generated=true -src/rerun/archetypes/points2d.cpp linguist-generated=true -src/rerun/archetypes/points2d.hpp linguist-generated=true -src/rerun/archetypes/points3d.cpp linguist-generated=true -src/rerun/archetypes/points3d.hpp linguist-generated=true -src/rerun/archetypes/segmentation_image.cpp linguist-generated=true -src/rerun/archetypes/segmentation_image.hpp linguist-generated=true -src/rerun/archetypes/tensor.cpp linguist-generated=true -src/rerun/archetypes/tensor.hpp linguist-generated=true -src/rerun/archetypes/text_document.cpp linguist-generated=true -src/rerun/archetypes/text_document.hpp linguist-generated=true -src/rerun/archetypes/text_log.cpp linguist-generated=true -src/rerun/archetypes/text_log.hpp linguist-generated=true -src/rerun/archetypes/time_series_scalar.cpp linguist-generated=true -src/rerun/archetypes/time_series_scalar.hpp linguist-generated=true -src/rerun/archetypes/transform3d.cpp linguist-generated=true -src/rerun/archetypes/transform3d.hpp linguist-generated=true -src/rerun/archetypes/view_coordinates.cpp linguist-generated=true -src/rerun/archetypes/view_coordinates.hpp linguist-generated=true -src/rerun/archetypes.hpp linguist-generated=true -src/rerun/blueprint/auto_space_views.cpp linguist-generated=true -src/rerun/blueprint/auto_space_views.hpp linguist-generated=true -src/rerun/blueprint/panel_view.cpp linguist-generated=true -src/rerun/blueprint/panel_view.hpp linguist-generated=true -src/rerun/blueprint.hpp linguist-generated=true -src/rerun/components/annotation_context.cpp linguist-generated=true -src/rerun/components/annotation_context.hpp linguist-generated=true -src/rerun/components/blob.cpp linguist-generated=true -src/rerun/components/blob.hpp linguist-generated=true -src/rerun/components/class_id.cpp linguist-generated=true -src/rerun/components/class_id.hpp linguist-generated=true -src/rerun/components/clear_is_recursive.cpp linguist-generated=true -src/rerun/components/clear_is_recursive.hpp linguist-generated=true -src/rerun/components/color.cpp linguist-generated=true -src/rerun/components/color.hpp linguist-generated=true -src/rerun/components/depth_meter.cpp linguist-generated=true -src/rerun/components/depth_meter.hpp linguist-generated=true -src/rerun/components/disconnected_space.cpp linguist-generated=true -src/rerun/components/disconnected_space.hpp linguist-generated=true -src/rerun/components/draw_order.cpp linguist-generated=true -src/rerun/components/draw_order.hpp linguist-generated=true -src/rerun/components/half_sizes2d.cpp linguist-generated=true -src/rerun/components/half_sizes2d.hpp linguist-generated=true -src/rerun/components/half_sizes3d.cpp linguist-generated=true -src/rerun/components/half_sizes3d.hpp linguist-generated=true -src/rerun/components/instance_key.cpp linguist-generated=true -src/rerun/components/instance_key.hpp linguist-generated=true -src/rerun/components/keypoint_id.cpp linguist-generated=true -src/rerun/components/keypoint_id.hpp linguist-generated=true -src/rerun/components/line_strip2d.cpp linguist-generated=true -src/rerun/components/line_strip2d.hpp linguist-generated=true -src/rerun/components/line_strip3d.cpp linguist-generated=true -src/rerun/components/line_strip3d.hpp linguist-generated=true -src/rerun/components/material.cpp linguist-generated=true -src/rerun/components/material.hpp linguist-generated=true -src/rerun/components/media_type.cpp linguist-generated=true -src/rerun/components/media_type.hpp linguist-generated=true -src/rerun/components/mesh_properties.cpp linguist-generated=true -src/rerun/components/mesh_properties.hpp linguist-generated=true -src/rerun/components/out_of_tree_transform3d.cpp linguist-generated=true -src/rerun/components/out_of_tree_transform3d.hpp linguist-generated=true -src/rerun/components/pinhole_projection.cpp linguist-generated=true -src/rerun/components/pinhole_projection.hpp linguist-generated=true -src/rerun/components/position2d.cpp linguist-generated=true -src/rerun/components/position2d.hpp linguist-generated=true -src/rerun/components/position3d.cpp linguist-generated=true -src/rerun/components/position3d.hpp linguist-generated=true -src/rerun/components/radius.cpp linguist-generated=true -src/rerun/components/radius.hpp linguist-generated=true -src/rerun/components/resolution.cpp linguist-generated=true -src/rerun/components/resolution.hpp linguist-generated=true -src/rerun/components/rotation3d.cpp linguist-generated=true -src/rerun/components/rotation3d.hpp linguist-generated=true -src/rerun/components/scalar.cpp linguist-generated=true -src/rerun/components/scalar.hpp linguist-generated=true -src/rerun/components/scalar_scattering.cpp linguist-generated=true -src/rerun/components/scalar_scattering.hpp linguist-generated=true -src/rerun/components/tensor_data.cpp linguist-generated=true -src/rerun/components/tensor_data.hpp linguist-generated=true -src/rerun/components/text.cpp linguist-generated=true -src/rerun/components/text.hpp linguist-generated=true -src/rerun/components/text_log_level.cpp linguist-generated=true -src/rerun/components/text_log_level.hpp linguist-generated=true -src/rerun/components/transform3d.cpp linguist-generated=true -src/rerun/components/transform3d.hpp linguist-generated=true -src/rerun/components/vector3d.cpp linguist-generated=true -src/rerun/components/vector3d.hpp linguist-generated=true -src/rerun/components/view_coordinates.cpp linguist-generated=true -src/rerun/components/view_coordinates.hpp linguist-generated=true -src/rerun/components.hpp linguist-generated=true -src/rerun/datatypes/angle.cpp linguist-generated=true -src/rerun/datatypes/angle.hpp linguist-generated=true -src/rerun/datatypes/annotation_info.cpp linguist-generated=true -src/rerun/datatypes/annotation_info.hpp linguist-generated=true -src/rerun/datatypes/class_description.cpp linguist-generated=true -src/rerun/datatypes/class_description.hpp linguist-generated=true -src/rerun/datatypes/class_description_map_elem.cpp linguist-generated=true -src/rerun/datatypes/class_description_map_elem.hpp linguist-generated=true -src/rerun/datatypes/class_id.cpp linguist-generated=true -src/rerun/datatypes/class_id.hpp linguist-generated=true -src/rerun/datatypes/float32.cpp linguist-generated=true -src/rerun/datatypes/float32.hpp linguist-generated=true -src/rerun/datatypes/keypoint_id.cpp linguist-generated=true -src/rerun/datatypes/keypoint_id.hpp linguist-generated=true -src/rerun/datatypes/keypoint_pair.cpp linguist-generated=true -src/rerun/datatypes/keypoint_pair.hpp linguist-generated=true -src/rerun/datatypes/mat3x3.cpp linguist-generated=true -src/rerun/datatypes/mat3x3.hpp linguist-generated=true -src/rerun/datatypes/mat4x4.cpp linguist-generated=true -src/rerun/datatypes/mat4x4.hpp linguist-generated=true -src/rerun/datatypes/material.cpp linguist-generated=true -src/rerun/datatypes/material.hpp linguist-generated=true -src/rerun/datatypes/mesh_properties.cpp linguist-generated=true -src/rerun/datatypes/mesh_properties.hpp linguist-generated=true -src/rerun/datatypes/quaternion.cpp linguist-generated=true -src/rerun/datatypes/quaternion.hpp linguist-generated=true -src/rerun/datatypes/rgba32.cpp linguist-generated=true -src/rerun/datatypes/rgba32.hpp linguist-generated=true -src/rerun/datatypes/rotation3d.cpp linguist-generated=true -src/rerun/datatypes/rotation3d.hpp linguist-generated=true -src/rerun/datatypes/rotation_axis_angle.cpp linguist-generated=true -src/rerun/datatypes/rotation_axis_angle.hpp linguist-generated=true -src/rerun/datatypes/scale3d.cpp linguist-generated=true -src/rerun/datatypes/scale3d.hpp linguist-generated=true -src/rerun/datatypes/tensor_buffer.cpp linguist-generated=true -src/rerun/datatypes/tensor_buffer.hpp linguist-generated=true -src/rerun/datatypes/tensor_data.cpp linguist-generated=true -src/rerun/datatypes/tensor_data.hpp linguist-generated=true -src/rerun/datatypes/tensor_dimension.cpp linguist-generated=true -src/rerun/datatypes/tensor_dimension.hpp linguist-generated=true -src/rerun/datatypes/transform3d.cpp linguist-generated=true -src/rerun/datatypes/transform3d.hpp linguist-generated=true -src/rerun/datatypes/translation_and_mat3x3.cpp linguist-generated=true -src/rerun/datatypes/translation_and_mat3x3.hpp linguist-generated=true -src/rerun/datatypes/translation_rotation_scale3d.cpp linguist-generated=true -src/rerun/datatypes/translation_rotation_scale3d.hpp linguist-generated=true -src/rerun/datatypes/utf8.cpp linguist-generated=true -src/rerun/datatypes/utf8.hpp linguist-generated=true -src/rerun/datatypes/uvec2d.cpp linguist-generated=true -src/rerun/datatypes/uvec2d.hpp linguist-generated=true -src/rerun/datatypes/uvec3d.cpp linguist-generated=true -src/rerun/datatypes/uvec3d.hpp linguist-generated=true -src/rerun/datatypes/uvec4d.cpp linguist-generated=true -src/rerun/datatypes/uvec4d.hpp linguist-generated=true -src/rerun/datatypes/vec2d.cpp linguist-generated=true -src/rerun/datatypes/vec2d.hpp linguist-generated=true -src/rerun/datatypes/vec3d.cpp linguist-generated=true -src/rerun/datatypes/vec3d.hpp linguist-generated=true -src/rerun/datatypes/vec4d.cpp linguist-generated=true -src/rerun/datatypes/vec4d.hpp linguist-generated=true -src/rerun/datatypes.hpp linguist-generated=true -tests/generated/archetypes/affix_fuzzer1.cpp linguist-generated=true -tests/generated/archetypes/affix_fuzzer1.hpp linguist-generated=true -tests/generated/archetypes/affix_fuzzer2.cpp linguist-generated=true -tests/generated/archetypes/affix_fuzzer2.hpp linguist-generated=true -tests/generated/archetypes/affix_fuzzer3.cpp linguist-generated=true -tests/generated/archetypes/affix_fuzzer3.hpp linguist-generated=true -tests/generated/archetypes/affix_fuzzer4.cpp linguist-generated=true -tests/generated/archetypes/affix_fuzzer4.hpp linguist-generated=true -tests/generated/archetypes.hpp linguist-generated=true -tests/generated/blueprint.hpp linguist-generated=true -tests/generated/components/affix_fuzzer1.cpp linguist-generated=true -tests/generated/components/affix_fuzzer1.hpp linguist-generated=true -tests/generated/components/affix_fuzzer10.cpp linguist-generated=true -tests/generated/components/affix_fuzzer10.hpp linguist-generated=true -tests/generated/components/affix_fuzzer11.cpp linguist-generated=true -tests/generated/components/affix_fuzzer11.hpp linguist-generated=true -tests/generated/components/affix_fuzzer12.cpp linguist-generated=true -tests/generated/components/affix_fuzzer12.hpp linguist-generated=true -tests/generated/components/affix_fuzzer13.cpp linguist-generated=true -tests/generated/components/affix_fuzzer13.hpp linguist-generated=true -tests/generated/components/affix_fuzzer14.cpp linguist-generated=true -tests/generated/components/affix_fuzzer14.hpp linguist-generated=true -tests/generated/components/affix_fuzzer15.cpp linguist-generated=true -tests/generated/components/affix_fuzzer15.hpp linguist-generated=true -tests/generated/components/affix_fuzzer16.cpp linguist-generated=true -tests/generated/components/affix_fuzzer16.hpp linguist-generated=true -tests/generated/components/affix_fuzzer17.cpp linguist-generated=true -tests/generated/components/affix_fuzzer17.hpp linguist-generated=true -tests/generated/components/affix_fuzzer18.cpp linguist-generated=true -tests/generated/components/affix_fuzzer18.hpp linguist-generated=true -tests/generated/components/affix_fuzzer19.cpp linguist-generated=true -tests/generated/components/affix_fuzzer19.hpp linguist-generated=true -tests/generated/components/affix_fuzzer2.cpp linguist-generated=true -tests/generated/components/affix_fuzzer2.hpp linguist-generated=true -tests/generated/components/affix_fuzzer20.cpp linguist-generated=true -tests/generated/components/affix_fuzzer20.hpp linguist-generated=true -tests/generated/components/affix_fuzzer21.cpp linguist-generated=true -tests/generated/components/affix_fuzzer21.hpp linguist-generated=true -tests/generated/components/affix_fuzzer3.cpp linguist-generated=true -tests/generated/components/affix_fuzzer3.hpp linguist-generated=true -tests/generated/components/affix_fuzzer4.cpp linguist-generated=true -tests/generated/components/affix_fuzzer4.hpp linguist-generated=true -tests/generated/components/affix_fuzzer5.cpp linguist-generated=true -tests/generated/components/affix_fuzzer5.hpp linguist-generated=true -tests/generated/components/affix_fuzzer6.cpp linguist-generated=true -tests/generated/components/affix_fuzzer6.hpp linguist-generated=true -tests/generated/components/affix_fuzzer7.cpp linguist-generated=true -tests/generated/components/affix_fuzzer7.hpp linguist-generated=true -tests/generated/components/affix_fuzzer8.cpp linguist-generated=true -tests/generated/components/affix_fuzzer8.hpp linguist-generated=true -tests/generated/components/affix_fuzzer9.cpp linguist-generated=true -tests/generated/components/affix_fuzzer9.hpp linguist-generated=true -tests/generated/components.hpp linguist-generated=true -tests/generated/datatypes/affix_fuzzer1.cpp linguist-generated=true -tests/generated/datatypes/affix_fuzzer1.hpp linguist-generated=true -tests/generated/datatypes/affix_fuzzer2.cpp linguist-generated=true -tests/generated/datatypes/affix_fuzzer2.hpp linguist-generated=true -tests/generated/datatypes/affix_fuzzer20.cpp linguist-generated=true -tests/generated/datatypes/affix_fuzzer20.hpp linguist-generated=true -tests/generated/datatypes/affix_fuzzer21.cpp linguist-generated=true -tests/generated/datatypes/affix_fuzzer21.hpp linguist-generated=true -tests/generated/datatypes/affix_fuzzer3.cpp linguist-generated=true -tests/generated/datatypes/affix_fuzzer3.hpp linguist-generated=true -tests/generated/datatypes/affix_fuzzer4.cpp linguist-generated=true -tests/generated/datatypes/affix_fuzzer4.hpp linguist-generated=true -tests/generated/datatypes/affix_fuzzer5.cpp linguist-generated=true -tests/generated/datatypes/affix_fuzzer5.hpp linguist-generated=true -tests/generated/datatypes/flattened_scalar.cpp linguist-generated=true -tests/generated/datatypes/flattened_scalar.hpp linguist-generated=true -tests/generated/datatypes/primitive_component.cpp linguist-generated=true -tests/generated/datatypes/primitive_component.hpp linguist-generated=true -tests/generated/datatypes/string_component.cpp linguist-generated=true -tests/generated/datatypes/string_component.hpp linguist-generated=true -tests/generated/datatypes.hpp linguist-generated=true diff --git a/rerun_cpp/src/.gitattributes b/rerun_cpp/src/.gitattributes deleted file mode 100644 index dcc592a4a0b3..000000000000 --- a/rerun_cpp/src/.gitattributes +++ /dev/null @@ -1,146 +0,0 @@ -.gitattributes linguist-generated=true -archetypes/affix_fuzzer1.cpp linguist-generated=true -archetypes/affix_fuzzer1.hpp linguist-generated=true -archetypes/annotation_context.cpp linguist-generated=true -archetypes/annotation_context.hpp linguist-generated=true -archetypes/arrows3d.cpp linguist-generated=true -archetypes/arrows3d.hpp linguist-generated=true -archetypes/disconnected_space.cpp linguist-generated=true -archetypes/disconnected_space.hpp linguist-generated=true -archetypes/line_strips2d.cpp linguist-generated=true -archetypes/line_strips2d.hpp linguist-generated=true -archetypes/line_strips3d.cpp linguist-generated=true -archetypes/line_strips3d.hpp linguist-generated=true -archetypes/points2d.cpp linguist-generated=true -archetypes/points2d.hpp linguist-generated=true -archetypes/points3d.cpp linguist-generated=true -archetypes/points3d.hpp linguist-generated=true -archetypes/transform3d.cpp linguist-generated=true -archetypes/transform3d.hpp linguist-generated=true -archetypes.hpp linguist-generated=true -components/affix_fuzzer1.cpp linguist-generated=true -components/affix_fuzzer1.hpp linguist-generated=true -components/affix_fuzzer10.cpp linguist-generated=true -components/affix_fuzzer10.hpp linguist-generated=true -components/affix_fuzzer11.cpp linguist-generated=true -components/affix_fuzzer11.hpp linguist-generated=true -components/affix_fuzzer12.cpp linguist-generated=true -components/affix_fuzzer12.hpp linguist-generated=true -components/affix_fuzzer13.cpp linguist-generated=true -components/affix_fuzzer13.hpp linguist-generated=true -components/affix_fuzzer14.cpp linguist-generated=true -components/affix_fuzzer14.hpp linguist-generated=true -components/affix_fuzzer15.cpp linguist-generated=true -components/affix_fuzzer15.hpp linguist-generated=true -components/affix_fuzzer16.cpp linguist-generated=true -components/affix_fuzzer16.hpp linguist-generated=true -components/affix_fuzzer17.cpp linguist-generated=true -components/affix_fuzzer17.hpp linguist-generated=true -components/affix_fuzzer18.cpp linguist-generated=true -components/affix_fuzzer18.hpp linguist-generated=true -components/affix_fuzzer19.cpp linguist-generated=true -components/affix_fuzzer19.hpp linguist-generated=true -components/affix_fuzzer2.cpp linguist-generated=true -components/affix_fuzzer2.hpp linguist-generated=true -components/affix_fuzzer20.cpp linguist-generated=true -components/affix_fuzzer20.hpp linguist-generated=true -components/affix_fuzzer3.cpp linguist-generated=true -components/affix_fuzzer3.hpp linguist-generated=true -components/affix_fuzzer4.cpp linguist-generated=true -components/affix_fuzzer4.hpp linguist-generated=true -components/affix_fuzzer5.cpp linguist-generated=true -components/affix_fuzzer5.hpp linguist-generated=true -components/affix_fuzzer6.cpp linguist-generated=true -components/affix_fuzzer6.hpp linguist-generated=true -components/affix_fuzzer7.cpp linguist-generated=true -components/affix_fuzzer7.hpp linguist-generated=true -components/affix_fuzzer8.cpp linguist-generated=true -components/affix_fuzzer8.hpp linguist-generated=true -components/affix_fuzzer9.cpp linguist-generated=true -components/affix_fuzzer9.hpp linguist-generated=true -components/annotation_context.cpp linguist-generated=true -components/annotation_context.hpp linguist-generated=true -components/class_id.cpp linguist-generated=true -components/class_id.hpp linguist-generated=true -components/color.cpp linguist-generated=true -components/color.hpp linguist-generated=true -components/disconnected_space.cpp linguist-generated=true -components/disconnected_space.hpp linguist-generated=true -components/draw_order.cpp linguist-generated=true -components/draw_order.hpp linguist-generated=true -components/instance_key.cpp linguist-generated=true -components/instance_key.hpp linguist-generated=true -components/keypoint_id.cpp linguist-generated=true -components/keypoint_id.hpp linguist-generated=true -components/label.cpp linguist-generated=true -components/label.hpp linguist-generated=true -components/line_strip2d.cpp linguist-generated=true -components/line_strip2d.hpp linguist-generated=true -components/line_strip3d.cpp linguist-generated=true -components/line_strip3d.hpp linguist-generated=true -components/origin3d.cpp linguist-generated=true -components/origin3d.hpp linguist-generated=true -components/point2d.cpp linguist-generated=true -components/point2d.hpp linguist-generated=true -components/point3d.cpp linguist-generated=true -components/point3d.hpp linguist-generated=true -components/primitive_component.cpp linguist-generated=true -components/primitive_component.hpp linguist-generated=true -components/radius.cpp linguist-generated=true -components/radius.hpp linguist-generated=true -components/string_component.cpp linguist-generated=true -components/string_component.hpp linguist-generated=true -components/transform3d.cpp linguist-generated=true -components/transform3d.hpp linguist-generated=true -components/vector3d.cpp linguist-generated=true -components/vector3d.hpp linguist-generated=true -components.hpp linguist-generated=true -datatypes/affix_fuzzer1.cpp linguist-generated=true -datatypes/affix_fuzzer1.hpp linguist-generated=true -datatypes/affix_fuzzer2.cpp linguist-generated=true -datatypes/affix_fuzzer2.hpp linguist-generated=true -datatypes/affix_fuzzer20.cpp linguist-generated=true -datatypes/affix_fuzzer20.hpp linguist-generated=true -datatypes/affix_fuzzer3.cpp linguist-generated=true -datatypes/affix_fuzzer3.hpp linguist-generated=true -datatypes/affix_fuzzer4.cpp linguist-generated=true -datatypes/affix_fuzzer4.hpp linguist-generated=true -datatypes/affix_fuzzer5.cpp linguist-generated=true -datatypes/affix_fuzzer5.hpp linguist-generated=true -datatypes/angle.cpp linguist-generated=true -datatypes/angle.hpp linguist-generated=true -datatypes/annotation_info.cpp linguist-generated=true -datatypes/annotation_info.hpp linguist-generated=true -datatypes/class_description.cpp linguist-generated=true -datatypes/class_description.hpp linguist-generated=true -datatypes/class_description_map_elem.cpp linguist-generated=true -datatypes/class_description_map_elem.hpp linguist-generated=true -datatypes/flattened_scalar.cpp linguist-generated=true -datatypes/flattened_scalar.hpp linguist-generated=true -datatypes/keypoint_pair.cpp linguist-generated=true -datatypes/keypoint_pair.hpp linguist-generated=true -datatypes/mat3x3.cpp linguist-generated=true -datatypes/mat3x3.hpp linguist-generated=true -datatypes/mat4x4.cpp linguist-generated=true -datatypes/mat4x4.hpp linguist-generated=true -datatypes/quaternion.cpp linguist-generated=true -datatypes/quaternion.hpp linguist-generated=true -datatypes/rotation3d.cpp linguist-generated=true -datatypes/rotation3d.hpp linguist-generated=true -datatypes/rotation_axis_angle.cpp linguist-generated=true -datatypes/rotation_axis_angle.hpp linguist-generated=true -datatypes/scale3d.cpp linguist-generated=true -datatypes/scale3d.hpp linguist-generated=true -datatypes/transform3d.cpp linguist-generated=true -datatypes/transform3d.hpp linguist-generated=true -datatypes/translation_and_mat3x3.cpp linguist-generated=true -datatypes/translation_and_mat3x3.hpp linguist-generated=true -datatypes/translation_rotation_scale3d.cpp linguist-generated=true -datatypes/translation_rotation_scale3d.hpp linguist-generated=true -datatypes/vec2d.cpp linguist-generated=true -datatypes/vec2d.hpp linguist-generated=true -datatypes/vec3d.cpp linguist-generated=true -datatypes/vec3d.hpp linguist-generated=true -datatypes/vec4d.cpp linguist-generated=true -datatypes/vec4d.hpp linguist-generated=true -datatypes.hpp linguist-generated=true diff --git a/rerun_cpp/src/rerun/.gitattributes b/rerun_cpp/src/rerun/.gitattributes index 64f40987279f..967d56cb0784 100644 --- a/rerun_cpp/src/rerun/.gitattributes +++ b/rerun_cpp/src/rerun/.gitattributes @@ -1,174 +1,7 @@ # DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs .gitattributes linguist-generated=true -archetypes/affix_fuzzer1.cpp linguist-generated=true -archetypes/affix_fuzzer1.hpp linguist-generated=true -archetypes/annotation_context.cpp linguist-generated=true -archetypes/annotation_context.hpp linguist-generated=true -archetypes/arrows3d.cpp linguist-generated=true -archetypes/arrows3d.hpp linguist-generated=true -archetypes/disconnected_space.cpp linguist-generated=true -archetypes/disconnected_space.hpp linguist-generated=true -archetypes/image_base.cpp linguist-generated=true -archetypes/image_base.hpp linguist-generated=true -archetypes/line_strips2d.cpp linguist-generated=true -archetypes/line_strips2d.hpp linguist-generated=true -archetypes/line_strips3d.cpp linguist-generated=true -archetypes/line_strips3d.hpp linguist-generated=true -archetypes/points2d.cpp linguist-generated=true -archetypes/points2d.hpp linguist-generated=true -archetypes/points3d.cpp linguist-generated=true -archetypes/points3d.hpp linguist-generated=true -archetypes/tensor.cpp linguist-generated=true -archetypes/tensor.hpp linguist-generated=true -archetypes/transform3d.cpp linguist-generated=true -archetypes/transform3d.hpp linguist-generated=true archetypes.hpp linguist-generated=true -components/affix_fuzzer1.cpp linguist-generated=true -components/affix_fuzzer1.hpp linguist-generated=true -components/affix_fuzzer10.cpp linguist-generated=true -components/affix_fuzzer10.hpp linguist-generated=true -components/affix_fuzzer11.cpp linguist-generated=true -components/affix_fuzzer11.hpp linguist-generated=true -components/affix_fuzzer12.cpp linguist-generated=true -components/affix_fuzzer12.hpp linguist-generated=true -components/affix_fuzzer13.cpp linguist-generated=true -components/affix_fuzzer13.hpp linguist-generated=true -components/affix_fuzzer14.cpp linguist-generated=true -components/affix_fuzzer14.hpp linguist-generated=true -components/affix_fuzzer15.cpp linguist-generated=true -components/affix_fuzzer15.hpp linguist-generated=true -components/affix_fuzzer16.cpp linguist-generated=true -components/affix_fuzzer16.hpp linguist-generated=true -components/affix_fuzzer17.cpp linguist-generated=true -components/affix_fuzzer17.hpp linguist-generated=true -components/affix_fuzzer18.cpp linguist-generated=true -components/affix_fuzzer18.hpp linguist-generated=true -components/affix_fuzzer19.cpp linguist-generated=true -components/affix_fuzzer19.hpp linguist-generated=true -components/affix_fuzzer2.cpp linguist-generated=true -components/affix_fuzzer2.hpp linguist-generated=true -components/affix_fuzzer20.cpp linguist-generated=true -components/affix_fuzzer20.hpp linguist-generated=true -components/affix_fuzzer3.cpp linguist-generated=true -components/affix_fuzzer3.hpp linguist-generated=true -components/affix_fuzzer4.cpp linguist-generated=true -components/affix_fuzzer4.hpp linguist-generated=true -components/affix_fuzzer5.cpp linguist-generated=true -components/affix_fuzzer5.hpp linguist-generated=true -components/affix_fuzzer6.cpp linguist-generated=true -components/affix_fuzzer6.hpp linguist-generated=true -components/affix_fuzzer7.cpp linguist-generated=true -components/affix_fuzzer7.hpp linguist-generated=true -components/affix_fuzzer8.cpp linguist-generated=true -components/affix_fuzzer8.hpp linguist-generated=true -components/affix_fuzzer9.cpp linguist-generated=true -components/affix_fuzzer9.hpp linguist-generated=true -components/annotation_context.cpp linguist-generated=true -components/annotation_context.hpp linguist-generated=true -components/class_id.cpp linguist-generated=true -components/class_id.hpp linguist-generated=true -components/color.cpp linguist-generated=true -components/color.hpp linguist-generated=true -components/disconnected_space.cpp linguist-generated=true -components/disconnected_space.hpp linguist-generated=true -components/draw_order.cpp linguist-generated=true -components/draw_order.hpp linguist-generated=true -components/image_variant.cpp linguist-generated=true -components/image_variant.hpp linguist-generated=true -components/instance_key.cpp linguist-generated=true -components/instance_key.hpp linguist-generated=true -components/keypoint_id.cpp linguist-generated=true -components/keypoint_id.hpp linguist-generated=true -components/label.cpp linguist-generated=true -components/label.hpp linguist-generated=true -components/line_strip2d.cpp linguist-generated=true -components/line_strip2d.hpp linguist-generated=true -components/line_strip3d.cpp linguist-generated=true -components/line_strip3d.hpp linguist-generated=true -components/origin3d.cpp linguist-generated=true -components/origin3d.hpp linguist-generated=true -components/point2d.cpp linguist-generated=true -components/point2d.hpp linguist-generated=true -components/point3d.cpp linguist-generated=true -components/point3d.hpp linguist-generated=true -components/radius.cpp linguist-generated=true -components/radius.hpp linguist-generated=true -components/tensor_data.cpp linguist-generated=true -components/tensor_data.hpp linguist-generated=true -components/transform3d.cpp linguist-generated=true -components/transform3d.hpp linguist-generated=true -components/vector3d.cpp linguist-generated=true -components/vector3d.hpp linguist-generated=true +blueprint.hpp linguist-generated=true components.hpp linguist-generated=true -datatypes/affix_fuzzer1.cpp linguist-generated=true -datatypes/affix_fuzzer1.hpp linguist-generated=true -datatypes/affix_fuzzer2.cpp linguist-generated=true -datatypes/affix_fuzzer2.hpp linguist-generated=true -datatypes/affix_fuzzer20.cpp linguist-generated=true -datatypes/affix_fuzzer20.hpp linguist-generated=true -datatypes/affix_fuzzer3.cpp linguist-generated=true -datatypes/affix_fuzzer3.hpp linguist-generated=true -datatypes/affix_fuzzer4.cpp linguist-generated=true -datatypes/affix_fuzzer4.hpp linguist-generated=true -datatypes/affix_fuzzer5.cpp linguist-generated=true -datatypes/affix_fuzzer5.hpp linguist-generated=true -datatypes/angle.cpp linguist-generated=true -datatypes/angle.hpp linguist-generated=true -datatypes/annotation_info.cpp linguist-generated=true -datatypes/annotation_info.hpp linguist-generated=true -datatypes/class_description.cpp linguist-generated=true -datatypes/class_description.hpp linguist-generated=true -datatypes/class_description_map_elem.cpp linguist-generated=true -datatypes/class_description_map_elem.hpp linguist-generated=true -datatypes/class_id.cpp linguist-generated=true -datatypes/class_id.hpp linguist-generated=true -datatypes/rgba32.cpp linguist-generated=true -datatypes/rgba32.hpp linguist-generated=true -datatypes/flattened_scalar.cpp linguist-generated=true -datatypes/flattened_scalar.hpp linguist-generated=true -datatypes/image_variant.cpp linguist-generated=true -datatypes/image_variant.hpp linguist-generated=true -datatypes/keypoint_id.cpp linguist-generated=true -datatypes/keypoint_id.hpp linguist-generated=true -datatypes/keypoint_pair.cpp linguist-generated=true -datatypes/keypoint_pair.hpp linguist-generated=true -datatypes/label.cpp linguist-generated=true -datatypes/label.hpp linguist-generated=true -datatypes/mat3x3.cpp linguist-generated=true -datatypes/mat3x3.hpp linguist-generated=true -datatypes/mat4x4.cpp linguist-generated=true -datatypes/mat4x4.hpp linguist-generated=true -datatypes/primitive_component.cpp linguist-generated=true -datatypes/primitive_component.hpp linguist-generated=true -datatypes/quaternion.cpp linguist-generated=true -datatypes/quaternion.hpp linguist-generated=true -datatypes/rotation3d.cpp linguist-generated=true -datatypes/rotation3d.hpp linguist-generated=true -datatypes/rotation_axis_angle.cpp linguist-generated=true -datatypes/rotation_axis_angle.hpp linguist-generated=true -datatypes/scale3d.cpp linguist-generated=true -datatypes/scale3d.hpp linguist-generated=true -datatypes/string_component.cpp linguist-generated=true -datatypes/string_component.hpp linguist-generated=true -datatypes/tensor_buffer.cpp linguist-generated=true -datatypes/tensor_buffer.hpp linguist-generated=true -datatypes/tensor_data.cpp linguist-generated=true -datatypes/tensor_data.hpp linguist-generated=true -datatypes/tensor_dimension.cpp linguist-generated=true -datatypes/tensor_dimension.hpp linguist-generated=true -datatypes/tensor_id.cpp linguist-generated=true -datatypes/tensor_id.hpp linguist-generated=true -datatypes/transform3d.cpp linguist-generated=true -datatypes/transform3d.hpp linguist-generated=true -datatypes/translation_and_mat3x3.cpp linguist-generated=true -datatypes/translation_and_mat3x3.hpp linguist-generated=true -datatypes/translation_rotation_scale3d.cpp linguist-generated=true -datatypes/translation_rotation_scale3d.hpp linguist-generated=true -datatypes/vec2d.cpp linguist-generated=true -datatypes/vec2d.hpp linguist-generated=true -datatypes/vec3d.cpp linguist-generated=true -datatypes/vec3d.hpp linguist-generated=true -datatypes/vec4d.cpp linguist-generated=true -datatypes/vec4d.hpp linguist-generated=true datatypes.hpp linguist-generated=true diff --git a/rerun_cpp/src/rerun/archetypes/.gitattributes b/rerun_cpp/src/rerun/archetypes/.gitattributes new file mode 100644 index 000000000000..2bc3f24c154a --- /dev/null +++ b/rerun_cpp/src/rerun/archetypes/.gitattributes @@ -0,0 +1,49 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +annotation_context.cpp linguist-generated=true +annotation_context.hpp linguist-generated=true +arrows3d.cpp linguist-generated=true +arrows3d.hpp linguist-generated=true +asset3d.cpp linguist-generated=true +asset3d.hpp linguist-generated=true +bar_chart.cpp linguist-generated=true +bar_chart.hpp linguist-generated=true +boxes2d.cpp linguist-generated=true +boxes2d.hpp linguist-generated=true +boxes3d.cpp linguist-generated=true +boxes3d.hpp linguist-generated=true +clear.cpp linguist-generated=true +clear.hpp linguist-generated=true +depth_image.cpp linguist-generated=true +depth_image.hpp linguist-generated=true +disconnected_space.cpp linguist-generated=true +disconnected_space.hpp linguist-generated=true +image.cpp linguist-generated=true +image.hpp linguist-generated=true +line_strips2d.cpp linguist-generated=true +line_strips2d.hpp linguist-generated=true +line_strips3d.cpp linguist-generated=true +line_strips3d.hpp linguist-generated=true +mesh3d.cpp linguist-generated=true +mesh3d.hpp linguist-generated=true +pinhole.cpp linguist-generated=true +pinhole.hpp linguist-generated=true +points2d.cpp linguist-generated=true +points2d.hpp linguist-generated=true +points3d.cpp linguist-generated=true +points3d.hpp linguist-generated=true +segmentation_image.cpp linguist-generated=true +segmentation_image.hpp linguist-generated=true +tensor.cpp linguist-generated=true +tensor.hpp linguist-generated=true +text_document.cpp linguist-generated=true +text_document.hpp linguist-generated=true +text_log.cpp linguist-generated=true +text_log.hpp linguist-generated=true +time_series_scalar.cpp linguist-generated=true +time_series_scalar.hpp linguist-generated=true +transform3d.cpp linguist-generated=true +transform3d.hpp linguist-generated=true +view_coordinates.cpp linguist-generated=true +view_coordinates.hpp linguist-generated=true diff --git a/rerun_cpp/src/rerun/blueprint/.gitattributes b/rerun_cpp/src/rerun/blueprint/.gitattributes new file mode 100644 index 000000000000..d281233c01b0 --- /dev/null +++ b/rerun_cpp/src/rerun/blueprint/.gitattributes @@ -0,0 +1,7 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +auto_space_views.cpp linguist-generated=true +auto_space_views.hpp linguist-generated=true +panel_view.cpp linguist-generated=true +panel_view.hpp linguist-generated=true diff --git a/rerun_cpp/src/rerun/components/.gitattributes b/rerun_cpp/src/rerun/components/.gitattributes new file mode 100644 index 000000000000..01880938e1aa --- /dev/null +++ b/rerun_cpp/src/rerun/components/.gitattributes @@ -0,0 +1,67 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +annotation_context.cpp linguist-generated=true +annotation_context.hpp linguist-generated=true +blob.cpp linguist-generated=true +blob.hpp linguist-generated=true +class_id.cpp linguist-generated=true +class_id.hpp linguist-generated=true +clear_is_recursive.cpp linguist-generated=true +clear_is_recursive.hpp linguist-generated=true +color.cpp linguist-generated=true +color.hpp linguist-generated=true +depth_meter.cpp linguist-generated=true +depth_meter.hpp linguist-generated=true +disconnected_space.cpp linguist-generated=true +disconnected_space.hpp linguist-generated=true +draw_order.cpp linguist-generated=true +draw_order.hpp linguist-generated=true +half_sizes2d.cpp linguist-generated=true +half_sizes2d.hpp linguist-generated=true +half_sizes3d.cpp linguist-generated=true +half_sizes3d.hpp linguist-generated=true +instance_key.cpp linguist-generated=true +instance_key.hpp linguist-generated=true +keypoint_id.cpp linguist-generated=true +keypoint_id.hpp linguist-generated=true +line_strip2d.cpp linguist-generated=true +line_strip2d.hpp linguist-generated=true +line_strip3d.cpp linguist-generated=true +line_strip3d.hpp linguist-generated=true +material.cpp linguist-generated=true +material.hpp linguist-generated=true +media_type.cpp linguist-generated=true +media_type.hpp linguist-generated=true +mesh_properties.cpp linguist-generated=true +mesh_properties.hpp linguist-generated=true +out_of_tree_transform3d.cpp linguist-generated=true +out_of_tree_transform3d.hpp linguist-generated=true +pinhole_projection.cpp linguist-generated=true +pinhole_projection.hpp linguist-generated=true +position2d.cpp linguist-generated=true +position2d.hpp linguist-generated=true +position3d.cpp linguist-generated=true +position3d.hpp linguist-generated=true +radius.cpp linguist-generated=true +radius.hpp linguist-generated=true +resolution.cpp linguist-generated=true +resolution.hpp linguist-generated=true +rotation3d.cpp linguist-generated=true +rotation3d.hpp linguist-generated=true +scalar.cpp linguist-generated=true +scalar.hpp linguist-generated=true +scalar_scattering.cpp linguist-generated=true +scalar_scattering.hpp linguist-generated=true +tensor_data.cpp linguist-generated=true +tensor_data.hpp linguist-generated=true +text.cpp linguist-generated=true +text.hpp linguist-generated=true +text_log_level.cpp linguist-generated=true +text_log_level.hpp linguist-generated=true +transform3d.cpp linguist-generated=true +transform3d.hpp linguist-generated=true +vector3d.cpp linguist-generated=true +vector3d.hpp linguist-generated=true +view_coordinates.cpp linguist-generated=true +view_coordinates.hpp linguist-generated=true diff --git a/rerun_cpp/src/rerun/datatypes/.gitattributes b/rerun_cpp/src/rerun/datatypes/.gitattributes new file mode 100644 index 000000000000..feb75fb5632a --- /dev/null +++ b/rerun_cpp/src/rerun/datatypes/.gitattributes @@ -0,0 +1,63 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +angle.cpp linguist-generated=true +angle.hpp linguist-generated=true +annotation_info.cpp linguist-generated=true +annotation_info.hpp linguist-generated=true +class_description.cpp linguist-generated=true +class_description.hpp linguist-generated=true +class_description_map_elem.cpp linguist-generated=true +class_description_map_elem.hpp linguist-generated=true +class_id.cpp linguist-generated=true +class_id.hpp linguist-generated=true +float32.cpp linguist-generated=true +float32.hpp linguist-generated=true +keypoint_id.cpp linguist-generated=true +keypoint_id.hpp linguist-generated=true +keypoint_pair.cpp linguist-generated=true +keypoint_pair.hpp linguist-generated=true +mat3x3.cpp linguist-generated=true +mat3x3.hpp linguist-generated=true +mat4x4.cpp linguist-generated=true +mat4x4.hpp linguist-generated=true +material.cpp linguist-generated=true +material.hpp linguist-generated=true +mesh_properties.cpp linguist-generated=true +mesh_properties.hpp linguist-generated=true +quaternion.cpp linguist-generated=true +quaternion.hpp linguist-generated=true +rgba32.cpp linguist-generated=true +rgba32.hpp linguist-generated=true +rotation3d.cpp linguist-generated=true +rotation3d.hpp linguist-generated=true +rotation_axis_angle.cpp linguist-generated=true +rotation_axis_angle.hpp linguist-generated=true +scale3d.cpp linguist-generated=true +scale3d.hpp linguist-generated=true +tensor_buffer.cpp linguist-generated=true +tensor_buffer.hpp linguist-generated=true +tensor_data.cpp linguist-generated=true +tensor_data.hpp linguist-generated=true +tensor_dimension.cpp linguist-generated=true +tensor_dimension.hpp linguist-generated=true +transform3d.cpp linguist-generated=true +transform3d.hpp linguist-generated=true +translation_and_mat3x3.cpp linguist-generated=true +translation_and_mat3x3.hpp linguist-generated=true +translation_rotation_scale3d.cpp linguist-generated=true +translation_rotation_scale3d.hpp linguist-generated=true +utf8.cpp linguist-generated=true +utf8.hpp linguist-generated=true +uvec2d.cpp linguist-generated=true +uvec2d.hpp linguist-generated=true +uvec3d.cpp linguist-generated=true +uvec3d.hpp linguist-generated=true +uvec4d.cpp linguist-generated=true +uvec4d.hpp linguist-generated=true +vec2d.cpp linguist-generated=true +vec2d.hpp linguist-generated=true +vec3d.cpp linguist-generated=true +vec3d.hpp linguist-generated=true +vec4d.cpp linguist-generated=true +vec4d.hpp linguist-generated=true diff --git a/rerun_cpp/tests/generated/.gitattributes b/rerun_cpp/tests/generated/.gitattributes new file mode 100644 index 000000000000..967d56cb0784 --- /dev/null +++ b/rerun_cpp/tests/generated/.gitattributes @@ -0,0 +1,7 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +archetypes.hpp linguist-generated=true +blueprint.hpp linguist-generated=true +components.hpp linguist-generated=true +datatypes.hpp linguist-generated=true diff --git a/rerun_cpp/tests/generated/archetypes/.gitattributes b/rerun_cpp/tests/generated/archetypes/.gitattributes new file mode 100644 index 000000000000..98acad38c73c --- /dev/null +++ b/rerun_cpp/tests/generated/archetypes/.gitattributes @@ -0,0 +1,11 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +affix_fuzzer1.cpp linguist-generated=true +affix_fuzzer1.hpp linguist-generated=true +affix_fuzzer2.cpp linguist-generated=true +affix_fuzzer2.hpp linguist-generated=true +affix_fuzzer3.cpp linguist-generated=true +affix_fuzzer3.hpp linguist-generated=true +affix_fuzzer4.cpp linguist-generated=true +affix_fuzzer4.hpp linguist-generated=true diff --git a/rerun_cpp/tests/generated/components/.gitattributes b/rerun_cpp/tests/generated/components/.gitattributes new file mode 100644 index 000000000000..2142d72b70da --- /dev/null +++ b/rerun_cpp/tests/generated/components/.gitattributes @@ -0,0 +1,45 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +affix_fuzzer1.cpp linguist-generated=true +affix_fuzzer1.hpp linguist-generated=true +affix_fuzzer10.cpp linguist-generated=true +affix_fuzzer10.hpp linguist-generated=true +affix_fuzzer11.cpp linguist-generated=true +affix_fuzzer11.hpp linguist-generated=true +affix_fuzzer12.cpp linguist-generated=true +affix_fuzzer12.hpp linguist-generated=true +affix_fuzzer13.cpp linguist-generated=true +affix_fuzzer13.hpp linguist-generated=true +affix_fuzzer14.cpp linguist-generated=true +affix_fuzzer14.hpp linguist-generated=true +affix_fuzzer15.cpp linguist-generated=true +affix_fuzzer15.hpp linguist-generated=true +affix_fuzzer16.cpp linguist-generated=true +affix_fuzzer16.hpp linguist-generated=true +affix_fuzzer17.cpp linguist-generated=true +affix_fuzzer17.hpp linguist-generated=true +affix_fuzzer18.cpp linguist-generated=true +affix_fuzzer18.hpp linguist-generated=true +affix_fuzzer19.cpp linguist-generated=true +affix_fuzzer19.hpp linguist-generated=true +affix_fuzzer2.cpp linguist-generated=true +affix_fuzzer2.hpp linguist-generated=true +affix_fuzzer20.cpp linguist-generated=true +affix_fuzzer20.hpp linguist-generated=true +affix_fuzzer21.cpp linguist-generated=true +affix_fuzzer21.hpp linguist-generated=true +affix_fuzzer3.cpp linguist-generated=true +affix_fuzzer3.hpp linguist-generated=true +affix_fuzzer4.cpp linguist-generated=true +affix_fuzzer4.hpp linguist-generated=true +affix_fuzzer5.cpp linguist-generated=true +affix_fuzzer5.hpp linguist-generated=true +affix_fuzzer6.cpp linguist-generated=true +affix_fuzzer6.hpp linguist-generated=true +affix_fuzzer7.cpp linguist-generated=true +affix_fuzzer7.hpp linguist-generated=true +affix_fuzzer8.cpp linguist-generated=true +affix_fuzzer8.hpp linguist-generated=true +affix_fuzzer9.cpp linguist-generated=true +affix_fuzzer9.hpp linguist-generated=true diff --git a/rerun_cpp/tests/generated/datatypes/.gitattributes b/rerun_cpp/tests/generated/datatypes/.gitattributes new file mode 100644 index 000000000000..7759e695ded7 --- /dev/null +++ b/rerun_cpp/tests/generated/datatypes/.gitattributes @@ -0,0 +1,23 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +affix_fuzzer1.cpp linguist-generated=true +affix_fuzzer1.hpp linguist-generated=true +affix_fuzzer2.cpp linguist-generated=true +affix_fuzzer2.hpp linguist-generated=true +affix_fuzzer20.cpp linguist-generated=true +affix_fuzzer20.hpp linguist-generated=true +affix_fuzzer21.cpp linguist-generated=true +affix_fuzzer21.hpp linguist-generated=true +affix_fuzzer3.cpp linguist-generated=true +affix_fuzzer3.hpp linguist-generated=true +affix_fuzzer4.cpp linguist-generated=true +affix_fuzzer4.hpp linguist-generated=true +affix_fuzzer5.cpp linguist-generated=true +affix_fuzzer5.hpp linguist-generated=true +flattened_scalar.cpp linguist-generated=true +flattened_scalar.hpp linguist-generated=true +primitive_component.cpp linguist-generated=true +primitive_component.hpp linguist-generated=true +string_component.cpp linguist-generated=true +string_component.hpp linguist-generated=true diff --git a/rerun_py/rerun_sdk/rerun/.gitattributes b/rerun_py/rerun_sdk/rerun/.gitattributes deleted file mode 100644 index ca3ad1f0014f..000000000000 --- a/rerun_py/rerun_sdk/rerun/.gitattributes +++ /dev/null @@ -1,94 +0,0 @@ -# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs - -.gitattributes linguist-generated=true -archetypes/__init__.py linguist-generated=true -archetypes/annotation_context.py linguist-generated=true -archetypes/arrows3d.py linguist-generated=true -archetypes/asset3d.py linguist-generated=true -archetypes/bar_chart.py linguist-generated=true -archetypes/boxes2d.py linguist-generated=true -archetypes/boxes3d.py linguist-generated=true -archetypes/clear.py linguist-generated=true -archetypes/depth_image.py linguist-generated=true -archetypes/disconnected_space.py linguist-generated=true -archetypes/image.py linguist-generated=true -archetypes/line_strips2d.py linguist-generated=true -archetypes/line_strips3d.py linguist-generated=true -archetypes/mesh3d.py linguist-generated=true -archetypes/pinhole.py linguist-generated=true -archetypes/points2d.py linguist-generated=true -archetypes/points3d.py linguist-generated=true -archetypes/segmentation_image.py linguist-generated=true -archetypes/tensor.py linguist-generated=true -archetypes/text_document.py linguist-generated=true -archetypes/text_log.py linguist-generated=true -archetypes/time_series_scalar.py linguist-generated=true -archetypes/transform3d.py linguist-generated=true -archetypes/view_coordinates.py linguist-generated=true -blueprint/__init__.py linguist-generated=true -blueprint/auto_space_views.py linguist-generated=true -blueprint/panel_view.py linguist-generated=true -components/__init__.py linguist-generated=true -components/annotation_context.py linguist-generated=true -components/blob.py linguist-generated=true -components/class_id.py linguist-generated=true -components/clear_is_recursive.py linguist-generated=true -components/color.py linguist-generated=true -components/depth_meter.py linguist-generated=true -components/disconnected_space.py linguist-generated=true -components/draw_order.py linguist-generated=true -components/half_sizes2d.py linguist-generated=true -components/half_sizes3d.py linguist-generated=true -components/instance_key.py linguist-generated=true -components/keypoint_id.py linguist-generated=true -components/line_strip2d.py linguist-generated=true -components/line_strip3d.py linguist-generated=true -components/material.py linguist-generated=true -components/media_type.py linguist-generated=true -components/mesh_properties.py linguist-generated=true -components/out_of_tree_transform3d.py linguist-generated=true -components/pinhole_projection.py linguist-generated=true -components/position2d.py linguist-generated=true -components/position3d.py linguist-generated=true -components/radius.py linguist-generated=true -components/resolution.py linguist-generated=true -components/rotation3d.py linguist-generated=true -components/scalar.py linguist-generated=true -components/scalar_scattering.py linguist-generated=true -components/tensor_data.py linguist-generated=true -components/text.py linguist-generated=true -components/text_log_level.py linguist-generated=true -components/transform3d.py linguist-generated=true -components/vector3d.py linguist-generated=true -components/view_coordinates.py linguist-generated=true -datatypes/__init__.py linguist-generated=true -datatypes/angle.py linguist-generated=true -datatypes/annotation_info.py linguist-generated=true -datatypes/class_description.py linguist-generated=true -datatypes/class_description_map_elem.py linguist-generated=true -datatypes/class_id.py linguist-generated=true -datatypes/float32.py linguist-generated=true -datatypes/keypoint_id.py linguist-generated=true -datatypes/keypoint_pair.py linguist-generated=true -datatypes/mat3x3.py linguist-generated=true -datatypes/mat4x4.py linguist-generated=true -datatypes/material.py linguist-generated=true -datatypes/mesh_properties.py linguist-generated=true -datatypes/quaternion.py linguist-generated=true -datatypes/rgba32.py linguist-generated=true -datatypes/rotation3d.py linguist-generated=true -datatypes/rotation_axis_angle.py linguist-generated=true -datatypes/scale3d.py linguist-generated=true -datatypes/tensor_buffer.py linguist-generated=true -datatypes/tensor_data.py linguist-generated=true -datatypes/tensor_dimension.py linguist-generated=true -datatypes/transform3d.py linguist-generated=true -datatypes/translation_and_mat3x3.py linguist-generated=true -datatypes/translation_rotation_scale3d.py linguist-generated=true -datatypes/utf8.py linguist-generated=true -datatypes/uvec2d.py linguist-generated=true -datatypes/uvec3d.py linguist-generated=true -datatypes/uvec4d.py linguist-generated=true -datatypes/vec2d.py linguist-generated=true -datatypes/vec3d.py linguist-generated=true -datatypes/vec4d.py linguist-generated=true diff --git a/rerun_py/rerun_sdk/rerun/archetypes/.gitattributes b/rerun_py/rerun_sdk/rerun/archetypes/.gitattributes new file mode 100644 index 000000000000..11fe41e5f984 --- /dev/null +++ b/rerun_py/rerun_sdk/rerun/archetypes/.gitattributes @@ -0,0 +1,27 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +__init__.py linguist-generated=true +annotation_context.py linguist-generated=true +arrows3d.py linguist-generated=true +asset3d.py linguist-generated=true +bar_chart.py linguist-generated=true +boxes2d.py linguist-generated=true +boxes3d.py linguist-generated=true +clear.py linguist-generated=true +depth_image.py linguist-generated=true +disconnected_space.py linguist-generated=true +image.py linguist-generated=true +line_strips2d.py linguist-generated=true +line_strips3d.py linguist-generated=true +mesh3d.py linguist-generated=true +pinhole.py linguist-generated=true +points2d.py linguist-generated=true +points3d.py linguist-generated=true +segmentation_image.py linguist-generated=true +tensor.py linguist-generated=true +text_document.py linguist-generated=true +text_log.py linguist-generated=true +time_series_scalar.py linguist-generated=true +transform3d.py linguist-generated=true +view_coordinates.py linguist-generated=true diff --git a/rerun_py/rerun_sdk/rerun/blueprint/.gitattributes b/rerun_py/rerun_sdk/rerun/blueprint/.gitattributes new file mode 100644 index 000000000000..5867cf8bd58f --- /dev/null +++ b/rerun_py/rerun_sdk/rerun/blueprint/.gitattributes @@ -0,0 +1,6 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +__init__.py linguist-generated=true +auto_space_views.py linguist-generated=true +panel_view.py linguist-generated=true diff --git a/rerun_py/rerun_sdk/rerun/components/.gitattributes b/rerun_py/rerun_sdk/rerun/components/.gitattributes new file mode 100644 index 000000000000..4ffb6ae98728 --- /dev/null +++ b/rerun_py/rerun_sdk/rerun/components/.gitattributes @@ -0,0 +1,36 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +__init__.py linguist-generated=true +annotation_context.py linguist-generated=true +blob.py linguist-generated=true +class_id.py linguist-generated=true +clear_is_recursive.py linguist-generated=true +color.py linguist-generated=true +depth_meter.py linguist-generated=true +disconnected_space.py linguist-generated=true +draw_order.py linguist-generated=true +half_sizes2d.py linguist-generated=true +half_sizes3d.py linguist-generated=true +instance_key.py linguist-generated=true +keypoint_id.py linguist-generated=true +line_strip2d.py linguist-generated=true +line_strip3d.py linguist-generated=true +material.py linguist-generated=true +media_type.py linguist-generated=true +mesh_properties.py linguist-generated=true +out_of_tree_transform3d.py linguist-generated=true +pinhole_projection.py linguist-generated=true +position2d.py linguist-generated=true +position3d.py linguist-generated=true +radius.py linguist-generated=true +resolution.py linguist-generated=true +rotation3d.py linguist-generated=true +scalar.py linguist-generated=true +scalar_scattering.py linguist-generated=true +tensor_data.py linguist-generated=true +text.py linguist-generated=true +text_log_level.py linguist-generated=true +transform3d.py linguist-generated=true +vector3d.py linguist-generated=true +view_coordinates.py linguist-generated=true diff --git a/rerun_py/rerun_sdk/rerun/datatypes/.gitattributes b/rerun_py/rerun_sdk/rerun/datatypes/.gitattributes new file mode 100644 index 000000000000..b8fb7c7c8dab --- /dev/null +++ b/rerun_py/rerun_sdk/rerun/datatypes/.gitattributes @@ -0,0 +1,34 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +__init__.py linguist-generated=true +angle.py linguist-generated=true +annotation_info.py linguist-generated=true +class_description.py linguist-generated=true +class_description_map_elem.py linguist-generated=true +class_id.py linguist-generated=true +float32.py linguist-generated=true +keypoint_id.py linguist-generated=true +keypoint_pair.py linguist-generated=true +mat3x3.py linguist-generated=true +mat4x4.py linguist-generated=true +material.py linguist-generated=true +mesh_properties.py linguist-generated=true +quaternion.py linguist-generated=true +rgba32.py linguist-generated=true +rotation3d.py linguist-generated=true +rotation_axis_angle.py linguist-generated=true +scale3d.py linguist-generated=true +tensor_buffer.py linguist-generated=true +tensor_data.py linguist-generated=true +tensor_dimension.py linguist-generated=true +transform3d.py linguist-generated=true +translation_and_mat3x3.py linguist-generated=true +translation_rotation_scale3d.py linguist-generated=true +utf8.py linguist-generated=true +uvec2d.py linguist-generated=true +uvec3d.py linguist-generated=true +uvec4d.py linguist-generated=true +vec2d.py linguist-generated=true +vec3d.py linguist-generated=true +vec4d.py linguist-generated=true diff --git a/rerun_py/tests/test_types/.gitattributes b/rerun_py/tests/test_types/.gitattributes deleted file mode 100644 index 1c99c30f4223..000000000000 --- a/rerun_py/tests/test_types/.gitattributes +++ /dev/null @@ -1,42 +0,0 @@ -# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs - -.gitattributes linguist-generated=true -archetypes/__init__.py linguist-generated=true -archetypes/affix_fuzzer1.py linguist-generated=true -archetypes/affix_fuzzer2.py linguist-generated=true -archetypes/affix_fuzzer3.py linguist-generated=true -archetypes/affix_fuzzer4.py linguist-generated=true -blueprint/__init__.py linguist-generated=true -components/__init__.py linguist-generated=true -components/affix_fuzzer1.py linguist-generated=true -components/affix_fuzzer10.py linguist-generated=true -components/affix_fuzzer11.py linguist-generated=true -components/affix_fuzzer12.py linguist-generated=true -components/affix_fuzzer13.py linguist-generated=true -components/affix_fuzzer14.py linguist-generated=true -components/affix_fuzzer15.py linguist-generated=true -components/affix_fuzzer16.py linguist-generated=true -components/affix_fuzzer17.py linguist-generated=true -components/affix_fuzzer18.py linguist-generated=true -components/affix_fuzzer19.py linguist-generated=true -components/affix_fuzzer2.py linguist-generated=true -components/affix_fuzzer20.py linguist-generated=true -components/affix_fuzzer21.py linguist-generated=true -components/affix_fuzzer3.py linguist-generated=true -components/affix_fuzzer4.py linguist-generated=true -components/affix_fuzzer5.py linguist-generated=true -components/affix_fuzzer6.py linguist-generated=true -components/affix_fuzzer7.py linguist-generated=true -components/affix_fuzzer8.py linguist-generated=true -components/affix_fuzzer9.py linguist-generated=true -datatypes/__init__.py linguist-generated=true -datatypes/affix_fuzzer1.py linguist-generated=true -datatypes/affix_fuzzer2.py linguist-generated=true -datatypes/affix_fuzzer20.py linguist-generated=true -datatypes/affix_fuzzer21.py linguist-generated=true -datatypes/affix_fuzzer3.py linguist-generated=true -datatypes/affix_fuzzer4.py linguist-generated=true -datatypes/affix_fuzzer5.py linguist-generated=true -datatypes/flattened_scalar.py linguist-generated=true -datatypes/primitive_component.py linguist-generated=true -datatypes/string_component.py linguist-generated=true diff --git a/rerun_py/tests/test_types/archetypes/.gitattributes b/rerun_py/tests/test_types/archetypes/.gitattributes new file mode 100644 index 000000000000..db9f62cec28a --- /dev/null +++ b/rerun_py/tests/test_types/archetypes/.gitattributes @@ -0,0 +1,8 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +__init__.py linguist-generated=true +affix_fuzzer1.py linguist-generated=true +affix_fuzzer2.py linguist-generated=true +affix_fuzzer3.py linguist-generated=true +affix_fuzzer4.py linguist-generated=true diff --git a/rerun_py/tests/test_types/blueprint/.gitattributes b/rerun_py/tests/test_types/blueprint/.gitattributes new file mode 100644 index 000000000000..fd2ebff59be3 --- /dev/null +++ b/rerun_py/tests/test_types/blueprint/.gitattributes @@ -0,0 +1,4 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +__init__.py linguist-generated=true diff --git a/rerun_py/tests/test_types/components/.gitattributes b/rerun_py/tests/test_types/components/.gitattributes new file mode 100644 index 000000000000..887e160de89b --- /dev/null +++ b/rerun_py/tests/test_types/components/.gitattributes @@ -0,0 +1,25 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +__init__.py linguist-generated=true +affix_fuzzer1.py linguist-generated=true +affix_fuzzer10.py linguist-generated=true +affix_fuzzer11.py linguist-generated=true +affix_fuzzer12.py linguist-generated=true +affix_fuzzer13.py linguist-generated=true +affix_fuzzer14.py linguist-generated=true +affix_fuzzer15.py linguist-generated=true +affix_fuzzer16.py linguist-generated=true +affix_fuzzer17.py linguist-generated=true +affix_fuzzer18.py linguist-generated=true +affix_fuzzer19.py linguist-generated=true +affix_fuzzer2.py linguist-generated=true +affix_fuzzer20.py linguist-generated=true +affix_fuzzer21.py linguist-generated=true +affix_fuzzer3.py linguist-generated=true +affix_fuzzer4.py linguist-generated=true +affix_fuzzer5.py linguist-generated=true +affix_fuzzer6.py linguist-generated=true +affix_fuzzer7.py linguist-generated=true +affix_fuzzer8.py linguist-generated=true +affix_fuzzer9.py linguist-generated=true diff --git a/rerun_py/tests/test_types/datatypes/.gitattributes b/rerun_py/tests/test_types/datatypes/.gitattributes new file mode 100644 index 000000000000..00f162ef439f --- /dev/null +++ b/rerun_py/tests/test_types/datatypes/.gitattributes @@ -0,0 +1,14 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +__init__.py linguist-generated=true +affix_fuzzer1.py linguist-generated=true +affix_fuzzer2.py linguist-generated=true +affix_fuzzer20.py linguist-generated=true +affix_fuzzer21.py linguist-generated=true +affix_fuzzer3.py linguist-generated=true +affix_fuzzer4.py linguist-generated=true +affix_fuzzer5.py linguist-generated=true +flattened_scalar.py linguist-generated=true +primitive_component.py linguist-generated=true +string_component.py linguist-generated=true