← Back to Pull requests

agda 2.9.0 #319405

Open
pthariensflame opened this pull request with 124 lines diff across 1 files
View on GitHub
pthariensflame pthariensflame commented on Oct 18, 2026 19:12 UTC
Author

-----

<!-- Do not tick a checkbox if you haven’t performed its action. Honesty is indispensable for a smooth review process. -->
<!-- Use [x] to mark item done before creation, or just click the checkboxes with device pointer after creation -->
<!-- In the following questions <formula> is the name of the formula you're editing. -->

  • Have you followed the guidelines for contributing?

  • Have you ensured that your commits follow the commit style guide?

  • Have you checked that there aren't other open pull requests for the same formula update/change?

  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>?

  • Is your test running fine brew test <formula>?

  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?
  • -----

  • I did not use AI/LLM to create this PR, ~~or I disclosed the tool/model below and reviewed its output~~; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.
  • <!-- If AI was used, explain below how it was used and how you verified the changes. Non-maintainers may only have one AI-assisted PR open at a time. See https://docs.brew.sh/Responsible-AI-Usage for guidance. -->

    -----

    ~~Not ready yet, since there is still only a release candidate and the other components haven't had updated releases yet either. We figured we should make this available "early" so that any kinks can be worked out in advance of the actual release.~~ The official release of Agda 2.9.0 has been made now!

    Currently blocking this PR:

  • ~~agda2hs release~~

  • - Released: https://github.com/agda/agda2hs/releases/tag/v1.5
  • agda-categories release

  • - Tracking issue: https://github.com/agda/agda-categories/issues/529
  • cubical release

  • - Tracking issue: https://github.com/agda/cubical/issues/1338

    Diff: 124 lines (+69 / -55) across 1 files Reviewer: SMillerDev Review duration: 67805m
    All Vouch review confidence checks passed
    Residual risk 0.06 = Change Risk (0.39) × (1 − Review Confidence (0.86)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 124 lines diff across 1 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.84 · 5 substantive comment(s)
    0.84
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    85%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.289
    Real PR Conversation Timeline
    16 items
    pthariensflame pthariensflame commented on Nov 14, 2026 00:51 UTC
    Author

    Agda2hs and ALS need more substantial compatibility fixes than just raising the bounds in their cabal files and hoping for the best; we think it may be best to wait at least until a commit appears upstream for each that resolves these issues, and we will be on the lookout for that.

    The categories library also needs more extensive fixing for compatibility with Agda 2.9.0, and we'd rather not ship an unreleased version even if it appears to work right now.

    EDIT: ALS has a new version that's compatible now! Still waiting on Agda2hs and categories.

    shhyou shhyou commented on Nov 25, 2026 07:10 UTC
    Contributor

    agda/agda2hs#474 landed!

    shhyou shhyou commented on Nov 25, 2026 07:16 UTC
    Contributor

    So agda2hs Git main branch can compile with Agda 2.9.0 (I tested with this Stack nightly resolver:

    resolver: nightly-2026-11-14
    compiler: ghc-9.12.4
    compiler-check: match-exact
    
    # Local packages specified by relative directory name.
    packages:
    - '.'
    

    However, I think the official agda2hs v1.5 release is waiting for nix to upgrade to Agda 2.9.0.

    shhyou shhyou commented on code on Nov 26, 2026 01:14 UTC
    Code Review
    Formula/a/agda.rb:1

    This line currently fails because agda/agda-categories@ade267a5a02688fb97ec9d6e03ab6192be94439e has bumped stdlib to standard-library-2.4

    pthariensflame pthariensflame commented on Nov 26, 2026 04:55 UTC
    Author

    Oh, wow. It currently fails on x86_64 Linux with a heap exhaustion error! 4GiB is apparently not sufficient anymore. We don't know what the preferred resolution for that should be.

    shhyou shhyou commented on Nov 26, 2026 05:25 UTC
    Contributor

    Ah, I've seen this on my machine. The default memory size for agda-stdlib (and perhaps for agda-categories as well) is too small for parallel builds, so not using -jNNN should fix it. But I don't know how much is needed for parallel builds.

    pthariensflame pthariensflame commented on Nov 26, 2026 19:12 UTC
    Author

    It appears 6GiB is sufficient for stdlib; fix applied. Now resizing for categories.

    EDIT: 12GiB is sufficient for categories. Also fixed some tests (and added a new one).

    shhyou shhyou commented on code on Nov 27, 2026 03:34 UTC
    Code Review
    Formula/a/agda.rb:1
    @@ -437,7 +433,10 @@ module Agda2HsTest where
         system bin/"agda", categoriestest
     
         # compile a simple module using the JS backend
    -    system bin/"agda", "--js", simpletest
    +    system bin/"agda", "--js", "--js-es6", simpletest
    +
    +    # generate LaTeX from a simple module, with EGC counting
    +    system bin/"agda", "--latex", "--count-clusters", simpletest

        system bin/"agda", "--latex", "--count-clusters", textest
    

    shhyou shhyou commented on code on Nov 27, 2026 03:36 UTC
    Code Review
    Formula/a/agda.rb:1

    
        textest = testpath/"TeXTest.lagda"
        textest.write <<~'AGDA'
          \documentclass{article}
          \usepackage{amsmath,newunicodechar}
          \newunicodechar{∀}{$\forall$}
          \newunicodechar{≤}{$\le$}
          \newunicodechar{→}{$\to$}
          \newunicodechar{≡}{$\equiv$}
          \usepackage{agda}
          \begin{document}
          \begin{code}
          {-# OPTIONS --safe --cubical-compatible #-}
          module TeXTest where
          infix 4 _≡_
          data _≡_ {A : Set} (x : A) : A → Set where
            refl : x ≡ x
          cong : ∀ {A B : Set} (f : A → B) {x y} → x ≡ y → f x ≡ f y
          cong f refl = refl
          \end{code}
          \end{document}
        AGDA
    

    To test the LaTeX backend, I think the Agda code needs to be wrapped inside code blocks

    shhyou shhyou commented on code on Nov 27, 2026 04:09 UTC
    Code Review
    Formula/a/agda.rb:1
    @@ -133,11 +128,6 @@ def fetch
         # Make the language server build tolerate point releases
         inreplace als/"package.yaml", "Agda == 2.8.0", "Agda >= 2.8.0 && < 2.9.0"
     

    
        # Note in version string that agda2hs is development version (pre-1.5-release)
        # Remove on actual agda2hs 1.5 release
        agda2hs_revision_spec = resource("agda2hs").specs[:revision]&.slice(0, 7)
        agda2hs_name_suffix = agda2hs_revision_spec ? "-dev" : ""
        agda2hs_version_suffix = agda2hs_revision_spec ? "-#{agda2hs_revision_spec}" : ""
        inreplace agda2hs_build/"src"/"Main.hs" do |s|
          s.gsub!(
            "backendName           = \"agda2hs\"",
            "backendName           = \"agda2hs${agda2hs_name_suffix}\""
          )
          s.gsub! "showVersion version", "showVersion version ++ \"#{agda2hs_version_suffix}\""
        end
    

    (I am not familiar with Ruby, just trying to illustrate what I meant)

    shhyou shhyou commented on Nov 27, 2026 04:27 UTC
    Contributor

    Thank you for the work!

    shhyou shhyou commented on Nov 27, 2026 04:27 UTC
    Reviewer

    To Test the LaTeX backend, I think some \begin{code}\end{code} TeX code is needed to activate Agda highlighting. The comments added an example.

    When checking agda2hs 1.5 milestones, https://github.com/agda/agda2hs/milestone/6, I notice that there are still some pending changes. That makes me wonder whether the actual release will contain some other user-noticeable differences.

    To avoid user confusion, would adding some "-dev" and revision hash to agda2hs --version help? I added some code trying to illustrate what I meant by this. The output looks like this:

    $ agda2hs --version 
    Agda version 2.9.0
    Built with flags (cabal -f)
     - optimise-heavily: extra optimisations
     - agda2hs-dev backend version 1.5-b3d4cc1
    

    pthariensflame pthariensflame commented on code on Nov 27, 2026 19:08 UTC
    Code Review
    Formula/a/agda.rb:1
    @@ -133,11 +128,6 @@ def fetch
         # Make the language server build tolerate point releases
         inreplace als/"package.yaml", "Agda == 2.8.0", "Agda >= 2.8.0 && < 2.9.0"
     

    This seems to be a bad idea to us? This won't (and shouldn't) be merged until agda2hs, agda-categories, and cubical all have appropriate released tags, so this change would have to be undone anyway.

    shhyou shhyou commented on code on Nov 27, 2026 20:53 UTC
    Code Review
    Formula/a/agda.rb:1
    @@ -133,11 +128,6 @@ def fetch
         # Make the language server build tolerate point releases
         inreplace als/"package.yaml", "Agda == 2.8.0", "Agda >= 2.8.0 && < 2.9.0"
     

    Ah sure! If the PR wait after agda2hs release then everything is good and I don't have worries.

    SMillerDev SMillerDev approved these changes on Nov 30, 2026 10:06 UTC
    Approved Reviewer

    Approved these changes.

    Reviewers
    Assignees
    pthariensflame pthariensflame
    Labels
    risk: low confidence: 85.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 38.9% (MEDIUM) · Higher = larger blast radius
    38.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 85.5% · Lower = rushed or shallow review
    85.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 5.6% · Safe to merge
    5.6%