cairo-vm icon indicating copy to clipboard operation
cairo-vm copied to clipboard

Chore: Separate each builtin into a different file

Open PartyLich opened this issue 3 years ago • 5 comments

Separate each builtin into a different file

Description

Issue #195

  • Moves the implementation of each builtin runner into its own file.
  • Export paths remain unchanged.
  • No additional tests have been added. Functionality should not be affected, it's just a reorganization chore

Checklist

  • [x] Linked to Github Issue
  • [ ] Unit tests added
  • [ ] Integration tests added.
  • [ ] This change requires new documentation.
    • [ ] Documentation has been added/updated.

PartyLich avatar Jul 06 '22 21:07 PartyLich

Codecov Report

Merging #248 (9fbb81e) into main (15911a3) will not change coverage. The diff coverage is 97.53%.

@@           Coverage Diff           @@
##             main     #248   +/-   ##
=======================================
  Coverage   95.46%   95.46%           
=======================================
  Files          28       32    +4     
  Lines        5665     5665           
=======================================
  Hits         5408     5408           
  Misses        257      257           
Impacted Files Coverage Δ
src/vm/runners/builtin_runner/bitwise.rs 95.83% <95.83%> (ø)
src/vm/runners/builtin_runner/output.rs 97.36% <97.36%> (ø)
src/vm/runners/builtin_runner/hash.rs 98.29% <98.29%> (ø)
src/vm/runners/builtin_runner/ec_op.rs 96.00% <100.00%> (ø)
src/vm/runners/builtin_runner/range_check.rs 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 15911a3...9fbb81e. Read the comment docs.

codecov-commenter avatar Jul 06 '22 21:07 codecov-commenter

Glancing at the failing workflow my assumption is that the permissions issue is because the PR originates outside the org/repo.

Eg for this PR it has

GITHUB_TOKEN Permissions
  Contents: read
  Deployments: read
  Metadata: read

For a PR from within the organization (ex), the same workflow gets

GITHUB_TOKEN Permissions
  Contents: write
  Deployments: write
  Metadata: read

If it was allowed to pass, a random stranger on the internet (me in this case) would be creating automated commits on gh-pages. The benchmark workflow runs and attempts to commit on all PRs, including those outside the organization or repo. It could probably be improved, but preventing external commits that have no approval or merge seems like the right result. External parties like myself shouldn't have write access.

PartyLich avatar Jul 07 '22 16:07 PartyLich

Hi @PartyLich. Just a heads up that it may take us some time to review this PR. Re: benchmark output: you're 100% right. We're planning on reworking a bit how benchmarks are performed and reported on PRs and it would be a good idea to address this while doing that.

Oppen avatar Jul 07 '22 18:07 Oppen

Can we recheck this @Oppen so that we merge it at some point?

unbalancedparentheses avatar Jul 25 '22 08:07 unbalancedparentheses

I'll try to see into this today.

Oppen avatar Jul 25 '22 14:07 Oppen

Applied via a different PR.

Oppen avatar Sep 12 '22 18:09 Oppen