Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce the Snippet Index #8383

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions crates/build/re_types_builder/src/bin/build_re_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const CPP_OUTPUT_DIR_PATH: &str = "rerun_cpp";
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";
const SNIPPETS_REF_DIR_PATH: &str = "docs/snippets/";

/// This uses [`rayon::scope`] to spawn all closures as tasks
/// running in parallel. It blocks until all tasks are done.
Expand Down Expand Up @@ -91,6 +92,7 @@ fn main() {
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);
let snippets_ref_dir_path = workspace_dir.join(SNIPPETS_REF_DIR_PATH);

let cur_hash = read_versioning_hash(&re_types_source_hash_path);
re_log::debug!("cur_hash: {cur_hash:?}");
Expand Down Expand Up @@ -159,6 +161,13 @@ fn main() {
&arrow_registry,
check,
),
|| re_types_builder::generate_snippets_ref(
&reporter,
snippets_ref_dir_path,
&objects,
&arrow_registry,
check,
),
);

report.finalize();
Expand Down
3 changes: 2 additions & 1 deletion crates/build/re_types_builder/src/codegen/docs/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mod arrow_datatype;
mod snippets_ref;
mod website;

pub use self::website::DocsCodeGenerator;
pub use self::{snippets_ref::SnippetsRefCodeGenerator, website::DocsCodeGenerator};
Loading
Loading