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

Store and retrieve timeSaved value from daemon #5101

Conversation

mehulkar
Copy link
Contributor

@mehulkar mehulkar commented May 25, 2023

No description provided.

@vercel
Copy link

vercel bot commented May 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo 🔄 Building (Inspect) Visit Preview 💬 Add feedback May 27, 2023 8:35pm
examples-tailwind-web 🔄 Building (Inspect) Visit Preview 💬 Add feedback May 27, 2023 8:35pm
9 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview May 27, 2023 8:35pm
examples-cra-web ⬜️ Ignored (Inspect) Visit Preview May 27, 2023 8:35pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview May 27, 2023 8:35pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview May 27, 2023 8:35pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview May 27, 2023 8:35pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview May 27, 2023 8:35pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview May 27, 2023 8:35pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview May 27, 2023 8:35pm
turbo-site ⬜️ Ignored (Inspect) Visit Preview May 27, 2023 8:35pm

@mehulkar
Copy link
Contributor Author

Currently stuck on:

error[E0596]: cannot borrow `__self.times_saved` as mutable, as it is behind a `&` reference
   --> crates/turborepo-lib/src/daemon/server.rs:261:9
    |
256 |           &self,
    |            ---- consider changing this binding's type to be: `&mut DaemonServer<T>`
...
261 | /         self.times_saved
262 | |             .insert(inner.hash.clone(), inner.time_saved);
    | |_________________________________________________________^ `__self` is a `&` reference, so the data it refers to cannot be borrowed as mutable

error[E0382]: borrow of moved value: `inner.hash`
   --> crates/turborepo-lib/src/daemon/server.rs:295:52
    |
289 |                 &Arc::new(inner.hash),
    |                           ---------- value moved here
...
295 |         if let Some(value) = self.times_saved.get(&inner.hash.clone()) {
    |                                                    ^^^^^^^^^^^^^^^^^^ value borrowed here after move

@github-actions
Copy link
Contributor

github-actions bot commented May 25, 2023

⚠️ CI failed ⚠️

The following steps have failed in CI:

  • Go lints
  • Go integration tests

See workflow summary for details

crates/turborepo-lib/src/daemon/server.rs Outdated Show resolved Hide resolved
crates/turborepo-lib/src/daemon/server.rs Outdated Show resolved Hide resolved
crates/turborepo-lib/src/daemon/server.rs Outdated Show resolved Hide resolved
crates/turborepo-lib/src/daemon/server.rs Outdated Show resolved Hide resolved
@mehulkar mehulkar marked this pull request as ready for review May 27, 2023 20:48
@mehulkar mehulkar requested a review from a team as a code owner May 27, 2023 20:48
@mehulkar mehulkar requested review from nathanhammond and chris-olszewski and removed request for a team May 27, 2023 20:48
@mehulkar
Copy link
Contributor Author

Thanks for the suggestions and explanations @chris-olszewski , that helped a lot! Merging this into #4952 to get a final review, it looks like its working well and I can pass values back and forth from the daemon now

@mehulkar mehulkar merged commit 2f1b9fd into mehulkar/turbo-1000-runs-include-timesaved-for-local-runs May 27, 2023
@mehulkar mehulkar deleted the mk/time-saved-rust-daemon branch May 27, 2023 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants