Found while auditing the ReadStat stack (see #31).
Two formats ReadStat can read are not reachable from load():
.por is half-wired. IteratorInterfaceExtensions.getiterator dispatches on the extension and calls read_por for .por (src/StatFiles.jl:58-59), but FileIO's registry only registers format"Stata" (.dta), format"SPSS" (.sav, magic $FL2) and format"SAS" (.sas7bdat) against StatFiles. There is no format or fileio_load method for .por, so load("x.por") never reaches the branch that would handle it. The .por branch is only reachable by constructing a StatFile directly.
.xpt is not wired at all. ReadStat has exported read_xport since v1.1.0 and has a types.xpt fixture, but StatFiles has no format registration, no fileio_load method, and no getiterator branch for it.
Fixing either means adding a format to FileIO's central registry (FileIO/src/registry.jl) as well as a fileio_load method here, so it needs an upstream FileIO PR alongside the StatFiles change. Note SPSS portable files are text-based with a 200-byte header, so the magic-byte approach used for .sav may not transfer directly.
Also worth noting: test/types.por is already checked in but no test exercises it.
🤖 Generated with Claude Code
Found while auditing the ReadStat stack (see #31).
Two formats ReadStat can read are not reachable from
load():.poris half-wired.IteratorInterfaceExtensions.getiteratordispatches on the extension and callsread_porfor.por(src/StatFiles.jl:58-59), but FileIO's registry only registersformat"Stata"(.dta),format"SPSS"(.sav, magic$FL2) andformat"SAS"(.sas7bdat) against StatFiles. There is no format orfileio_loadmethod for.por, soload("x.por")never reaches the branch that would handle it. The.porbranch is only reachable by constructing aStatFiledirectly..xptis not wired at all. ReadStat has exportedread_xportsince v1.1.0 and has atypes.xptfixture, but StatFiles has no format registration, nofileio_loadmethod, and nogetiteratorbranch for it.Fixing either means adding a format to FileIO's central registry (
FileIO/src/registry.jl) as well as afileio_loadmethod here, so it needs an upstream FileIO PR alongside the StatFiles change. Note SPSS portable files are text-based with a 200-byte header, so the magic-byte approach used for.savmay not transfer directly.Also worth noting:
test/types.poris already checked in but no test exercises it.🤖 Generated with Claude Code