Skip to content

Conversation

@TimDiekmann
Copy link
Member

🌟 What is the purpose of this PR?

Rust 1.83 enables a bunch of new features (we're currently on 1.63 and a lot has been added since then)

🔍 What does this change?

  • Bump MSRV to 1.83
  • Remove unneeded cfg-flags
  • Satisfy linting

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • modifies a Cargo-publishable library, but it is not yet ready to publish

📜 Does this require a change to the docs?

The changes in this PR:

  • require changes to docs which are made as part of this PR

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

🐾 Next steps

  • Remove Context in favor of core::error::Error
  • Remove once-cell in favor of std::sync::LazyLock

@TimDiekmann TimDiekmann requested a review from indietyp October 7, 2024 07:44
@TimDiekmann TimDiekmann self-assigned this Oct 7, 2024
@github-actions github-actions bot added area/infra Relates to version control, CI, CD or IaC (area) area/libs > error-stack Affects the `error-stack` crate (library) area/libs Relates to first-party libraries/crates/packages (area) area/tests New or updated tests labels Oct 7, 2024
# Conflicts:
#	libs/error-stack/README.md
#	libs/error-stack/build.rs
#	libs/error-stack/macros/README.md
#	libs/error-stack/src/lib.rs
@codecov
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 21.33%. Comparing base (dbc27b8) to head (6faddbf).
Report is 1227 commits behind head on main.

Files with missing lines Patch % Lines
libs/error-stack/src/compat/anyhow.rs 0.00% 1 Missing ⚠️
libs/error-stack/src/error.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5333      +/-   ##
==========================================
+ Coverage   20.23%   21.33%   +1.10%     
==========================================
  Files         508      508              
  Lines       17260    17611     +351     
  Branches     2537     2537              
==========================================
+ Hits         3492     3757     +265     
- Misses      13730    13816      +86     
  Partials       38       38              
Flag Coverage Δ
apps.hash-ai-worker-ts 1.39% <ø> (ø)
apps.hash-api 1.19% <ø> (ø)
local.hash-backend-utils 8.81% <ø> (ø)
local.hash-isomorphic-utils 1.06% <ø> (ø)
local.hash-subgraph 24.32% <ø> (ø)
rust.deer 5.88% <ø> (ø)
rust.error-stack 73.06% <60.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

Benchmark results

@rust/graph-benches – Integrations

representative_read_entity

Function Value Mean Flame graphs
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$16.5 \mathrm{ms} \pm 231 \mathrm{μs}\left({\color{lightgreen}-27.323 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$17.1 \mathrm{ms} \pm 225 \mathrm{μs}\left({\color{gray}2.43 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$16.7 \mathrm{ms} \pm 261 \mathrm{μs}\left({\color{red}6.44 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$16.1 \mathrm{ms} \pm 199 \mathrm{μs}\left({\color{lightgreen}-33.573 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$16.8 \mathrm{ms} \pm 195 \mathrm{μs}\left({\color{gray}2.09 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$17.3 \mathrm{ms} \pm 216 \mathrm{μs}\left({\color{red}5.27 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$16.1 \mathrm{ms} \pm 185 \mathrm{μs}\left({\color{gray}0.713 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$16.8 \mathrm{ms} \pm 200 \mathrm{μs}\left({\color{gray}-0.115 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$16.3 \mathrm{ms} \pm 230 \mathrm{μs}\left({\color{red}5.26 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity_type

Function Value Mean Flame graphs
get_entity_type_by_id Account ID: d4e16033-c281-4cde-aa35-9085bf2e7579 $$1.40 \mathrm{ms} \pm 4.53 \mathrm{μs}\left({\color{gray}-0.361 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_complete_zero_depth

Function Value Mean Flame graphs
entity_by_id 50 entities $$4.10 \mathrm{ms} \pm 21.4 \mathrm{μs}\left({\color{gray}-2.869 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$2.01 \mathrm{ms} \pm 11.5 \mathrm{μs}\left({\color{gray}-1.976 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 25 entities $$2.56 \mathrm{ms} \pm 14.5 \mathrm{μs}\left({\color{lightgreen}-16.435 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$1.85 \mathrm{ms} \pm 10.5 \mathrm{μs}\left({\color{gray}-1.817 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$1.89 \mathrm{ms} \pm 10.4 \mathrm{μs}\left({\color{gray}0.662 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_linkless

Function Value Mean Flame graphs
entity_by_id 1000 entities $$3.03 \mathrm{ms} \pm 36.5 \mathrm{μs}\left({\color{red}8.69 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$2.03 \mathrm{ms} \pm 8.10 \mathrm{μs}\left({\color{gray}-1.515 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$1.84 \mathrm{ms} \pm 6.70 \mathrm{μs}\left({\color{gray}-0.153 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$12.3 \mathrm{ms} \pm 131 \mathrm{μs}\left({\color{gray}-2.204 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$1.87 \mathrm{ms} \pm 6.97 \mathrm{μs}\left({\color{gray}0.117 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property depths: DT=2, PT=2, ET=2, E=2 $$59.7 \mathrm{ms} \pm 414 \mathrm{μs}\left({\color{gray}-0.572 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=255, PT=255, ET=255, E=255 $$69.5 \mathrm{ms} \pm 443 \mathrm{μs}\left({\color{gray}-0.966 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=0 $$40.7 \mathrm{ms} \pm 223 \mathrm{μs}\left({\color{gray}1.88 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=2 $$44.3 \mathrm{ms} \pm 266 \mathrm{μs}\left({\color{gray}0.745 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=2, ET=2, E=2 $$55.0 \mathrm{ms} \pm 280 \mathrm{μs}\left({\color{gray}0.263 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=2, E=2 $$51.3 \mathrm{ms} \pm 500 \mathrm{μs}\left({\color{gray}1.54 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=2, PT=2, ET=2, E=2 $$101 \mathrm{ms} \pm 526 \mathrm{μs}\left({\color{gray}1.44 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=255, PT=255, ET=255, E=255 $$110 \mathrm{ms} \pm 496 \mathrm{μs}\left({\color{gray}0.975 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=0 $$44.0 \mathrm{ms} \pm 475 \mathrm{μs}\left({\color{gray}2.48 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=2 $$81.7 \mathrm{ms} \pm 536 \mathrm{μs}\left({\color{gray}-0.190 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=2, ET=2, E=2 $$96.7 \mathrm{ms} \pm 543 \mathrm{μs}\left({\color{gray}1.34 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=2, E=2 $$91.1 \mathrm{ms} \pm 401 \mathrm{μs}\left({\color{gray}0.088 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_complete_one_depth

Function Value Mean Flame graphs
entity_by_id 50 entities $$267 \mathrm{ms} \pm 1.46 \mathrm{ms}\left({\color{lightgreen}-33.620 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$51.1 \mathrm{ms} \pm 240 \mathrm{μs}\left({\color{red}60.9 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 25 entities $$74.3 \mathrm{ms} \pm 332 \mathrm{μs}\left({\color{gray}-0.197 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$19.8 \mathrm{ms} \pm 101 \mathrm{μs}\left({\color{gray}-1.343 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$25.0 \mathrm{ms} \pm 230 \mathrm{μs}\left({\color{gray}-0.302 \mathrm{\%}}\right) $$ Flame Graph

Copy link
Member

@indietyp indietyp left a comment

Choose a reason for hiding this comment

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

thank you, minor question

#[expect(
clippy::manual_try_fold,
reason = "false-positive, try_fold is fail-fast, our implementation is fail-slow"
)]
Copy link
Member

Choose a reason for hiding this comment

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

non-blocking: do we want to make use of our new traits in this example? or not because they're unstable.

Copy link
Member Author

Choose a reason for hiding this comment

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

I wouldn't use them, yet, as they are unstable and examples are meant to be consumed.

@TimDiekmann TimDiekmann added this pull request to the merge queue Oct 15, 2024
Merged via the queue into main with commit fbecbdd Oct 15, 2024
@TimDiekmann TimDiekmann deleted the t/gen-200-bump-msrv-for-error-stack branch October 15, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/infra Relates to version control, CI, CD or IaC (area) area/libs > error-stack Affects the `error-stack` crate (library) area/libs Relates to first-party libraries/crates/packages (area) area/tests New or updated tests

Development

Successfully merging this pull request may close these issues.

3 participants