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

chore: refactor grit error #457

Merged
merged 6 commits into from
Aug 12, 2024
Merged

chore: refactor grit error #457

merged 6 commits into from
Aug 12, 2024

Conversation

seren5240
Copy link
Contributor

@seren5240 seren5240 commented Aug 12, 2024

Fixes #409

@seren5240 seren5240 marked this pull request as ready for review August 12, 2024 08:57
@seren5240 seren5240 requested a review from a team as a code owner August 12, 2024 08:57
Copy link
Contributor

coderabbitai bot commented Aug 12, 2024

Walkthrough

[!WARNING]

Walkthrough skipped

File diffs could not be summarized.


Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e13eec0 and 8ed3557.

Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing (82)
  • crates/core/src/ast_node.rs (3 hunks)
  • crates/core/src/clean.rs (2 hunks)
  • crates/core/src/equivalence.rs (1 hunks)
  • crates/core/src/foreign_function_definition.rs (5 hunks)
  • crates/core/src/inline_snippets.rs (9 hunks)
  • crates/core/src/marzano_binding.rs (9 hunks)
  • crates/core/src/marzano_code_snippet.rs (2 hunks)
  • crates/core/src/marzano_context.rs (11 hunks)
  • crates/core/src/marzano_resolved_pattern.rs (31 hunks)
  • crates/core/src/paths.rs (1 hunks)
  • crates/core/src/pattern_compiler/bubble_compiler.rs (2 hunks)
  • crates/core/src/pattern_compiler/compiler.rs (3 hunks)
  • crates/core/src/pattern_compiler/file_owner_compiler.rs (2 hunks)
  • crates/core/src/text_unparser.rs (2 hunks)
  • crates/grit-pattern-matcher/Cargo.toml (1 hunks)
  • crates/grit-pattern-matcher/src/binding.rs (4 hunks)
  • crates/grit-pattern-matcher/src/context.rs (4 hunks)
  • crates/grit-pattern-matcher/src/errors.rs (4 hunks)
  • crates/grit-pattern-matcher/src/pattern/accessor.rs (10 hunks)
  • crates/grit-pattern-matcher/src/pattern/accumulate.rs (6 hunks)
  • crates/grit-pattern-matcher/src/pattern/add.rs (4 hunks)
  • crates/grit-pattern-matcher/src/pattern/after.rs (3 hunks)
  • crates/grit-pattern-matcher/src/pattern/and.rs (3 hunks)
  • crates/grit-pattern-matcher/src/pattern/any.rs (3 hunks)
  • crates/grit-pattern-matcher/src/pattern/assignment.rs (3 hunks)
  • crates/grit-pattern-matcher/src/pattern/before.rs (3 hunks)
  • crates/grit-pattern-matcher/src/pattern/boolean_constant.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/bubble.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/call.rs (4 hunks)
  • crates/grit-pattern-matcher/src/pattern/call_built_in.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/container.rs (3 hunks)
  • crates/grit-pattern-matcher/src/pattern/contains.rs (3 hunks)
  • crates/grit-pattern-matcher/src/pattern/divide.rs (4 hunks)
  • crates/grit-pattern-matcher/src/pattern/dynamic_snippet.rs (3 hunks)
  • crates/grit-pattern-matcher/src/pattern/equal.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/every.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/file_pattern.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/files.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/float_constant.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/function_definition.rs (3 hunks)
  • crates/grit-pattern-matcher/src/pattern/functions.rs (4 hunks)
  • crates/grit-pattern-matcher/src/pattern/if.rs (3 hunks)
  • crates/grit-pattern-matcher/src/pattern/includes.rs (4 hunks)
  • crates/grit-pattern-matcher/src/pattern/int_constant.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/like.rs (3 hunks)
  • crates/grit-pattern-matcher/src/pattern/limit.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/list.rs (4 hunks)
  • crates/grit-pattern-matcher/src/pattern/list_index.rs (8 hunks)
  • crates/grit-pattern-matcher/src/pattern/log.rs (5 hunks)
  • crates/grit-pattern-matcher/src/pattern/map.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/match.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/maybe.rs (3 hunks)
  • crates/grit-pattern-matcher/src/pattern/modulo.rs (4 hunks)
  • crates/grit-pattern-matcher/src/pattern/multiply.rs (4 hunks)
  • crates/grit-pattern-matcher/src/pattern/not.rs (3 hunks)
  • crates/grit-pattern-matcher/src/pattern/or.rs (3 hunks)
  • crates/grit-pattern-matcher/src/pattern/pattern_definition.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/patterns.rs (7 hunks)
  • crates/grit-pattern-matcher/src/pattern/predicate_definition.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/predicate_return.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/predicates.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/range.rs (3 hunks)
  • crates/grit-pattern-matcher/src/pattern/regex.rs (4 hunks)
  • crates/grit-pattern-matcher/src/pattern/resolved_pattern.rs (16 hunks)
  • crates/grit-pattern-matcher/src/pattern/rewrite.rs (5 hunks)
  • crates/grit-pattern-matcher/src/pattern/sequential.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/some.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/state.rs (5 hunks)
  • crates/grit-pattern-matcher/src/pattern/step.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/string_constant.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/subtract.rs (4 hunks)
  • crates/grit-pattern-matcher/src/pattern/undefined.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/variable.rs (8 hunks)
  • crates/grit-pattern-matcher/src/pattern/variable_content.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/where.rs (2 hunks)
  • crates/grit-pattern-matcher/src/pattern/within.rs (2 hunks)
  • crates/grit-util/Cargo.toml (1 hunks)
  • crates/grit-util/src/analysis_logs.rs (1 hunks)
  • crates/grit-util/src/ast_node.rs (2 hunks)
  • crates/grit-util/src/error.rs (1 hunks)
  • crates/grit-util/src/lib.rs (1 hunks)
  • crates/util/src/node_with_source.rs (2 hunks)
Files skipped from review due to trivial changes (2)
  • crates/grit-pattern-matcher/Cargo.toml
  • crates/grit-util/src/analysis_logs.rs
Additional comments not posted (212)
crates/grit-pattern-matcher/src/pattern/undefined.rs (1)

3-3: LGTM! But verify the function usage in the codebase.

The import change to use GritResult aligns with the refined error handling strategy.

However, ensure that all function calls to matches_undefined handle the new GritResult type correctly.

crates/grit-pattern-matcher/src/pattern/step.rs (1)

6-6: LGTM! But verify the function usage in the codebase.

The import change to use GritResult aligns with the refined error handling strategy.

However, ensure that all function calls to exec_step handle the new GritResult type correctly.

crates/grit-util/Cargo.toml (1)

27-27: Dependency Addition Approved.

The addition of thiserror version 1.0.61 is a good choice for enhancing error handling capabilities.

crates/grit-pattern-matcher/src/pattern/boolean_constant.rs (2)

7-7: Import Update Approved.

The import of GritResult from grit_util aligns with the new error handling strategy.


33-33: Return Type Update Approved.

The change to GritResult<bool> enhances error handling by using a more specific error type.

Ensure that all usages of this method are updated to handle GritResult<bool>.

crates/grit-pattern-matcher/src/pattern/int_constant.rs (2)

7-7: Import Update Approved.

The import of GritResult from grit_util aligns with the new error handling strategy.


33-33: Return Type Update Approved.

The change to GritResult<bool> enhances error handling by using a more specific error type.

Ensure that all usages of this method are updated to handle GritResult<bool>.

crates/grit-pattern-matcher/src/pattern/float_constant.rs (1)

33-36: LGTM! Verify the usage of GritResult.

The change to use GritResult<bool> instead of Result<bool> is appropriate for aligning with project-specific error handling strategies.

However, ensure that GritResult is consistently used throughout the codebase for similar patterns.

Verification successful

Consistent Usage of GritResult Verified

The usage of GritResult is consistent across the codebase, aligning with the project-specific error handling strategy. No inconsistencies were found in the usage of GritResult instead of Result.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent usage of `GritResult` in the codebase.

# Test: Search for `GritResult` usage. Expect: Consistent usage across the codebase.
rg --type rust 'GritResult'

Length of output: 25640

crates/grit-pattern-matcher/src/pattern/predicate_return.rs (1)

27-30: LGTM! Verify the usage of GritResult.

The change to use GritResult<FuncEvaluation<Q>> instead of Result<FuncEvaluation<Q>> is appropriate for aligning with project-specific error handling strategies.

However, ensure that GritResult is consistently used throughout the codebase for similar patterns.

Verification successful

Consistent Usage of GritResult Verified

The usage of GritResult is consistent across the codebase, aligning with the project's error handling strategy. No inconsistencies were found.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent usage of `GritResult` in the codebase.

# Test: Search for `GritResult` usage. Expect: Consistent usage across the codebase.
rg --type rust 'GritResult'

Length of output: 25640

crates/grit-pattern-matcher/src/pattern/bubble.rs (1)

36-39: LGTM! Verify the usage of GritResult.

The change to use GritResult<bool> instead of Result<bool> is appropriate for aligning with project-specific error handling strategies.

However, ensure that GritResult is consistently used throughout the codebase for similar patterns.

Verification successful

Consistent Usage of GritResult Verified

The GritResult type is consistently used across the codebase, aligning with the project's error handling strategies. This confirms the appropriate and uniform application of GritResult in place of Result.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent usage of `GritResult` in the codebase.

# Test: Search for `GritResult` usage. Expect: Consistent usage across the codebase.
rg --type rust 'GritResult'

Length of output: 25640

crates/grit-pattern-matcher/src/pattern/string_constant.rs (1)

8-8: LGTM! Verify the usage of GritResult.

The changes to use GritResult for error handling are appropriate and align with the project's error management strategy.

Ensure that the GritResult is consistently used throughout the codebase where applicable.

Also applies to: 36-36

Verification successful

Consistent Usage of GritResult Verified

The usage of GritResult is consistent across the codebase, as evidenced by its presence in various modules and functions. This aligns well with the project's error management strategy. No further action is required.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of `GritResult` in the codebase.

# Test: Search for the usage of `GritResult`. Expect: Consistent usage across the codebase.
rg --type rust 'GritResult'

Length of output: 25640

crates/grit-pattern-matcher/src/pattern/files.rs (1)

7-7: LGTM! Verify the usage of GritResult.

The transition to GritResult for error handling is consistent with the project's error management strategy.

Ensure that GritResult is consistently applied across the codebase.

Also applies to: 27-27

Verification successful

Consistent Usage of GritResult Verified

The GritResult type is consistently used across the codebase for error handling, aligning with the project's error management strategy. The usage spans multiple files and functions, confirming its consistent application.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of `GritResult` in the codebase.

# Test: Search for the usage of `GritResult`. Expect: Consistent usage across the codebase.
rg --type rust 'GritResult'

Length of output: 25640

crates/grit-pattern-matcher/src/pattern/equal.rs (1)

8-8: LGTM! Verify the usage of GritResult.

The changes to use GritResult for error handling are consistent with the project's strategy.

Ensure that GritResult is consistently used throughout the codebase.

Also applies to: 34-34

Verification successful

Consistent Usage of GritResult Verified

The usage of GritResult is consistent throughout the codebase, aligning with the project's error handling strategy. No discrepancies were found in its application across different modules.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of `GritResult` in the codebase.

# Test: Search for the usage of `GritResult`. Expect: Consistent usage across the codebase.
rg --type rust 'GritResult'

Length of output: 25640

crates/grit-pattern-matcher/src/pattern/sequential.rs (1)

7-7: LGTM! The error handling improvements are well integrated.

The switch from Result to GritResult aligns with the custom error handling strategy, enhancing specificity and consistency across the codebase.

Also applies to: 20-20

crates/grit-pattern-matcher/src/pattern/call_built_in.rs (1)

7-7: LGTM! The error handling improvements are well integrated.

The switch from Result to GritResult aligns with the custom error handling strategy, enhancing specificity and consistency across the codebase.

Also applies to: 35-35

crates/grit-util/src/error.rs (1)

1-48: Well-structured error handling implementation.

The GritPatternError enum and GritResult type provide a robust and clear error handling mechanism. The use of thiserror enhances maintainability.

crates/grit-pattern-matcher/src/pattern/predicate_definition.rs (1)

Line range hint 40-44:
LGTM! Ensure consistent use of GritResult.

The change from Result<bool> to GritResult<bool> is appropriate for more specific error handling. Verify that GritResult is consistently used throughout the codebase for error handling.

crates/core/src/pattern_compiler/file_owner_compiler.rs (1)

Line range hint 21-36:
LGTM! Ensure consistent use of GritResult.

The change from Result<Option<FileOwner<Tree>>> to GritResult<Option<FileOwner<Tree>>> is appropriate for more specific error handling. Verify that GritResult is consistently used throughout the codebase for error handling.

crates/core/src/paths.rs (1)

9-12: LGTM! Ensure consistent use of GritResult and GritPatternError.

The change from Result<PathBuf> to GritResult<PathBuf> and the use of GritPatternError for error handling are appropriate. Verify that these types are consistently used throughout the codebase for error handling.

crates/grit-pattern-matcher/src/errors.rs (3)

5-8: Import statements updated for custom error handling.

The import of GritPatternError and GritResult indicates a shift to more specific error handling, aligning with the changes in the functions.


Line range hint 37-49: Improved error handling in warning function.

Similar to debug, the warning function now uses GritPatternError::Builder, enhancing error specificity. Verify that all usages of this function are compatible with GritResult.


Line range hint 15-27: Improved error handling in debug function.

The function now uses GritPatternError::Builder for error handling, which improves error specificity. Ensure that this change is compatible with all usage scenarios of this function.

Verification successful

Compatibility of debug Function's Error Handling Verified

The debug function's use of GritPatternError::Builder for error handling is compatible with its usage throughout the codebase. The GritResult type, which encompasses GritPatternError, is widely used, ensuring that the new error handling mechanism integrates seamlessly.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify usage of `debug` function to ensure compatibility with new error handling.

# Test: Search for the function usage. Expect: Compatibility with `GritResult`.
rg --type rust -A 5 $'debug'

Length of output: 27850


Script:

#!/bin/bash
# Description: Check how `GritResult` and `GritPatternError::Builder` are handled in the codebase.

# Search for the definition of `GritPatternError::Builder` to understand its usage.
rg --type rust 'GritPatternError::Builder' -A 5

# Search for `GritResult` to see how it is typically handled in the codebase.
rg --type rust 'GritResult' -A 5

Length of output: 140950

crates/grit-pattern-matcher/src/pattern/pattern_definition.rs (2)

7-7: Import statement updated for custom error handling.

The addition of GritResult aligns with the changes in the method return type, indicating a move towards more specific error handling.


Line range hint 43-53: Updated return type in call method of PatternDefinition.

The method now returns GritResult<bool>, improving error specificity. Verify that all calls to this method are compatible with the new return type.

crates/grit-pattern-matcher/src/pattern/function_definition.rs (3)

9-9: Import statement updated for custom error handling.

The addition of GritResult reflects the shift to more specific error handling in the call method.


18-18: Updated return type in call method of FunctionDefinition trait.

The method now returns GritResult<FuncEvaluation<Q>>, enhancing error specificity. Ensure that all implementations of this trait are updated accordingly.


55-57: Updated return type in call method of GritFunctionDefinition.

The method now returns GritResult<FuncEvaluation<Q>>, improving error specificity. Verify that all calls to this method are compatible with the new return type.

crates/grit-pattern-matcher/src/pattern/where.rs (2)

9-9: Update import to use GritResult.

The import statement now includes GritResult, aligning with the new error handling strategy.


41-41: Ensure consistency with GritResult<bool>.

The return type change to GritResult<bool> is consistent with the new error handling strategy. Ensure that all related error handling logic is updated accordingly.

Verification successful

Consistent Usage of GritResult<bool> Across the Codebase

The return type GritResult<bool> is consistently used across various modules in the grit-pattern-matcher crate, indicating alignment with the new error handling strategy. No further updates are necessary.

  • Files such as context.rs, where.rs, undefined.rs, and many others consistently use GritResult<bool>.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify usage of `GritResult<bool>` in the codebase to ensure consistency.

# Test: Search for `GritResult<bool>` usage. Expect: Consistent usage across the codebase.
rg --type rust -A 5 $'GritResult<bool>'

Length of output: 37163

crates/grit-pattern-matcher/src/pattern/map.rs (2)

7-7: Update import to use GritResult.

The import statement now includes GritResult, which aligns with the updated error handling strategy.


38-38: Ensure consistency with GritResult<bool>.

The return type change to GritResult<bool> is consistent with the new error handling strategy. Ensure that all related error handling logic is updated accordingly.

Verification successful

Consistent Usage of GritResult<bool> Across Codebase

The GritResult<bool> type is used consistently across various modules in the grit-pattern-matcher crate and related crates. Ensure that any additional error handling logic aligns with this usage pattern. No inconsistencies were found in the usage of GritResult<bool>.

  • Files with consistent usage include:
    • crates/grit-pattern-matcher/src/context.rs
    • crates/grit-pattern-matcher/src/pattern/boolean_constant.rs
    • crates/grit-pattern-matcher/src/pattern/after.rs
    • And many others as listed in the output.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify usage of `GritResult<bool>` in the codebase to ensure consistency.

# Test: Search for `GritResult<bool>` usage. Expect: Consistent usage across the codebase.
rg --type rust -A 5 $'GritResult<bool>'

Length of output: 37163

crates/grit-pattern-matcher/src/pattern/variable_content.rs (3)

1-2: Update imports to use GritPatternError and GritResult.

The import statements now include GritPatternError and GritResult, aligning with the updated error handling strategy.


39-42: Use GritPatternError for error construction.

The error construction now uses GritPatternError, which enhances error specificity and aligns with the project's error handling strategy.


35-35: Ensure consistency with GritResult<Cow<'a, str>>.

The return type change to GritResult<Cow<'a, str>> is consistent with the new error handling strategy. Ensure that all related error handling logic is updated accordingly.

crates/grit-pattern-matcher/src/pattern/like.rs (2)

Line range hint 37-46:
LGTM: Consistent use of GritResult for error handling.

The transition to GritResult<bool> enhances clarity in error reporting, and the method correctly handles potential errors using this type.


55-58: LGTM: Clear error handling for feature-specific execution.

The use of GritPatternError::new provides a clear and specific error message when the embeddings feature is not enabled.

crates/grit-util/src/ast_node.rs (1)

37-37: LGTM: Updated error handling in the text method.

The change to GritResult<Cow<str>> aligns with the centralized error handling strategy, enhancing consistency and clarity.

crates/core/src/clean.rs (1)

34-34: LGTM: Consistent use of GritResult in replace_cleaned_ranges.

The update to GritResult<Option<String>> aligns with the centralized error handling strategy, ensuring consistency across the codebase.

crates/grit-pattern-matcher/src/pattern/assignment.rs (3)

9-9: Ensure correct import of GritResult.

The import of GritResult from grit_util is correct and aligns with the refactoring goals. Ensure this is consistent across the codebase.


50-50: Verify the usage of GritResult in execute_func.

The method execute_func now returns GritResult<FuncEvaluation<Q>>, aligning with the refactor. Ensure that the calling code handles this new result type correctly.

Verification successful

GritResult Handling in execute_func Calls Verified

The execute_func method's return type GritResult<FuncEvaluation<Q>> is correctly handled in the calling code. The use of the ? operator in multiple instances confirms that the result is properly managed. No further issues found.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `execute_func` handle `GritResult<FuncEvaluation<Q>>`.

# Test: Search for the function usage. Expect: Correct handling of `GritResult<FuncEvaluation<Q>>`.
rg --type rust -A 5 $'execute_func'

Length of output: 15514


36-36: Verify the usage of GritResult in execute.

The method execute now returns GritResult<bool>, which is consistent with the refactor to use a more specific error type. Ensure that the calling code handles this new result type appropriately.

crates/grit-pattern-matcher/src/pattern/add.rs (3)

10-10: Ensure correct import of GritResult.

The import of GritResult from grit_util is correct and aligns with the refactoring goals. Ensure this is consistent across the codebase.


38-38: Verify the usage of GritResult in evaluate.

The method evaluate now returns GritResult<f64>, aligning with the refactor. Ensure that the calling code handles this new result type correctly.

Verification successful

Verification Successful: Correct Handling of GritResult<f64> in evaluate Calls

The evaluate function's return type GritResult<f64> is handled correctly in all instances found. The use of the ? operator in the calling code ensures proper error propagation and handling, which aligns with Rust's idiomatic practices for managing Result types.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `evaluate` handle `GritResult<f64>`.

# Test: Search for the function usage. Expect: Correct handling of `GritResult<f64>`.
rg --type rust -A 5 $'evaluate'

Length of output: 6418


28-28: Verify the usage of GritResult in call.

The method call now returns GritResult<Q::ResolvedPattern<'a>>, which is consistent with the refactor. Ensure that the calling code handles this new result type appropriately.

crates/grit-pattern-matcher/src/pattern/divide.rs (4)

10-10: Ensure correct import of GritResult.

The import of GritResult from grit_util is correct and aligns with the refactoring goals. Ensure this is consistent across the codebase.


38-38: Verify the usage of GritResult in evaluate.

The method evaluate now returns GritResult<f64>, aligning with the refactor. Ensure that the calling code handles this new result type correctly.

Verification successful

Verification Successful: GritResult<f64> Handling is Correct

The evaluate method's return type GritResult<f64> is consistently handled using the ? operator across all instances found in the codebase. This ensures proper error propagation and handling. No further changes are necessary.

  • Instances in subtract.rs, multiply.rs, modulo.rs, divide.rs, and add.rs all correctly handle GritResult<f64>.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `evaluate` handle `GritResult<f64>`.

# Test: Search for the function usage. Expect: Correct handling of `GritResult<f64>`.
rg --type rust -A 5 $'evaluate'

Length of output: 6418


59-59: Verify the usage of GritResult in execute.

The method execute now returns GritResult<bool>, which is consistent with the refactor. Ensure that the calling code handles this new result type appropriately.

Verification successful

Ensure Proper Handling of GritResult<bool> in execute Calls

The search results show numerous instances where the execute function is called and its result is handled. In most cases, the result is immediately checked for success using the ? operator, which correctly propagates errors. This indicates that the calling code generally handles the GritResult<bool> appropriately by either returning the result or using it in conditional logic.

  • Files and Lines to Verify:
    • crates/grit-pattern-matcher/src/pattern/within.rs: Lines involving execute(binding, &mut cur_state, context, logs)?
    • crates/grit-pattern-matcher/src/pattern/where.rs: Lines involving execute(binding, &mut cur_state, context, logs)?
    • crates/grit-pattern-matcher/src/pattern/variable.rs: Lines involving pattern.execute(resolved_pattern, state, context, logs)?
    • crates/grit-pattern-matcher/src/pattern/some.rs: Lines involving self.pattern.execute(&item, &mut cur_state, context, logs)?
    • ... (and many more similar instances across various files)

These instances suggest that the execute function's result is being handled correctly, but a manual review of the specific lines in the codebase is recommended to ensure consistency across all usages.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `execute` handle `GritResult<bool>`.

# Test: Search for the function usage. Expect: Correct handling of `GritResult<bool>`.
rg --type rust -A 5 $'execute'

Length of output: 130308


Script:

#!/bin/bash
# Description: Check how the result of `execute` is handled in the codebase.

# Search for calls to `execute` and display surrounding lines for context.
rg --type rust 'execute(' -A 10 -B 2

Length of output: 105


Script:

#!/bin/bash
# Description: Check how the result of `execute` is handled in the codebase.

# Search for calls to `execute` and display surrounding lines for context.
rg --type rust 'execute\(' -A 10 -B 2

Length of output: 79504


28-28: Verify the usage of GritResult in call.

The method call now returns GritResult<Q::ResolvedPattern<'a>>, which is consistent with the refactor. Ensure that the calling code handles this new result type appropriately.

crates/grit-pattern-matcher/src/pattern/multiply.rs (4)

10-10: Update to error handling with GritResult.

The import of GritResult from grit_util replaces the previous use of anyhow::Result. This change is consistent with a move towards more specific error handling and should improve type safety across the codebase.


28-28: Change in return type for call method.

The call method now returns GritResult<Q::ResolvedPattern<'a>> instead of Result<Q::ResolvedPattern<'a>>. This aligns with the updated error handling strategy and ensures consistency with other methods in the struct.


38-38: Change in return type for evaluate method.

The evaluate method now returns GritResult<f64>. This change enhances type safety and aligns with the overall refactoring of error handling in the codebase.


59-59: Change in return type for execute method.

The execute method in the Matcher implementation now returns GritResult<bool>. This is consistent with the refactoring to use GritResult and should improve error handling specificity.

crates/grit-pattern-matcher/src/pattern/subtract.rs (4)

10-10: Update to error handling with GritResult.

The import of GritResult from grit_util replaces the previous use of anyhow::Result. This change is consistent with a move towards more specific error handling and should improve type safety across the codebase.


28-28: Change in return type for call method.

The call method now returns GritResult<Q::ResolvedPattern<'a>> instead of Result<Q::ResolvedPattern<'a>>. This aligns with the updated error handling strategy and ensures consistency with other methods in the struct.


38-38: Change in return type for evaluate method.

The evaluate method now returns GritResult<f64>. This change enhances type safety and aligns with the overall refactoring of error handling in the codebase.


59-59: Change in return type for execute method.

The execute method in the Matcher implementation now returns GritResult<bool>. This is consistent with the refactoring to use GritResult and should improve error handling specificity.

crates/grit-pattern-matcher/src/pattern/within.rs (2)

8-8: Update to error handling with GritResult.

The import of GritResult from grit_util replaces the previous use of anyhow::Result. This change is consistent with a move towards more specific error handling and should improve type safety across the codebase.


34-34: Change in return type for execute method.

The execute method in the Matcher implementation now returns GritResult<bool>. This is consistent with the refactoring to use GritResult and should improve error handling specificity.

crates/grit-pattern-matcher/src/pattern/modulo.rs (3)

28-31: LGTM!

The change to return GritResult<Q::ResolvedPattern<'a>> is consistent with the new error handling strategy.


Line range hint 38-45:
LGTM!

The change to return GritResult<i64> ensures consistent error handling throughout the method.


Line range hint 61-68:
LGTM!

The change to return GritResult<bool> is consistent with the new error handling strategy and enhances error specificity.

crates/grit-pattern-matcher/src/pattern/maybe.rs (2)

Line range hint 28-33:
LGTM!

The change to return GritResult<bool> ensures consistent error handling and aligns with the library's design.


Line range hint 60-71:
LGTM!

The change to return GritResult<FuncEvaluation<Q>> ensures consistent error handling throughout the method.

crates/grit-pattern-matcher/src/pattern/and.rs (2)

Line range hint 34-41:
LGTM!

The change to return GritResult<bool> ensures consistent error handling and aligns with the library's design.


Line range hint 67-78:
LGTM!

The change to return GritResult<FuncEvaluation<Q>> ensures consistent error handling throughout the method.

crates/grit-pattern-matcher/src/pattern/not.rs (3)

65-72: Improve error handling message clarity.

The use of GritPatternError with a clear error message is a good practice. Ensure that similar error handling is applied consistently across the module.


9-9: Ensure GritResult is properly integrated.

The import of GritResult and GritPatternError suggests a shift towards custom error handling. Verify that all functions using GritResult handle errors appropriately.

Verification successful

GritResult is properly integrated across the codebase.

The functions utilizing GritResult handle errors consistently by returning GritPatternError where necessary, indicating appropriate use of custom error handling. No further issues were found.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify usage of GritResult across the codebase to ensure consistent error handling.

# Test: Search for all instances of GritResult usage. Expect: Consistent error handling practices.
rg --type rust 'GritResult'

Length of output: 25640


Script:

#!/bin/bash
# Description: Extract functions using GritResult and check for error handling.

# Extract function definitions returning GritResult and include context for error handling.
rg --type rust 'fn .*-> GritResult<' -A 5

Length of output: 8983


35-35: LGTM! But verify the function usage in the codebase.

The change to return GritResult<bool> aligns with better error handling practices. Ensure that all calls to this function are updated accordingly.

crates/grit-pattern-matcher/src/pattern/limit.rs (2)

42-42: LGTM! But verify the function usage in the codebase.

The change to return GritResult<bool> is consistent with improved error handling practices. Ensure that all calls to this function are updated accordingly.

Verification successful

Function Usage Verified

The execute function in the Matcher for Limit<Q> has been updated to return GritResult<bool>. All occurrences in the codebase reflect this change, ensuring consistency with the improved error handling practices. No further updates are required.

  • crates/grit-pattern-matcher/src/pattern/limit.rs: The execute function is correctly defined with the new return type.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `execute` in `Matcher` for `Limit<Q>` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type rust 'Limit<Q>.*execute'

Length of output: 36


Script:

#!/bin/bash
# Description: Search for all occurrences of the `execute` function within the `Matcher` implementation for `Limit<Q>`.

# Test: Use a broader search pattern to capture all relevant instances.
rg --type rust 'fn execute' -A 10

Length of output: 78282


6-6: Ensure GritResult is properly integrated.

The import of GritResult suggests a shift towards custom error handling. Verify that all functions using GritResult handle errors appropriately.

Verification successful

GritResult Integration Verified

The use of GritResult across the codebase, including the use of the ? operator for error propagation, indicates proper integration. The lack of match statements suggests that custom error handling is not widely used, which aligns with standard practices. Overall, the integration appears consistent and appropriate.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify usage of GritResult across the codebase to ensure consistent error handling.

# Test: Search for all instances of GritResult usage. Expect: Consistent error handling practices.
rg --type rust 'GritResult'

Length of output: 25640


Script:

#!/bin/bash
# Description: Check for error handling patterns involving GritResult in the limit.rs file and related files.

# Test: Search for instances where GritResult is used with error handling patterns like `?` or `match`.
rg --type rust 'GritResult.*\?'
rg --type rust 'match.*GritResult'

Length of output: 1321

crates/grit-pattern-matcher/src/pattern/dynamic_snippet.rs (3)

12-12: Ensure GritResult is properly integrated.

The import of GritResult suggests a shift towards custom error handling. Verify that all functions using GritResult handle errors appropriately.


67-67: LGTM! But verify the function usage in the codebase.

The change to return GritResult<bool> is consistent with improved error handling practices. Ensure that all calls to this function are updated accordingly.


48-48: LGTM! But verify the function usage in the codebase.

The change to return GritResult<String> is consistent with improved error handling practices. Ensure that all calls to this function are updated accordingly.

Verification successful

Function Usage Verified and Updated Correctly

The text function in dynamic_snippet.rs has been updated to return GritResult<String>, and all relevant usages in the codebase handle this return type correctly. The calls appropriately manage the Result type using the ? operator.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `text` in `DynamicPattern<Q>` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type rust 'DynamicPattern<Q>.*text'

Length of output: 42


Script:

#!/bin/bash
# Searching for all occurrences of the function `text` in the codebase to verify its usage.
rg --type rust 'fn text' -A 5

Length of output: 8334


Script:

#!/bin/bash
# Searching for calls to the `text` function in `dynamic_snippet.rs` to verify they handle the `GritResult<String>` return type.
rg --type rust 'text\(' -A 3

Length of output: 87669

crates/grit-pattern-matcher/src/pattern/every.rs (2)

7-7: Update import to use GritResult.

The import statement has been updated to use GritResult from grit_util, which is consistent with the project's error handling strategy.


33-33: Change return type to GritResult<bool>.

The return type of the execute method has been updated to GritResult<bool>, aligning with the project's specific error handling approach. Ensure that all error handling within this method is compatible with GritResult.

crates/grit-pattern-matcher/src/pattern/file_pattern.rs (2)

11-11: Update import to use GritResult.

The import statement has been updated to use GritResult from grit_util, which aligns with the project's error handling strategy.


32-32: Change return type to GritResult<bool>.

The return type of the execute method has been updated to GritResult<bool>, ensuring consistency with the project's specific error handling approach. Verify that all error handling within this method is compatible with GritResult.

crates/core/src/marzano_code_snippet.rs (2)

10-10: Update import to use GritResult.

The import statement has been updated to use GritResult from grit_util, which aligns with the project's error handling strategy.


58-58: Change return type to GritResult<bool>.

The return type of the execute method has been updated to GritResult<bool>, ensuring consistency with the project's specific error handling approach. Verify that all error handling within this method is compatible with GritResult.

crates/core/src/pattern_compiler/bubble_compiler.rs (2)

35-35: Ensure comprehensive error handling with GritPatternError.

The change in the error type in the collect method improves specificity. Verify that the GritPatternError provides adequate context and information for debugging.


11-11: Integrate GritPatternError consistently.

The import of GritPatternError indicates a shift to more specific error handling. Ensure that all parts of the code that previously handled Utf8Error are updated to handle GritPatternError appropriately.

crates/grit-pattern-matcher/src/pattern/functions.rs (4)

25-25: Use GritResult in Evaluator trait for clarity.

The change to GritResult in the Evaluator trait enhances error specificity. Ensure that the execute_func method provides detailed error information using GritPatternError.


40-40: Use GritResult in GritCall trait for improved error handling.

The transition to GritResult in the GritCall trait's call method allows for more descriptive error messages. Verify that the method's implementation leverages GritPatternError effectively.


63-65: Improve error messaging with GritPatternError.

The use of GritPatternError for handling errors in the call method enhances clarity. Ensure that the error message is informative and aids in debugging.


8-11: Adopt GritResult for tailored error handling.

The import of GritResult indicates a move towards more specific error handling. Ensure that all methods using GritResult handle errors in a way that provides clear and meaningful feedback.

Verification successful

Adopt GritResult for tailored error handling in Evaluator and GritCall traits.

The functions.rs file correctly integrates GritResult in the Evaluator and GritCall traits, ensuring that error handling is specific and meaningful. This aligns with the intended move towards more tailored error handling using GritResult.

  • Evaluator and GritCall traits in functions.rs utilize GritResult.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all instances of Result are replaced with GritResult.

# Test: Search for Result usage in the context of error handling. Expect: No occurrences.
rg --type rust 'Result<'

Length of output: 78563


Script:

#!/bin/bash
# Search for the `Evaluator` trait implementation to check if `GritResult` is used.
ast-grep --lang rust --pattern 'trait Evaluator { $$$ }'

# Search for the `GritCall` trait implementation to check if `GritResult` is used.
ast-grep --lang rust --pattern 'trait GritCall { $$$ }'

Length of output: 116


Script:

#!/bin/bash
# Search for references to the `Evaluator` trait in the codebase.
rg 'Evaluator'

# Search for references to the `GritCall` trait in the codebase.
rg 'GritCall'

Length of output: 4550


Script:

#!/bin/bash
# Extract the definition and implementations of the `Evaluator` trait to check for `GritResult` usage.
ast-grep --lang rust --pattern 'trait Evaluator<Q: QueryContext> { $$$ }'

# Extract the definition and implementations of the `GritCall` trait to check for `GritResult` usage.
ast-grep --lang rust --pattern 'trait GritCall<Q: QueryContext> { $$$ }'

Length of output: 150


Script:

#!/bin/bash
# Search for `GritResult` usage in `functions.rs` to verify its integration in the `Evaluator` and `GritCall` traits.
rg 'GritResult' crates/grit-pattern-matcher/src/pattern/functions.rs

Length of output: 242

crates/grit-pattern-matcher/src/pattern/before.rs (3)

31-36: Enhance error handling in prev_pattern method.

The use of GritPatternError in the prev_pattern method improves error clarity. Ensure that the error message is informative and aids in debugging.


66-66: Utilize GritResult in execute method for better error handling.

The change to GritResult in the execute method of the Before struct allows for more descriptive error messages. Verify that the method's implementation leverages GritPatternError effectively.


11-14: Transition to GritResult for enhanced error handling.

The import of GritResult indicates a more specific error handling strategy. Ensure that all methods using GritResult provide clear and meaningful error feedback.

Verification successful

Transition to GritResult verified in before.rs.

The transition from Result to GritResult for enhanced error handling in the before.rs file is correctly implemented. All instances in this file are using GritResult, ensuring a consistent error handling strategy.

  • The before.rs file in the grit-pattern-matcher crate uses GritResult as intended.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all instances of Result are replaced with GritResult.

# Test: Search for Result usage in the context of error handling. Expect: No occurrences.
rg --type rust 'Result<'

Length of output: 78563

crates/grit-pattern-matcher/src/pattern/after.rs (2)

32-37: Improved error handling with GritResult.

The shift to GritResult and use of GritPatternError provides clearer error messages. This change enhances error specificity and maintainability.


67-67: Consistent error handling with GritResult.

The change to GritResult<bool> aligns with the custom error handling strategy, improving error management.

crates/core/src/text_unparser.rs (2)

8-8: Consistent use of GritResult in imports.

Replacing anyhow::Result with GritResult ensures consistent error handling across the codebase.


37-37: Enhanced error handling with GritResult.

The change to GritResult<EffectOutcome> aligns with the custom error handling strategy, improving error clarity.

crates/grit-pattern-matcher/src/pattern/some.rs (2)

7-7: Consistent use of GritResult in imports.

The inclusion of GritResult ensures consistent error handling across the codebase.


33-33: Improved error handling with GritResult.

The change to GritResult<bool> aligns with the custom error handling strategy, enhancing error specificity and maintainability.

crates/grit-pattern-matcher/src/pattern/if.rs (4)

9-12: Import GritResult for improved error handling.

The import of GritResult from grit_util aligns with the updated error handling strategy, which enhances the specificity and clarity of error management in the codebase.


43-43: Use GritResult in Matcher trait implementation.

The change from Result<bool> to GritResult<bool> in the execute method of the Matcher trait implementation for If<Q> improves error specificity, allowing for more detailed error information.


83-83: Use GritResult in Evaluator trait implementation.

The change from Result<FuncEvaluation<Q>> to GritResult<FuncEvaluation<Q>> in the execute_func method of the Evaluator trait implementation for PrIf<Q> enhances error handling by providing more context-specific error information.


87-89: Refine error handling within Evaluator.

The introduction of a GritPatternError when attempting to return from within an if condition adds robustness to the control flow by clearly defining an error case that was previously less explicit.

crates/core/src/equivalence.rs (1)

22-25: Improve error handling in are_equivalent.

The use of is_ok_and ensures that text comparisons are only performed when both texts are successfully retrieved, enhancing the robustness of the equivalence check by preventing invalid comparisons.

crates/grit-pattern-matcher/src/pattern/any.rs (3)

9-9: Import GritResult for specific error handling.

The import of GritResult reflects the transition to a more context-specific error handling mechanism, aligning with the refactoring objectives.


38-38: Adopt GritResult in Matcher implementation.

The change from Result<bool> to GritResult<bool> in the execute method of the Matcher implementation for Any<Q> enhances error handling by providing more detailed error context.


80-80: Adopt GritResult in Evaluator implementation.

The change from Result<FuncEvaluation<Q>> to GritResult<FuncEvaluation<Q>> in the execute_func method of the Evaluator implementation for PrAny<Q> aligns with the improved error handling strategy, offering better error specificity.

crates/grit-pattern-matcher/src/pattern/call.rs (3)

9-12: Import changes look good.

The imports for GritPatternError and GritResult are appropriate for the new error handling strategy.


41-41: Correct use of GritResult in Matcher<Q> for Call<Q>.

The change from Result to GritResult in the execute method enhances error specificity.


Line range hint 72-89: Improved error handling in Evaluator<Q> for PrCall<Q>.

The use of GritPatternError and GritResult provides more context-specific error handling. The error message in GritPatternError::new is clear and helpful.

crates/grit-pattern-matcher/src/pattern/or.rs (3)

11-11: Import changes look good.

The import of GritResult aligns with the new error handling strategy.


37-37: Correct use of GritResult in Matcher<Q> for Or<Q>.

The change from Result to GritResult in the execute method enhances error specificity and aligns with the overall error handling strategy.


91-91: Improved error handling in Evaluator<Q> for PrOr<Q>.

The use of GritResult improves the specificity of error handling in the execute_func method.

crates/grit-pattern-matcher/src/pattern/range.rs (3)

7-10: Import changes look good.

The imports for GritPatternError and GritResult are appropriate for the new error handling strategy.


19-26: Improved error handling in Point::new.

The use of GritPatternError and GritResult provides more context-specific error handling. The error message in GritPatternError::new is clear and helpful.


75-75: Correct use of GritResult in Matcher<Q> for Range.

The change from Result to GritResult in the execute method aligns with the new error handling strategy and enhances error specificity.

crates/grit-pattern-matcher/src/pattern/container.rs (3)

Line range hint 43-62: Improved Error Handling with GritResult.

The transition from anyhow::Result to GritResult in the set_resolved method enhances error specificity. Ensure that GritPatternError provides meaningful error messages and is well-integrated with the rest of the error handling logic.


70-78: Consistent Error Handling in get_pattern_or_resolved.

The use of GritResult aligns error handling with domain-specific requirements. This change improves clarity and consistency. Verify that all possible error cases are covered by GritPatternError.


86-94: Refined Error Management in get_pattern_or_resolved_mut.

Switching to GritResult for error handling is a positive step towards better error management. Ensure that the error messages in GritPatternError are descriptive and useful for debugging.

crates/grit-pattern-matcher/src/binding.rs (4)

26-33: Enhanced Error Specificity in from_pattern.

The change to GritResult in the from_pattern method improves error specificity. Ensure that GritPatternError provides clear and actionable error messages.


72-72: Consistent Error Handling in linearized_text.

Using GritResult for error handling ensures consistency across the trait. Verify that all potential errors are appropriately captured and handled.


74-74: Improved Error Management in text.

Switching to GritResult aligns with the overall error handling strategy. Ensure that the error messages are informative and aid in debugging.


108-108: Refined Error Handling in log_empty_field_rewrite_error.

The use of GritResult enhances error management. Confirm that GritPatternError provides detailed and helpful error information.

crates/grit-pattern-matcher/src/pattern/predicates.rs (1)

73-73: Improved Error Handling in execute_func.

The transition to GritResult enhances error specificity and consistency. Ensure that all error scenarios are covered and that the error messages are clear and informative.

crates/grit-pattern-matcher/src/pattern/log.rs (2)

Line range hint 113-118:
LGTM!

The change to use GritResult<FuncEvaluation<Q>> aligns with the updated error handling strategy.


Line range hint 45-90:
LGTM! Verify error handling consistency.

The changes to use GritResult<bool> and map_err for error handling are appropriate and improve error specificity.

Please ensure that similar error handling is consistently applied throughout the codebase.

Verification successful

Consistent Error Handling with GritResult and GritPatternError Verified

The usage of GritResult and GritPatternError for error handling is consistently applied across the codebase. This confirms that the changes in the reviewed code snippet align with the overall error handling strategy.

  • The use of map_err to convert errors to GritPatternError is consistent across multiple files.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent use of `GritResult` and `GritPatternError` across the codebase.

# Test: Search for `GritResult` and `GritPatternError` usage. Expect: Consistent usage across files.
rg --type rust 'GritResult|GritPatternError'

Length of output: 39332

crates/grit-pattern-matcher/src/context.rs (3)

41-41: LGTM!

The change to use GritResult<Q::ResolvedPattern<'a>> enhances error specificity.


52-52: LGTM!

The change to use GritResult<bool> aligns with the updated error handling strategy.


65-65: LGTM!

The change to use GritResult<bool> is consistent with the new error handling approach.

crates/grit-pattern-matcher/src/pattern/rewrite.rs (3)

Line range hint 48-87:
LGTM!

The changes to use GritResult<bool> and explicit Err returns with GritPatternError are appropriate and improve error specificity and clarity.


Line range hint 114-119:
LGTM!

The change to use GritResult<bool> aligns with the updated error handling strategy.


Line range hint 125-130:
LGTM!

The change to use GritResult<FuncEvaluation<Q>> is consistent with the new error handling approach.

crates/grit-pattern-matcher/src/pattern/regex.rs (4)

12-15: Consistent Use of Custom Error Types.

The introduction of GritPatternError and GritResult aligns error handling with the application's architecture. This change improves clarity and consistency.


42-42: Update Return Type to GritResult.

The return type of execute_matching has been correctly updated to GritResult<bool>, ensuring consistency with the custom error handling strategy.


77-77: Clear Error for Missing Capture Group.

The use of GritPatternError for missing capture groups is clear and descriptive, which aids in debugging.


136-136: Consistent Return Type in Matcher Implementation.

The return type change to GritResult<bool> in the Matcher trait implementation is consistent with the overall refactoring.

crates/grit-pattern-matcher/src/pattern/list.rs (4)

9-12: Consistent Use of Custom Error Types.

The introduction of GritPatternError and GritResult aligns error handling with the application's architecture. This change improves clarity and consistency.


44-44: Update Return Type to GritResult.

The return type of execute has been correctly updated to GritResult<bool>, ensuring consistency with the custom error handling strategy.


63-63: Update Return Type to GritResult.

The return type of execute_assoc has been correctly updated to GritResult<bool>, ensuring consistency with the custom error handling strategy.


94-96: Improved Error Reporting for Pattern Matching.

The error message for multiple subsequent dots is clear and specific, aiding in identifying pattern matching issues.

crates/grit-pattern-matcher/src/pattern/accumulate.rs (9)

9-12: Consistent Use of Custom Error Types.

The introduction of GritPatternError and GritResult aligns error handling with the application's architecture. This change improves clarity and consistency.


49-49: Update Return Type to GritResult.

The return type of execute in the Matcher implementation has been correctly updated to GritResult<bool>, ensuring consistency with the custom error handling strategy.


60-63: Improved Error Reporting for Unbound Variables.

The error message for unbound variables is clear and specific, aiding in debugging state management issues.


72-74: Clear Error for Invalid Binding.

The error message for invalid bindings is clear and descriptive, which aids in debugging.


79-82: Descriptive Error for Invalid RHS.

The error message for an invalid right-hand side is specific and informative, helping to identify configuration issues.


87-87: Efficient Error Handling in Effects Collection.

The use of GritResult in collecting effects ensures efficient error handling and maintains consistency across the codebase.


111-111: Update Return Type to GritResult.

The return type of execute_func in the Evaluator implementation has been correctly updated to GritResult<FuncEvaluation<Q>>, ensuring consistency with the custom error handling strategy.


125-128: Improved Error Reporting for Unbound Variables.

The error message for unbound variables is clear and specific, aiding in debugging state management issues.


131-133: Clear Error for Invalid Side-Conditions.

The error message for invalid side-conditions is clear and descriptive, which aids in debugging.

crates/grit-pattern-matcher/src/pattern/includes.rs (2)

115-129: Ensure informative error messages.

The error handling now uses GritPatternError. The messages are clear and provide context about the error. This is a good practice for improving debuggability.


36-36: Verify the function signature change.

The return type of execute has been changed to GritResult<bool>. Ensure that all calls to this function are updated accordingly in the codebase.

crates/grit-pattern-matcher/src/pattern/match.rs (1)

39-39: Verify the function signature change.

The return type of execute_func has been changed to GritResult<FuncEvaluation<Q>>. Ensure that all calls to this function are updated accordingly in the codebase.

Verification successful

Function signature change verified.

The return type of execute_func has been updated to GritResult<FuncEvaluation<Q>>, and all instances in the codebase reflect this change. No further action is needed.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `execute_func` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type rust -A 5 $'execute_func'

Length of output: 15514

crates/core/src/foreign_function_definition.rs (2)

65-65: Verify the function signature change.

The return type of call in ForeignFunctionDefinition has been changed to GritResult<FuncEvaluation<MarzanoQueryContext>>. Ensure that all calls to this function are updated accordingly in the codebase.


139-139: Verify the function signature change.

The return type of call in CallForeignFunction has been changed to GritResult<MarzanoResolvedPattern<'a>>. Ensure that all calls to this function are updated accordingly in the codebase.

Verification successful

Function Signature Change Verified

The call method in CallForeignFunction<MarzanoQueryContext> is implemented via the GritCall trait, and its return type has been updated to GritResult<MarzanoResolvedPattern<'a>>. Ensure all usages of this method in the codebase handle the new return type appropriately.

  • Implementation found in crates/core/src/foreign_function_definition.rs.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `call` in `CallForeignFunction` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type rust -A 5 $'CallForeignFunction::call'

Length of output: 47


Script:

#!/bin/bash
# Description: Verify the definition and usage of the `call` method in `CallForeignFunction`.

# Search for the definition of the `call` method in the codebase.
ast-grep --lang rust --pattern 'impl CallForeignFunction { fn call($_) -> $_ { $$$ } }'

# Search for all usages of `call` method in the codebase.
rg --type rust '\.call\('

Length of output: 4072


Script:

#!/bin/bash
# Description: Search for the implementation details of `CallForeignFunction` and its `call` method.

# Search for the definition of the `CallForeignFunction` struct or enum.
rg --type rust 'struct CallForeignFunction' -A 10

# Search for the implementation block of `CallForeignFunction`.
rg --type rust 'impl CallForeignFunction' -A 20

# Search for the definition of the `call` method specifically within `CallForeignFunction`.
ast-grep --lang rust --pattern 'impl CallForeignFunction { fn call($_) -> $_ { $$$ } }'

Length of output: 1043


Script:

#!/bin/bash
# Description: Search for trait implementations for `CallForeignFunction` that might define the `call` method.

# Search for trait implementations for `CallForeignFunction`.
rg --type rust 'impl .* for CallForeignFunction<' -A 20

Length of output: 1675

crates/core/src/ast_node.rs (3)

14-14: Import Update: Ensure Consistency with Error Handling Strategy

The import of GritResult aligns with the new error handling strategy. Ensure that all relevant parts of the codebase are updated to use GritResult for consistency.


61-61: Return Type Update: Verify Error Handling Consistency

The return type of the execute method in ASTNode has been updated to GritResult<bool>. This change is consistent with the new error handling strategy. Ensure that all error handling paths within this method are correctly aligned with GritResult.


172-172: Return Type Update: Verify Error Handling Consistency

The return type of the execute method in AstLeafNode has been updated to GritResult<bool>. This aligns with the updated error handling strategy. Ensure that all error handling paths within this method are correctly aligned with GritResult.

crates/grit-pattern-matcher/src/pattern/accessor.rs (7)

13-16: Import Update: Ensure Consistency with Error Handling Strategy

The import of GritPatternError and GritResult reflects the new error handling strategy. Ensure that these changes are consistently applied across the codebase.


42-46: Return Type Update: Verify Error Handling Consistency

The return type of the get_key function has been updated to GritResult<Cow<'a, str>>. This change is consistent with the new error handling strategy. Ensure that all error handling paths within this function are correctly aligned with GritResult.


Line range hint 57-73:
Return Type Update: Verify Error Handling Consistency

The return type of the get function has been updated to GritResult<Option<PatternOrResolved<'a, 'b, Q>>>. The error handling within the match statements now uses GritPatternError, which enhances error traceability. Ensure that all error handling paths are correctly aligned with GritResult.


Line range hint 83-99:
Return Type Update: Verify Error Handling Consistency

The return type of the get_mut function has been updated to GritResult<Option<PatternOrResolvedMut<'a, 'b, Q>>>. The error handling within the match statements now uses GritPatternError, which enhances error traceability. Ensure that all error handling paths are correctly aligned with GritResult.


Line range hint 110-131:
Return Type Update: Verify Error Handling Consistency

The return type of the set_resolved function has been updated to GritResult<bool>. The error handling within the match statements now uses GritPatternError, which enhances error traceability. Ensure that all error handling paths are correctly aligned with GritResult.


149-149: Return Type Update: Verify Error Handling Consistency

The return type of the execute method in Accessor has been updated to GritResult<bool>. Ensure that all error handling paths within this method are correctly aligned with GritResult.


168-168: Return Type Update: Verify Error Handling Consistency

The return type of the execute_resolved_with_binding function has been updated to GritResult<bool>. Ensure that all error handling paths within this function are correctly aligned with GritResult.

crates/util/src/node_with_source.rs (2)

2-2: Import Update: Ensure Consistency with Error Handling Strategy

The import of GritResult aligns with the new error handling strategy. Ensure that all relevant parts of the codebase are updated to use GritResult for consistency.


130-131: Return Type Update: Verify Error Handling Consistency

The return type of the text method has been updated to GritResult<Cow<str>>. This change is consistent with the new error handling strategy. Ensure that all error handling paths within this method are correctly aligned with GritResult.

crates/grit-pattern-matcher/src/pattern/list_index.rs (5)

37-55: Improved error handling in get_index.

The transition to using GritResult and GritPatternError enhances the specificity and clarity of error messages.


Line range hint 66-99:
Consistent error handling in get.

The use of GritResult and GritPatternError aligns with the updated error handling strategy.


Line range hint 109-138:
Enhanced error handling in get_mut.

The transition to GritResult and GritPatternError improves error reporting and consistency.


149-161: Refined error handling in set_resolved.

The use of GritResult and GritPatternError enhances the function's error handling and maintainability.


189-189: Unified error handling in execute.

The adoption of GritResult for return types enhances consistency and clarity in error management.

crates/grit-pattern-matcher/src/pattern/variable.rs (6)

Line range hint 45-54:
Consistent error handling in get_pattern_or_resolved.

The transition to GritResult improves the function's error handling consistency.


Line range hint 59-68:
Improved error handling in get_pattern_or_resolved_mut.

The use of GritResult aligns with the new error handling approach, enhancing consistency.


83-83: Unified error handling in text.

The adoption of GritResult enhances consistency in error management.


92-92: Refined error handling in execute_resolved.

The transition to GritResult enhances the function's error reporting and consistency.


210-210: Consistent error handling in get_absolute_file_name.

The use of GritResult improves the function's error handling consistency.


223-223: Improved error handling in get_file_name.

The transition to GritResult enhances the function's error handling consistency.

crates/grit-pattern-matcher/src/pattern/contains.rs (2)

40-40: Refined error handling in execute_until.

The transition to GritResult enhances the function's error handling consistency and clarity.


94-94: Unified error handling in execute.

The adoption of GritResult for return types enhances consistency and clarity in error management.

crates/grit-pattern-matcher/src/pattern/resolved_pattern.rs (2)

9-9: Consistent Use of GritResult.

The transition to using GritResult for error handling improves consistency across the codebase. Ensure that all error cases are appropriately handled and logged.


55-55: Ensure Correct Error Propagation.

The change from Result to GritResult in these function signatures should ensure that all errors are propagated correctly using the GritPatternError. Verify that error handling within these functions is updated to reflect this change.

Also applies to: 62-62, 69-69, 76-76, 83-83, 90-90, 109-109, 111-111, 141-141, 151-151, 162-162, 166-166, 168-168, 175-175, 199-199, 210-210, 230-230, 255-255, 279-279, 291-291, 323-323, 350-350, 385-385

crates/grit-pattern-matcher/src/pattern/state.rs (2)

11-14: Consistent Use of GritResult.

The transition to using GritResult for error handling improves consistency across the codebase. Ensure that all error cases are appropriately handled and logged.


60-69: Ensure Correct Error Propagation.

The change from Result to GritResult in these function signatures should ensure that all errors are propagated correctly using the GritPatternError. Verify that error handling within these functions is updated to reflect this change.

Also applies to: 148-178, 193-208

Verification successful

Error Handling Correctly Uses GritPatternError.

The function in crates/grit-pattern-matcher/src/pattern/state.rs correctly uses GritPatternError::new for error propagation, ensuring that errors are handled as intended. No further changes are needed.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that error handling within the functions is updated to use `GritPatternError`.

# Test: Search for error handling patterns inside the functions. Expect: Use of `GritPatternError`.
rg --type rust 'GritPatternError::new' -A 3

Length of output: 38681

crates/core/src/marzano_context.rs (2)

21-24: Consistent Use of GritResult.

The transition to using GritResult for error handling improves consistency across the codebase. Ensure that all error cases are appropriately handled and logged.


88-88: Ensure Correct Error Propagation.

The change from Result to GritResult in these function signatures should ensure that all errors are propagated correctly using the GritPatternError. Verify that error handling within these functions is updated to reflect this change.

Also applies to: 120-123, 131-144, 186-208, 259-263, 280-284, 308-311, 327-332, 356-359

Verification successful

Error Handling Updated to Use GritPatternError.

The error handling in marzano_context.rs has been updated to use GritPatternError, ensuring correct error propagation as intended by the change from Result to GritResult. This confirms that the necessary updates have been made in this file.

  • Lines 88, 120-123, 131-144, 186-208, 259-263, 280-284, 308-311, 327-332, 356-359 in marzano_context.rs show usage of GritPatternError.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that error handling within the functions is updated to use `GritPatternError`.

# Test: Search for error handling patterns inside the functions. Expect: Use of `GritPatternError`.
rg --type rust 'GritPatternError::new' -A 3

Length of output: 38681

crates/grit-pattern-matcher/src/pattern/patterns.rs (6)

71-71: Update to GritResult improves specificity.

The change from Result<bool> to GritResult<bool> in the execute method of the Matcher trait enhances error specificity and control. This is a positive change for error handling.


148-148: Consistent error handling with GritResult<String>.

The text method now returns GritResult<String>, aligning with the new error handling strategy. This change improves consistency across the codebase.


161-161: Enhanced error handling in float method.

The float method now uses GritResult<f64>, which aligns with the updated error handling approach, providing more clarity in error propagation.


234-234: Improved error handling in execute method.

The execute method in the Pattern struct now returns GritResult<bool>, enhancing error specificity. This change is consistent with the new error handling strategy.


254-261: Explicit error construction for unimplemented patterns.

The use of GritPatternError::new_matcher for CallBuiltIn, CallFunction, and CallForeignFunction patterns provides clearer error messaging, which is beneficial for debugging and maintenance.


306-308: Clearer error messaging for Dots pattern.

The error message for the Dots pattern is now more explicit, using GritPatternError::new. This improves the clarity and consistency of error handling.

crates/core/src/marzano_binding.rs (6)

68-68: Transition to GritResult for linearize_binding.

The function now returns GritResult, which enhances error specificity and aligns with the updated error handling strategy.


123-123: Improved error handling in linearize_binding.

The use of GritResult in the collection of effects improves error propagation, making the function more robust.


142-142: Enhanced error messaging for range checks.

The error handling for overlapping ranges now uses GritPatternError::new, providing clearer and more consistent error messages.


407-408: Consistent error handling in linearized_text.

The linearized_text method now returns GritResult<Cow<'a, str>>, aligning with the new error handling strategy and improving consistency.


451-451: Transition to GritResult in text method.

The text method now returns GritResult<Cow<str>>, which enhances error specificity and aligns with the updated error handling strategy.


555-555: Refined error logging in log_empty_field_rewrite_error.

The error logging now uses GritPatternError::Builder, providing a more structured approach to error creation and logging.

crates/core/src/inline_snippets.rs (10)

91-91: Transition to GritResult in pad_snippet.

The function now returns GritResult<String>, enhancing error specificity and aligning with the updated error handling strategy.


130-130: Improved error handling in inline_sorted_snippets_with_offset.

The function now returns GritResult, which provides more precise error reporting and aligns with the new error handling strategy.


132-134: Consistent error messaging for sorting checks.

The error message for unsorted replacements is now more explicit, using GritPatternError::new, which improves clarity.


141-143: Clearer error messaging for overlapping ranges.

The error handling for overlapping ranges now uses GritPatternError::new, providing clearer and more consistent error messages.


162-168: Improved error handling for slice checks.

The error handling for slice range checks now uses GritPatternError::new, enhancing the clarity of error messages.


202-227: Refined error handling for offset calculations.

The error handling for offset calculations now uses GritPatternError::new, providing clearer and more consistent error messages.


236-239: Enhanced error messaging for range bounds.

The error handling for out-of-bounds ranges now uses GritPatternError::new, improving clarity and consistency.


247-254: Transition to GritResult in adjust_range.

The function now returns GritResult<Range<usize>>, enhancing error specificity and aligning with the updated error handling strategy.


259-263: Improved error handling in adjust_index.

The function now returns GritResult<usize>, which provides more precise error reporting and aligns with the new error handling strategy.


Line range hint 305-315:
Consistent error handling in delete_hanging_comma.

The function now returns GritResult, enhancing error specificity and aligning with the updated error handling strategy.

crates/core/src/pattern_compiler/compiler.rs (2)

24-25: Import changes approved.

The import of GritPatternError aligns with the updated error handling strategy. The removal of Utf8Error is appropriate given the context.


105-105: Error handling changes approved.

The use of GritPatternError in the collect method enhances error specificity related to pattern matching. This change is consistent with the updated error management strategy.

crates/core/src/marzano_resolved_pattern.rs (8)

16-19: Import changes approved.

The addition of GritPatternError and GritResult imports supports the new error handling strategy, which is more specific to the domain.


49-59: Error handling changes approved in to_snippets.

The transition to GritResult and the use of GritPatternError improve the specificity of error reporting within the to_snippets function.


Line range hint 105-195: Error handling changes approved in extend.

The use of GritResult and GritPatternError enhances error specificity and consistency in the extend function.


344-346: Error handling changes approved in push_binding.

The transition to GritResult and the use of GritPatternError improve error handling specificity in the push_binding function.


353-355: Error handling changes approved in set_list_item_at_mut.

The use of GritResult and GritPatternError enhances error specificity and consistency in the set_list_item_at_mut function.


Line range hint 596-702: Error handling changes approved in linearized_text.

The transition to GritResult and the use of GritPatternError improve error handling specificity in the linearized_text function.


713-740: Error handling changes approved in float.

The use of GritResult and GritPatternError enhances error specificity and consistency in the float function.


Line range hint 770-804: Error handling changes approved in text.

The transition to GritResult and the use of GritPatternError improve error handling specificity in the text function.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (5)
crates/grit-util/src/lib.rs (1)

7-7: Ensure comprehensive documentation for the new error module.

The addition of the error module enhances the library's error handling capabilities. Ensure that its functionality is well-documented for ease of use.

crates/core/src/paths.rs (1)

Line range hint 18-34:
Consider using GritResult and specific error types for consistency.

The function currently uses anyhow::Result for error handling. To maintain consistency with the rest of the file, consider updating it to use GritResult and specific error types like GritPatternError.

crates/grit-pattern-matcher/src/pattern/add.rs (1)

59-59: Verify the handling of GritResult<bool> in execute calls

The execute function's return type GritResult<bool> is not consistently handled across the codebase. In some instances, the result is directly used without proper error handling, which could lead to unhandled errors during execution. It's crucial to ensure that all calls to execute properly handle the GritResult<bool> by using constructs like match, unwrap, or expect to manage potential errors.

  • File: crates/wasm-bindings/src/match_pattern.rs

    • Snippet: let results = pattern.execute_files(files, &context);
    • Issue: The result is directly returned without error handling.
  • File: crates/gritmodule/src/testing.rs

    • Snippet: let res = compiled.execute_files(rich_files, &runtime);
    • Issue: The result is iterated over without checking for errors.
  • File: crates/lsp/src/search.rs

    • Snippet: let execution_result = problem.execute_file(...);
    • Issue: The result is filtered without error handling.

Please review these instances and ensure proper error handling is implemented. This will help prevent runtime errors and improve the robustness of the code.

Analysis chain

Verify the usage of GritResult in execute.

The method execute now returns GritResult<bool>, which is consistent with the refactor. Ensure that the calling code handles this new result type appropriately.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `execute` handle `GritResult<bool>`.

# Test: Search for the function usage. Expect: Correct handling of `GritResult<bool>`.
rg --type rust -A 5 $'execute'

Length of output: 130308


Script:

#!/bin/bash
# Description: Check how the result of `execute` calls is handled, focusing on `GritResult<bool>` handling.

# Search for `execute` calls and check for proper handling of `GritResult<bool>`.
rg --type rust -A 10 'execute' | rg -B 5 'match|unwrap|expect|?'

Length of output: 181


Script:

#!/bin/bash
# Description: Check how the result of `execute` calls is handled, focusing on `GritResult<bool>` handling.

# Search for `execute` calls and check for proper handling of `GritResult<bool>`.
rg --type rust -A 10 'execute' | rg -B 5 'match|unwrap|expect|\?'

Length of output: 163506

crates/grit-pattern-matcher/src/pattern/regex.rs (1)

67-71: Improved Error Reporting.

The explicit creation of GritPatternError provides clear error messages, enhancing the debugging process. Consider including more context if available.

- return Err(GritPatternError::new(format!(
+ return Err(GritPatternError::new(format!(
    "In function execute_matching: regex pattern matched {} variables, but expected {}",
crates/grit-pattern-matcher/src/pattern/includes.rs (1)

148-148: Inconsistent Return Types in Matcher Implementations

The execute method in some Matcher trait implementations returns Result<bool> instead of the expected GritResult<bool>. This inconsistency could lead to issues in error handling and should be addressed.

  • Files with Result<bool> return type:
    • crates/core/src/test.rs

Please ensure that all implementations of the Matcher trait return GritResult<bool> for consistency.

Analysis chain

Verify the trait implementation change.

The execute method in the Matcher trait now returns GritResult<bool>. Ensure that this change is consistent across all trait implementations.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all implementations of the `Matcher` trait for consistency with the new return type.

# Test: Search for trait implementations. Expect: Only occurrences of the new return type.
rg --type rust -A 5 $'impl Matcher'

Length of output: 2174


Script:

#!/bin/bash
# Description: Check the return type of the `execute` method in each `Matcher` trait implementation.

# Test: Extract the return type of the `execute` method.
rg --type rust -A 10 'impl Matcher' | rg 'fn execute' -A 5

Length of output: 2149


Script:

#!/bin/bash
# Description: Extract the return type of the `execute` method in each `Matcher` trait implementation.

# Test: Extract the full signature of the `execute` method to see the return type.
rg --type rust -A 10 'impl Matcher' | rg 'fn execute' -A 10 | rg '->'

Length of output: 476


Script:

#!/bin/bash
# Description: Correctly extract the return type of the `execute` method in each `Matcher` trait implementation.

# Test: Extract the full signature of the `execute` method to see the return type.
rg --type rust -A 10 'impl Matcher' | rg 'fn execute' -A 10 | grep '->'

Length of output: 184


Script:

#!/bin/bash
# Description: Extract the return type of the `execute` method in each `Matcher` trait implementation.

# Correctly handle special characters to extract the return type.
rg --type rust -A 10 'impl Matcher' | rg 'fn execute' -A 10 | grep '\->'

Length of output: 384

@morgante morgante merged commit 234aa75 into main Aug 12, 2024
11 checks passed
@github-actions github-actions bot mentioned this pull request Aug 12, 2024
@seren5240 seren5240 deleted the only-matcher branch August 12, 2024 20:03
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.

Request to change anyhow to thiserror (or custom error) in grit-pattern-matcher
2 participants