Skip to content

Conversation

@alcides
Copy link
Owner

@alcides alcides commented Nov 4, 2025

Closes #86.


Note

Introduce CI and scripts to run examples with uv and optional Codon, document usage (including new synthetic problems page), and drop future annotations by adjusting type hints.

  • CI:
    • Add run_examples.yml to run examples via uv with a matrix enabling optional Codon (codon: [false,true]), installing tools and invoking run_examples.sh with CODON.
  • Scripts:
    • Update run_examples.sh to prefer uv run, optionally run examples with codon run -release when feasible, and fall back to Python; add heuristics to skip Codon for heavy third‑party deps.
  • Docs:
    • Add docs/source/synthetic_problems.md and link it in index.md.
    • Document running examples with uv and optional Codon in index.md.
  • Types/Annotations:
    • Remove from __future__ import annotations across the codebase; fix forward refs by using quoted annotations and minor type tweaks (e.g., Grammar.usable_grammar return type, GengyList methods).

Written by Cursor Bugbot for commit fda6a13. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on December 5

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

# Return 0 (true) if the example likely works with Codon; 1 otherwise
local file="$1"
# Heuristic: Codon generally doesn't support heavy third-party modules
if grep -E '^(from|import)\s+(pandas|numpy|sklearn|seaborn|z3|pathos|matplotlib|sympy)\b' "$file" >/dev/null 2>&1; then
Copy link

Choose a reason for hiding this comment

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

Bug: Polyleven Missing from Incompatibility Heuristic

The can_run_with_codon function's heuristic for detecting incompatible packages is incomplete. It checks for pandas, numpy, sklearn, seaborn, z3, pathos, matplotlib, and sympy, but misses polyleven which is imported by examples/synthetic_grammar_example.py (run at line 84). When CODON=1 is set, this example will be attempted with Codon and fail because Codon doesn't support the polyleven third-party package. The grep pattern should include polyleven in the list of packages to check.

Fix in Cursor Fix in Web

@alcides alcides closed this Nov 5, 2025
@alcides alcides deleted the 2025-11-04-gelq-EoG4u branch November 5, 2025 22:47
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.

Explore Codon compiler

2 participants