Skip to content

Declare the stubs of src/methods.jl public and require Julia 1.11 - #33

Merged
michakraus merged 3 commits into
mainfrom
public/part-b
Oct 1, 2026
Merged

michakraus merged 3 commits into
mainfrom
public/part-b

Conversation

@michakraus

Copy link
Copy Markdown
Member

Part B of the plan "Make the GeometricBase stubs public", for GeometricBase.

Summary

  • src/methods.jl has one public statement after its export line. It names every function stub of the file that no export line of src/ names, and initialtime and finaltime: 42 names. The six exported stubs stay exported: datatype, timetype, arrtype and equtype from src/methods.jl, and reset! and value from src/data/state_variables.jl. Julia refuses a public declaration for an exported name.
  • No export line changes.
  • New test/public.jl, in the core group. It reads src/methods.jl, finds every function <name> end line, and asserts Base.ispublic(GeometricBase, name) for each, and for initialtime and finaltime. A stub added later without a public entry fails it.
  • Project.toml: julia = "1.11" (the public keyword needs 1.11) and version = "0.15.0". test/Project.toml and docs/Project.toml have no julia bound and get none. The stdlib bound Unicode = "1.10" does not change.
  • CHANGELOG.md: a ### Breaking Changes entry under [Unreleased], because Julia 1.10 cannot load 0.15. Julia 1.10 users keep 0.14.12.

Test runs

  • Julia 1.13.1, full suite: 41 passed, 0 failed. Aqua shows 10 Pass and 1 Broken, the known ambiguity of issue Method ambiguity between range for StateWithError and Base.range #22.
  • Julia 1.11 floor: not verified locally. The run stopped before any test, with an SSL "Invalid certificate chain" error during the download of the OpenSSL_jll artifact. The CI min job is the check for the floor.
  • The docs build is the Doctests job of this pull request. No docstring changes, and docs/src/index.md uses @autodocs.
  • Named mutants on test/public.jl: 5 CAUGHT, 0 SURVIVED (one name deleted from public; a new stub with no entry; a new stub with a trailing comment; a new indented stub; the public statement moved into a comment).

Advisor decisions

Decided (advisor, 2026-10-01, high): Clause 1 names every stub of src/methods.jl that no
export line of src/ names, plus initialtime and finaltime: 42 names. Six stubs are exported
and so stay out of public (Julia refuses a name that is both): datatype, timetype, arrtype
and equtype from src/methods.jl, and reset! and value, which src/data/state_variables.jl:8
exports. The test of clause 3 still covers all six.

Critic

Round 1: Critic 1a PASS, Critic 1b PASS. Both judged origin/main...HEAD at abf6350.

clause command on origin/main on branch verdict
C1a one public statement after export grep and parse probe none 1 hit, src/methods.jl:4, after export on line 2 PASS (1a, 1b)
C1b names = (46 stubs − 6 exported {datatype, timetype, arrtype, equtype, reset!, value}) ∪ {initialtime, finaltime} = 42 set-equality probe n/a sets equal, no extra, no missing PASS (1a, 1b)
C1c parses on 1.11 Meta.parseall on 1.11.9 n/a 1 :public expression, 42 args (1.10.12 gives a parse error, as expected) PASS (1b)
C2 export lines unchanged git diff origin/main -- src, grep export — empty PASS (1a, 1b)
C3 test/public.jl in core, reads methods.jl, asserts ispublic run-tests.jl affected; pins.jl FAILS on origin/main Public Names 50/50 PASS (1a, 1b)
Mutant N1 delete one name mutate.jl --warm — CAUGHT PASS
Mutant N2 add function newstub end same — CAUGHT PASS
Mutant N3 comment out public same — CAUGHT, 8 Pass 42 Fail 50 total PASS
Doubted mutants: drop initialtime, drop finaltime, drop h5load, unexport reset!/value, drop first name same — all CAUGHT PASS
C4 julia = "1.11", version = "0.15.0"; test/ and docs/ keep no julia bound; Unicode = "1.10" unchanged grep Project.toml 1.10 / 0.14.12 Project.toml:18, :3 PASS
C5 CHANGELOG [Unreleased] Breaking Changes names the set, the 1.11 floor, the reason read CHANGELOG.md:15–27 absent present PASS
C6 full suite on 1.13.1 run-tests.jl — pass, Aqua 10 + 1 broken PASS
§V scope: 5 files, no workflow change git diff --stat — in scope PASS
layout test-layout.jl --check — LAYOUT-OK PASS

After the PASS, one test-only fix, which the dispatcher authorised: the stub regular expression of test/public.jl now accepts an indented stub line and a trailing comment (the critics' mutant D4 survived the first form). The fix commit is c6c51c6. With it, D4 and an indented-stub mutant are CAUGHT, and the affected tests pass.

Critic 1a also noted that test/public.jl does not fail for a public name with no stub. Aqua's undefined_exports check, which runs in core, catches that case: a probe module with public notdefined_stub gives Aqua.undefined_exports(K6Probe) == [Symbol("Main.K6Probe.notdefined_stub")] on Julia 1.13.1 with Aqua 0.8.18. So no known issue is recorded for it.

Known issues added

None.

Pre-PR verification

Verdict: clear to open — 0 unresolved

Fixed

  • test/public.jl:9: the stub pattern (\S+) also matched an empty method with arguments (function f(x) end captured f(x)). It is now ([^\s(]+). The file still finds all 46 stubs. Probes still match an indented stub and a stub with a trailing comment, and they skip a commented-out stub and function f(x) end.
  • KNOWN_ISSUES.md: the K6 entry from this branch is removed. Aqua's undefined_exports already fails for a public name with no definition. It runs in core through Aqua.test_all, and names(m) lists public names on Julia 1.11.9 and 1.13.1.

Unresolved: none.

Pre-existing: none found.

Checked and clean

  • Correctness: 42 public names = 46 stubs − 6 exported + initialtime, finaltime. No name is undefined. The source loads in a fresh Julia 1.11.9 process with 42 public, non-exported names. The CI min job reads the new floor from [compat].
  • Type piracy: Aqua.test_piracies and Aqua.test_all (with the known broken ambiguity check, issue Method ambiguity between range for StateWithError and Base.range #22) pass.
  • Type instability and allocations: the diff defines no method. fatou lint is clean on the changed .jl files.
  • Comments, history and CHANGELOG: the comments are current and use the present tense. The [Unreleased] entry under ### Breaking Changes is present and matches the code.
  • JuliaFormatter and test-layout.jl --check pass. test/public.jl passes on its own.

Not checked

  • The full suite on the 1.11 floor. The min CI job covers it; the local run failed on an SSL error during an artifact download.
  • Docs build and doctests: no docs/ or docstring change.

🤖 Generated with Claude Code

michakraus and others added 3 commits October 1, 2026 17:09
Every function stub of src/methods.jl that is not exported, and
initialtime and finaltime, is named in one public statement. reset! and
value stay out of it: src/data/state_variables.jl exports them, and
Julia refuses a public declaration for an exported name.

test/public.jl reads the stubs from src/methods.jl and asserts that each
one is public, so a stub added without a public entry fails.

The public keyword needs Julia 1.11: the julia bound is 1.11 and the
version is 0.15.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The stub regular expression now accepts leading whitespace and anything
after the closing end, so that a stub line with a trailing comment or an
indent is checked too. KNOWN_ISSUES.md records K6: the test does not fail
for a public name with no stub.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The stub pattern no longer captures a name with an argument list, so
an empty method such as function f(x) end is not read as a stub.

K6 goes: Aqua's undefined_exports check, which runs in core, already
fails for a public name with no definition, because names(m) lists the
public names from Julia 1.11.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 1, 2026 15:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The declarations, compatibility metadata, documentation, and regression coverage are consistent and complete.

Review effort: Balanced
Findings: None

What changed in this PR

Declares GeometricBase extension stubs public and raises the minimum Julia version to 1.11.

Changes:

  • Adds public API declarations for 42 names.
  • Adds regression coverage for stub visibility.
  • Bumps the package to 0.15.0 and documents the breaking compatibility change.
File Description
src/​methods.jl Declares non-exported extension points public.
test/​public.jl Verifies every stub is public.
test/​runtests.jl Adds public-name tests to the core suite.
Project.toml Requires Julia 1.11 and sets version 0.15.0.
CHANGELOG.md Documents the public API and compatibility changes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.40%. Comparing base (2df944a) to head (e3e66eb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #33      +/-   ##
==========================================
- Coverage   78.61%   77.40%   -1.22%     
==========================================
  Files          20       18       -2     
  Lines         449      447       -2     
==========================================
- Hits          353      346       -7     
- Misses         96      101       +5     

☔ View full report in Codecov by Harness.
📢 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.

@michakraus
michakraus merged commit 4016587 into main Oct 1, 2026
13 of 14 checks passed
@michakraus
michakraus deleted the public/part-b branch October 1, 2026 15:42
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.

2 participants