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

Regex hint processor #524

Closed

Conversation

Bernardstanislas
Copy link
Contributor

@Bernardstanislas Bernardstanislas commented Oct 30, 2022

Regex hint processer

Description

Linked to #523.

Implements a RegexHintProcessor, which only holds custom hints. The hints match the code based on a regex.

This processor does not have any builtin, using it can be done in conjonction with the BuiltinHintProcessor with a composite pattern for example. This is left to the user project of the vm.

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.

@codecov-commenter
Copy link

Codecov Report

Merging #524 (9ead2d4) into main (278833d) will decrease coverage by 0.01%.
The diff coverage is 90.47%.

@@            Coverage Diff             @@
##             main     #524      +/-   ##
==========================================
- Coverage   92.10%   92.09%   -0.02%     
==========================================
  Files          48       49       +1     
  Lines        3192     3213      +21     
==========================================
+ Hits         2940     2959      +19     
- Misses        252      254       +2     
Impacted Files Coverage Δ
src/hint_processor/regex_hint_processor/mod.rs 90.47% <90.47%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Oppen
Copy link
Member

Oppen commented Oct 31, 2022

I would suggest this is better implemented as part of a downstream project.
Regardless of that, I strongly suggest to move the regex compilation to the hint compilation step, as it tends to be a major performance bottleneck.

@Bernardstanislas
Copy link
Contributor Author

Oh I see, I'll add it to our repo then.

Thanks for the feedback, agreed with the regex compilation remark :)

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.

None yet

3 participants