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

SDK batching/revamp 2.1: clock example for Rust #2000

Merged
merged 38 commits into from
May 4, 2023
Merged

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Apr 28, 2023

What the title says.

On top of #1983

@teh-cmc teh-cmc added examples Issues relating to the Rerun examples do-not-merge Do not merge this PR labels Apr 28, 2023
@teh-cmc teh-cmc changed the base branch from main to cmc/sdk_revamp/2_rust_revamp April 28, 2023 13:30
Base automatically changed from cmc/sdk_revamp/2_rust_revamp to main May 4, 2023 09:16
examples/rust/clock/Cargo.toml Outdated Show resolved Hide resolved
examples/rust/clock/src/main.rs Outdated Show resolved Hide resolved
@teh-cmc teh-cmc removed the do-not-merge Do not merge this PR label May 4, 2023
@Wumpf Wumpf self-requested a review May 4, 2023 09:53
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

makes sense, works as documented. Nice to have more rust examples for testing

Comment on lines +94 to +99
#[rustfmt::skip]
log_hand(rec_stream, "seconds", step, (step % 60) as f32 / 60.0, LENGTH_S, WIDTH_S, 0)?;
#[rustfmt::skip]
log_hand(rec_stream, "minutes", step, (step % 3600) as f32 / 3600.0, LENGTH_M, WIDTH_M, 128)?;
#[rustfmt::skip]
log_hand(rec_stream, "hours", step, (step % 43200) as f32 / 43200.0, LENGTH_H, WIDTH_H, 255)?;
Copy link
Member

Choose a reason for hiding this comment

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

#[rustfmt::skip] doesn't work on a block?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not on expressions, it's been nightly-only since the dawn of time... 😒

@teh-cmc teh-cmc merged commit f77a8ec into main May 4, 2023
@teh-cmc teh-cmc deleted the cmc/sdk_revamp/21_clock branch May 4, 2023 10:09
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

looks like you need to update cargo.lock again, noticed only when switching to a different branch now:

diff --git a/Cargo.lock b/Cargo.lock
index 304bd0417..2124b977e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -773,7 +773,7 @@ name = "clock"
 version = "0.6.0-alpha.0"
 dependencies = [
  "anyhow",
- "clap 4.1.4",
+ "clap 4.1.14",
  "glam",
  "rerun",
 ]

@Wumpf
Copy link
Member

Wumpf commented May 4, 2023

ah too late, uhoh. Guess this might give @jprochazk the main ci failure test 😄

@teh-cmc
Copy link
Member Author

teh-cmc commented May 4, 2023

Argh, these things drive me insane.

Eh, it'll get lazily fixed by the next PR I guess...

@teh-cmc
Copy link
Member Author

teh-cmc commented May 4, 2023

Which will be in about ten minutes thanks to #2026 👀

@jprochazk
Copy link
Member

Doesn't seem to have caused a failure 😢

@teh-cmc
Copy link
Member Author

teh-cmc commented May 4, 2023

Doesn't seem to have caused a failure cry

Yeah I'm not surprised: outdated lock files are annoying because they screw with everyone's local copy, but I don't remember we ever configured anything to detect these situations on the CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples Issues relating to the Rerun examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants