Repository navigation
feat!: remove manual ownership overlay; package is @safe-only (v0.5.0) - #82
MilesCranmer merged 8 commits into
Conversation
BREAKING: removes the entire manual ownership API: @own, @Move, @ref, @ref_into, @take!, @take, @Lifetime, @clone, @bc, @mut, @cc, @&, @Spawn, Mutex, Owned/OwnedMut/Borrowed/BorrowedMut/LazyAccessor and their error types. The package now consists solely of the automatic IR-based checker: @safe, @unsafe, BorrowCheckError, and the Preferences.jl enable/disable system. Rationale: the automatic layer supersedes the manual overlay as the package's core workflow (drop-in checking of unmodified code), while the overlay required restructuring every function around macros whose guarantees evaporated on any plain assignment outside the macro system. The two ownership systems also doubled documentation and test surface. The old API remains available on the v0.4.x release line. Also drops the now-unused MacroTools dependency and stale dispatch_doctor_mode test preference. Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec306f61ae
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
The auto checker (and its error type) only exists on Julia >= 1.12 with Base.code_ircode_by_type; older versions get @safe/@unsafe stubs. Importing and exporting BorrowCheckError unconditionally broke precompilation on 1.10. Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
BorrowCheckError and disable_by_default! had no docstrings, so the Documenter API page failed to render after the manual overlay removal. Also qualifies the @safe docref with its defining module path. Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
|
@codex review Pushed e348430: docs build fixed after the removal (BorrowCheckError and disable_by_default! gained docstrings; the API page now references defining-module paths). Also guarded the BorrowCheckError export on Julia versions without the auto layer (1129af2), fixing the 1.10 precompile failure in the first CI run. Full suite: 221 pass / 2 broken (the two |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e348430ab4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Julia 1.13 removed get_indices(::Vector{Compiler.InferenceResult},
::Core.MethodInstance), which the reflection layer calls, so including
the auto checker on 1.13-rc produced runtime MethodErrors that hung the
nightly CI job to its 1h timeout. Restrict inclusion to 1.12.x and match
the test-runner capability check; 1.13 support needs a proper shim.
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
README, the stub docstrings, and the BORROWCHECKER_ONLY_AUTO error now state that the IR checker requires Julia 1.12.x and that 1.13+ falls back to warn-and-pass-through stubs until support lands. Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
The @unsafe documentation section landed on master via MilesCranmer#82's README rewrite; the remaining diff was against the removed manual-overlay README and is stale.
Summary
BREAKING (v0.5.0): removes the entire manual ownership API in favor of the automatic IR-based checker.
Removed:
@own,@move,@ref,@ref_into,@take!,@take,@lifetime,@clone,@bc,@mut,@cc,@&,@spawn,Mutex,Owned,OwnedMut,Borrowed,BorrowedMut,LazyAccessor, and the associated error types.The package is now:
@safe,@unsafe,BorrowCheckError, and the Preferences.jl enable/disable system.Rationale
The old API remains available on the v0.4.x release line and the
v0.4tag.Notes
MacroToolsdependency dropped (only the overlay used it).@safe; the Preferences.jl enable/disable system is documented.test/FakeModule/is an inert leftover fixture that can be dropped in a follow-up.test/runtests.jlinclude list only).Test plan
@test_brokenmarkers fixed by fix(auto): stop false-positive generators in effect summarization #79, present on main), Aqua + JET included.@safe,@unsafe,BorrowCheckError,disable_by_default!.