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

feat: reduce error size by boxing some errors #5577

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kamiyaa
Copy link
Collaborator

@kamiyaa kamiyaa commented Feb 26, 2025

Description

The purpose of this is to reduce memory usage for our agents. When trying to migrate to rust2024, it warned about certain error types being unnecessarily large and recommended us to box some error types to reduce memory footprint.
I set clippy.toml during development to:

large-error-threshold = 64

Then ran clippy. Then reduced all the errors that was showing a warning by boxing them.
VS Code mouse hover was also able to show size of different errors. But it wasn't able to for some error types :/

Backward compatibility

Yes

Testing

None

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.53%. Comparing base (e861535) to head (4eb25df).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5577   +/-   ##
=======================================
  Coverage   77.53%   77.53%           
=======================================
  Files         103      103           
  Lines        2110     2110           
  Branches      190      190           
=======================================
  Hits         1636     1636           
  Misses        453      453           
  Partials       21       21           
Components Coverage Δ
core 87.80% <ø> (ø)
hooks 79.39% <ø> (ø)
isms 83.68% <ø> (ø)
token 91.27% <ø> (ø)
middlewares 79.80% <ø> (ø)

@ameten
Copy link
Contributor

ameten commented Feb 27, 2025

I would like to understand better why we need to reduce the error sizes, what is the driver for the change? Possibly, it is worth to update the description of the PR.

minor: We don't need irrelevant empty sections in the description since they will be pushed as commit comment and will stay forever in the change history.

@daniel-savu daniel-savu added this pull request to the merge queue Feb 28, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Feb 28, 2025
Copy link

changeset-bot bot commented Feb 28, 2025

⚠️ No Changeset found

Latest commit: 4eb25df

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@daniel-savu daniel-savu added this pull request to the merge queue Feb 28, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

3 participants