Skip to content

Commit 37288fd

Browse files
ChrisRackauckas-ClaudeChrisRackauckasclaude
authored
Fix sublibrary QA Aqua piracy via treat_as_own for owned types (#616)
The ArrayPartitionAnyAll and ShorthandConstructors sublibrary QA groups (added in #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: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent f3b56b5 commit 37288fd

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

  • lib
    • RecursiveArrayToolsArrayPartitionAnyAll/test/qa
    • RecursiveArrayToolsShorthandConstructors/test/qa

lib/RecursiveArrayToolsArrayPartitionAnyAll/test/qa/qa.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
using RecursiveArrayToolsArrayPartitionAnyAll, Aqua, JET, Test
22

3+
const RATAPAA = RecursiveArrayToolsArrayPartitionAnyAll
4+
35
@testset "QA" begin
46
@testset "Aqua" begin
5-
Aqua.test_all(RecursiveArrayToolsArrayPartitionAnyAll)
7+
# `any`/`all` are extended on the RecursiveArrayTools-owned `ArrayPartition`
8+
# type, so they are intentional (owned) methods, not piracy.
9+
Aqua.test_all(RATAPAA; piracies = (; treat_as_own = [RATAPAA.ArrayPartition]))
610
end
711
@testset "JET" begin
812
JET.test_package(RecursiveArrayToolsArrayPartitionAnyAll; target_defined_modules = true)

lib/RecursiveArrayToolsShorthandConstructors/test/qa/qa.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
using RecursiveArrayToolsShorthandConstructors, Aqua, JET, Test
22

3+
const RATSC = RecursiveArrayToolsShorthandConstructors
4+
35
@testset "QA" begin
46
@testset "Aqua" begin
5-
Aqua.test_all(RecursiveArrayToolsShorthandConstructors)
7+
# `getindex(::Type{VA}, ...)` / `getindex(::Type{AP}, ...)` extend Base on
8+
# RecursiveArrayTools-owned types, so they are intentional (owned) methods,
9+
# not piracy.
10+
Aqua.test_all(RATSC; piracies = (; treat_as_own = [RATSC.VA, RATSC.AP]))
611
end
712
@testset "JET" begin
813
JET.test_package(RecursiveArrayToolsShorthandConstructors; target_defined_modules = true)

0 commit comments

Comments
 (0)