Skip to content

refactor!: rename the IO submodule to Formats - #32

Merged
hyperpolymath merged 1 commit into
mainfrom
marina/jolly-volta-lkmb1k
Nov 14, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
marina/jolly-volta-lkmb1k

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Protoctist exported a submodule named IO, which clashes with Base.IO. After using Protoctist, user code that names IO failed: f(x::IO) = 1 raised UndefVarError: `IO` not defined. A submodule should never shadow a Base type, so the maintainer chose to rename it now, before registration.

Breaking: Protoctist.IO is now Protoctist.Formats.

Changes

  • src/io.jl → src/formats.jl, module IO → module Formats. The export list, internal uses and the module docstring follow.
  • test/cases/io.jl → test/cases/formats.jl.
  • Protoctist.IO.* → Protoctist.Formats.* in the tests, README, docs/ARCHITECTURE.adoc (the data-flow diagram is realigned), docs/EXPLAINME.adoc, docs/guide/cookbook.adoc and the EPA-ng example.
  • Left as written: CHANGELOG.adoc and docs/recovered/ (historical records), and the prose phrase "types, IO and exports" in the IS statement, which means input and output in general.

RSR Quality Checklist

Required

  • Tests pass (Pkg.test() on Julia 1.11.7: Aqua 11, behaviour 109)
  • Code is formatted (renames only; no new code)
  • Linter is clean (no new warnings)
  • No banned language patterns
  • No unsafe blocks without // SAFETY: comments
  • No banned functions
  • SPDX license headers present on all new/modified source files (the renamed files keep theirs)
  • No secrets, credentials, or .env files included

As Applicable

  • Documentation updated for user-facing changes
  • CHANGELOG or release notes updated: not edited by hand; the breaking change is in the commit message (refactor!:) for the generated changelog

Testing

  • Reproduction before: using Protoctist; f(x::IO) = 1 gives UndefVarError: `IO` not defined in `Main` .
  • After: it works, and IO === Base.IO is true; Protoctist.Formats is defined.
  • Pkg.test(): 120 pass.

Generated by Claude Code

Protoctist exported a submodule named IO, which clashes with Base.IO:
after `using Protoctist`, user code that names IO failed with
UndefVarError (`f(x::IO) = 1` reproduces it). A submodule should never
shadow a Base type, so it is renamed now, before registration.

- src/io.jl -> src/formats.jl, `module IO` -> `module Formats`; the
  export list, internal uses and the module docstring follow.
- test/cases/io.jl -> test/cases/formats.jl; Protoctist.IO.* ->
  Protoctist.Formats.* in tests, README, docs and the EPA-ng example.
- Left as written: CHANGELOG.adoc and docs/recovered/ (historical
  records), and the prose "types, IO and exports" in the IS statement.

BREAKING: Protoctist.IO is now Protoctist.Formats.

After the change `f(x::IO) = 1` works and IO === Base.IO. Pkg.test()
on Julia 1.11.7: Aqua 11, behaviour 109.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZnB2Fzqf8br8DGDD4k
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 14, 2026 19:43
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T19:43:45.867552Z eac4b1d Draft marked ready
🔒 Security Review ✅ Completed 2026-11-14T19:45:01.529647Z eac4b1d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@hyperpolymath
hyperpolymath merged commit 5ed5875 into main Nov 14, 2026
59 of 61 checks passed
@hyperpolymath
hyperpolymath deleted the marina/jolly-volta-lkmb1k branch November 14, 2026 19:43
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.

3 participants