Skip to content

Fix: Re-exports XpFile, XpLayer, and XpCell #105

Closed
mors119 wants to merge 0 commit into
utilForever:mainfrom
mors119:main
Closed

Fix: Re-exports XpFile, XpLayer, and XpCell #105
mors119 wants to merge 0 commit into
utilForever:mainfrom
mors119:main

Conversation

@mors119
Copy link
Copy Markdown

@mors119 mors119 commented May 25, 2026

##What
Re-exports XpFile, XpLayer, and XpCell from bracket-terminal::rex, restoring their availability through the existing bracket-lib and rltk facade chain.

##Why
rltk examples already rely on these RexPaint types being reachable through the facade path. Restoring the bracket-terminal::rex export point matches that existing structure while avoiding a broader bracket-rex prelude re-export that could introduce conflicts such as XpColor.

No related issue.

Checklist

Required

  • cargo check --all passes
  • cargo fmt --all -- --check passes
  • cargo clippy --workspace --all-targets -- -D warnings -A clippy::multiple-crate-versions passes
  • cargo test --all passes
  • I linked the related issue (for example: Closes #123)

Functional Validation

  • Behavior related to this change was verified locally (if applicable)
  • Rendering/backend behavior was verified when runtime code changed (if applicable)
  • Algorithm behavior (pathfinding/FOV/noise/random) was verified when affected (if applicable)
  • I added or updated tests for changed behavior (if applicable)

Configuration & Docs

  • User-facing docs were updated (README.md, ARCHITECTURE.md, or relevant manual pages, if applicable)
  • New dependencies/configuration are documented (if applicable)
  • No sensitive values or credentials were introduced

If Applicable

  • Security impact considered (run cargo audit locally if needed)
  • Breaking behavior changes are clearly described in this PR

Summary by CodeRabbit

  • Chores
    • Updated public API exports to expose additional types for developer use.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

📝 Walkthrough

Walkthrough

This change expands the public API of the rex module by re-exporting XpCell, XpFile, and XpLayer from bracket_rex::prelude instead of privately importing only XpFile. This makes three related types publicly available to downstream consumers.

Changes

REX Module API Surface

Layer / File(s) Summary
Public REX type re-exports
bracket-terminal/src/rex.rs
Import statement changes from private use bracket_rex::prelude::XpFile; to public re-exports: pub use bracket_rex::prelude::{XpCell, XpFile, XpLayer};, expanding the module's public API surface.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

A rabbit hops with glee, 🐰
Three types now dance so free,
Public at last, they say,
API blooms today! 🌱✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: re-exporting three types (XpFile, XpLayer, XpCell) from bracket_rex::prelude in the rex.rs module.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
bracket-terminal/src/rex.rs (1)

4-4: ⚡ Quick win

Add a regression test for the new public re-exports.

This widens the public API, but there’s no accompanying test proving XpCell, XpFile, and XpLayer remain reachable through the intended facade path. Please add a small compile-level test in the relevant module (prefer colocated tests.rs for split domains).

As per coding guidelines, "Add tests for new functionality in the relevant module; for split domains, prefer colocated tests.rs".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bracket-terminal/src/rex.rs` at line 4, Add a small compile-time test to
ensure the new public re-exports (XpCell, XpFile, XpLayer) remain reachable
through the facade: create or update a colocated tests.rs (alongside rex.rs)
with a test that imports these symbols via the crate path that re-exports them
(e.g., use crate::rex::{XpCell, XpFile, XpLayer};) and performs a no-op
assertion or type check so the code fails to compile if the re-exports are
removed or renamed; ensure the test is marked #[test] (or a compile-fail style
test) and references the exact identifiers XpCell, XpFile, and XpLayer.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@bracket-terminal/src/rex.rs`:
- Line 4: Add a small compile-time test to ensure the new public re-exports
(XpCell, XpFile, XpLayer) remain reachable through the facade: create or update
a colocated tests.rs (alongside rex.rs) with a test that imports these symbols
via the crate path that re-exports them (e.g., use crate::rex::{XpCell, XpFile,
XpLayer};) and performs a no-op assertion or type check so the code fails to
compile if the re-exports are removed or renamed; ensure the test is marked
#[test] (or a compile-fail style test) and references the exact identifiers
XpCell, XpFile, and XpLayer.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 775fcaf4-2272-4568-b6f4-698e4c6fa8e7

📥 Commits

Reviewing files that changed from the base of the PR and between fe7bf77 and 52f1a58.

📒 Files selected for processing (1)
  • bracket-terminal/src/rex.rs
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.rs: Format all Rust code using cargo fmt --all
Fix all cargo clippy warnings — the CI enforces -D warnings
Add tests for new functionality in the relevant module; for split domains, prefer colocated tests.rs

Files:

  • bracket-terminal/src/rex.rs
🧬 Code graph analysis (1)
bracket-terminal/src/rex.rs (1)
bracket-rex/src/rex.rs (4)
  • XpCell (23-33)
  • XpFile (86-91)
  • XpLayer (38-45)
  • XpLayer (47-82)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant