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

refactor: Enhance error handling and messaging across modules #660

Merged
merged 6 commits into from
Sep 20, 2023

Conversation

huitseeker
Copy link
Member

@huitseeker huitseeker commented Sep 9, 2023

  • Enhanced error messages in multiple modules (clutch/src/lib.rs, fcomm/src/lib.rs, src/z_data/z_ptr.rs, and src/public_parameters/mem_cache.rs).
  • This includes displaying previously-silenced specific errors in proof key generation, expression/environment reading, base32 decoding, and disk write errors in the public parameters module.
  • Included map_err_ignore in project-wide Clippy lints in .cargo/config to increase overall quality of error handling.
  • ran a pass of inlining format arguments (using clippy)

Edit (Sept 17)

This now includes #673 :

  • removing an unnecessary panic,
  • removing global imports from LEM,
  • removing trivial numeric cases,
  • turning single-case matches into if lets in cases where it's more concise, and assorted Option/Result combinators

Edit (Sept 19)

  • clippy-driven removal of unused &mut parameters

arthurpaulino
arthurpaulino previously approved these changes Sep 9, 2023
Copy link
Member

@arthurpaulino arthurpaulino left a comment

Choose a reason for hiding this comment

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

👍🏼

porcuquine
porcuquine previously approved these changes Sep 20, 2023
- Enhanced clarity and detail of error messages in multiple modules (`clutch/src/lib.rs`, `fcomm/src/lib.rs`, `src/z_data/z_ptr.rs`, and `src/public_parameters/mem_cache.rs`).
- This includes displaying previously-silenced specific errors in proof key generation, expression/environment reading, base32 decoding, and disk write errors in the public parameters module.
- Enhanced error handling in `verify` function within `clutch/src/lib.rs` to improve program stability.
- Updated import specifications across numerous files for clarity:, these include changes to `backend.rs`, `circuit.rs`, `path.rs`, `eval.rs`, `macros.rs`, and `pointers.rs`.
- Modified and refactored code for improved error handling, examples include changes to `interpreter.rs`, `mod.rs`, `var_map.rs`, `writer.rs`, `store.rs`.
- Included implementation of Debug traits in `var_map.rs` and `zstore.rs`.
- Enhanced handling of invalid u16 values in `Tag` implementation
- Implemented several lint checks in `.cargo/config` to ensure code quality.
- Refined match syntax in the `num_paths_taken` method on `path.rs` and `fetch_symbol_path`, `read_maybe_meta`, `hash_ptr` on `store.rs` for better performance and error handling.
@huitseeker huitseeker added this pull request to the merge queue Sep 20, 2023
Merged via the queue into argumentcomputer:master with commit 078ceaa Sep 20, 2023
6 checks passed
@huitseeker huitseeker deleted the map_err_loss branch September 20, 2023 08:54
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.

3 participants