Skip to content

refactor: Move get_instance_func from Globals to CompilationEngine#1276

Draft
tatiana-s wants to merge 3 commits intomainfrom
ts/move-to-engine
Draft

refactor: Move get_instance_func from Globals to CompilationEngine#1276
tatiana-s wants to merge 3 commits intomainfrom
ts/move-to-engine

Conversation

@tatiana-s
Copy link
Contributor

Doesn't actually require information only available in globals and this allows you to use it without having a globals object (needed in protocol checker implementation) but not entirely sure about this

@tatiana-s tatiana-s requested a review from a team as a code owner September 25, 2025 13:28
@tatiana-s tatiana-s requested a review from ss2165 September 25, 2025 13:28
@hugrbot
Copy link
Collaborator

hugrbot commented Sep 25, 2025

This PR contains breaking changes to the public Python API.
Please deprecate the old API instead (if possible), or mark the PR with a ! to indicate a breaking change.

Breaking changes summary
guppylang-internals/src/guppylang_internals/checker/core.py:0: Globals.get_instance_func:
Public object was removed


@github-actions
Copy link
Contributor

github-actions bot commented Sep 25, 2025

🐰 Bencher Report

Branchts/move-to-engine
TestbedLinux
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
microseconds (µs)
(Result Δ%)
Upper Boundary
microseconds (µs)
(Limit %)
tests/benchmarks/test_big_array.py::test_big_array_check📈 view plot
🚷 view threshold
697,044.83 µs
(-7.14%)Baseline: 750,675.44 µs
788,209.21 µs
(88.43%)
tests/benchmarks/test_big_array.py::test_big_array_compile📈 view plot
🚷 view threshold
1,637,335.44 µs
(+3.01%)Baseline: 1,589,424.48 µs
1,668,895.70 µs
(98.11%)
tests/benchmarks/test_big_array.py::test_big_array_executable📈 view plot
🚷 view threshold
7,312,112.50 µs
(+1.02%)Baseline: 7,238,356.91 µs
7,600,274.76 µs
(96.21%)
tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_check📈 view plot
🚷 view threshold
52,740.87 µs
(-29.33%)Baseline: 74,630.91 µs
78,362.46 µs
(67.30%)
tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compile📈 view plot
🚷 view threshold
90,155.29 µs
(+1.88%)Baseline: 88,493.83 µs
92,918.52 µs
(97.03%)
tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_executable📈 view plot
🚷 view threshold
608,307.53 µs
(+1.46%)Baseline: 599,527.66 µs
629,504.05 µs
(96.63%)
tests/benchmarks/test_prelude.py::test_import_guppy📈 view plot
🚷 view threshold
50.38 µs
(-1.52%)Baseline: 51.16 µs
53.72 µs
(93.79%)
🐰 View full continuous benchmarking report in Bencher

@github-actions
Copy link
Contributor

github-actions bot commented Sep 25, 2025

🐰 Bencher Report

Branchts/move-to-engine
TestbedLinux
Click to view all benchmark results
Benchmarkhugr_bytesBenchmark Result
bytes x 1e3
(Result Δ%)
Upper Boundary
bytes x 1e3
(Limit %)
hugr_nodesBenchmark Result
nodes
(Result Δ%)
Upper Boundary
nodes
(Limit %)
tests/benchmarks/test_big_array.py::test_big_array_compile📈 view plot
🚷 view threshold
143.70 x 1e3
(0.00%)Baseline: 143.70 x 1e3
145.13 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
6,590.00
(0.00%)Baseline: 6,590.00
6,655.90
(99.01%)
tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compile📈 view plot
🚷 view threshold
21.67 x 1e3
(0.00%)Baseline: 21.67 x 1e3
21.89 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
606.00
(0.00%)Baseline: 606.00
612.06
(99.01%)
🐰 View full continuous benchmarking report in Bencher

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 82.14286% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.50%. Comparing base (0692279) to head (fa4d04c).

Files with missing lines Patch % Lines
...pylang-internals/src/guppylang_internals/engine.py 78.94% 8 Missing ⚠️
...ls/src/guppylang_internals/checker/expr_checker.py 90.00% 1 Missing ⚠️
...s/src/guppylang_internals/std/_internal/checker.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1276   +/-   ##
=======================================
  Coverage   93.50%   93.50%           
=======================================
  Files         121      121           
  Lines       11168    11170    +2     
=======================================
+ Hits        10443    10445    +2     
  Misses        725      725           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tatiana-s tatiana-s marked this pull request as draft September 25, 2025 13:38
@tatiana-s tatiana-s removed the request for review from ss2165 September 25, 2025 14:02
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