Skip to content

Fix sublibrary QA Aqua piracy via treat_as_own for owned types#616

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-sublib-qa-aqua-piracy
Jun 15, 2026
Merged

Fix sublibrary QA Aqua piracy via treat_as_own for owned types#616
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-sublib-qa-aqua-piracy

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Problem

The sublibrary QA groups added in #614 currently fail on master for two of the three sublibraries. The Aqua Piracy test reports the sublibraries' methods as type piracy:

  • RecursiveArrayToolsArrayPartitionAnyAllany/all extended on ArrayPartition
  • RecursiveArrayToolsShorthandConstructorsgetindex(::Type{VA}, xs...) and getindex(::Type{AP}, xs...)

These are not piracy: ArrayPartition, VA, and AP are types owned by RecursiveArrayTools, which each sublibrary hard-depends on. Extending Base functions on a dependency's owned types is the intended design of these subpackages (it is the entire reason they exist, as documented in their module docstrings).

Fix

Pass the owned types through Aqua's documented treat_as_own mechanism:

Aqua.test_all(RATAPAA; piracies = (; treat_as_own = [RATAPAA.ArrayPartition]))
Aqua.test_all(RATSC;   piracies = (; treat_as_own = [RATSC.VA, RATSC.AP]))

No package source changes; only the QA test configuration is corrected.

Local verification (Julia 1.10, the package's [compat] floor)

Ran the full test/qa/qa.jl (Aqua + JET) for each sublibrary against the in-tree source:

ArrayPartitionAnyAll  QA | Pass 12  Total 12
ShorthandConstructors QA | Pass 12  Total 12

Both groups now pass entirely (Aqua piracy included, JET unaffected).

Out of scope (reported separately)

  • RecursiveArrayToolsRaggedArrays QA also fails Aqua piracy (same owned-type pattern) and has genuine JET inference findings (no matching method found similar_type(::Any) in copyto!/fill!/broadcast, because the ragged container's .u field is Any-typed). The JET findings are real and would require type-stabilizing the ragged container, so RaggedArrays is intentionally left out of this focused PR.
  • Downgrade (Core) fails with an Unsatisfiable resolver error at the --min=@deps --julia=1.10 downgrade minimum — a compat-floor conflict, separate from this QA issue.

Please ignore until reviewed by @ChrisRackauckas.

The ArrayPartitionAnyAll and ShorthandConstructors sublibrary QA groups
(added in SciML#614) fail Aqua's piracy check because they extend Base
functions on RecursiveArrayTools-owned types:

  * ArrayPartitionAnyAll: any/all on ArrayPartition
  * ShorthandConstructors: getindex(::Type{VA}, ...), getindex(::Type{AP}, ...)

These are intentional methods on types the sublibraries hard-depend on, not
type piracy. Pass them via Aqua.test_all(...; piracies = (; treat_as_own = ...))
so the owned-type extensions are not flagged.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review June 15, 2026 15:19
@ChrisRackauckas ChrisRackauckas merged commit 37288fd into SciML:master Jun 15, 2026
40 of 50 checks passed
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