-
Notifications
You must be signed in to change notification settings - Fork 42
docs: document the built-in platform folder aliases - #137
Merged
Merged
Conversation
RomM now resolves the folder names Batocera, RetroBat and ES-DE use without a system.platforms binding, and matches folder names case-insensitively. The docs still told readers every folder had to be named after a slug, and two of the remap examples were stale: gc is an alias now, and "ps" was never a PlayStation slug. Add a Folder name aliases section to Supported Platforms covering the resolution order and the folders that collapse onto one platform, and point Folder Structure, Custom Platforms, the FAQ, troubleshooting and the glossary at it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0172ovkiqiK6JgEYCmi3uqe2
A folder name that already is a slug matches itself before the alias table is consulted, so a frontend meaning something else by that name still needs a binding. ES-DE and Batocera use atari800/ for the whole Atari 8-bit family, while atari800 is the Atari 800 alone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0172ovkiqiK6JgEYCmi3uqe2
gantoine
gantoine
requested changes
Sep 11, 2026
Drop the numbered-step cross-references and the bulleted "things to know" scaffolding, and say each fact once. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0172ovkiqiK6JgEYCmi3uqe2
The hand-picked sample would drift every time the alias table changed upstream. Generate the full table instead, and regenerate it on the release bump alongside the platform table. The generator parses platform_aliases.py and platform_slugs.py with ast rather than importing them, so unlike gen_platforms it needs no romm checkout and runs anywhere. Folder names sharing a target are grouped onto one row, which keeps the many-to-one mappings visible. The pinned ref predates the alias table, so the committed snippet is seeded with --ref master; the next bump regenerates it from the pin. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0172ovkiqiK6JgEYCmi3uqe2
Exiting non-zero failed the whole regenerate step, so a ref without an alias table would have cost the release bump its env-var and scheduled-task updates too, which is the staleness this workflow exists to prevent. Keep the committed table and warn instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0172ovkiqiK6JgEYCmi3uqe2
gantoine
gantoine
approved these changes
Sep 11, 2026
gantoine
added a commit
that referenced
this pull request
Sep 11, 2026
The platform folder-alias work on main (#137) overlapped `system.platforms` in the config reference. Main's version documents the whole resolution order and links the generated alias table, which supersedes the one-line Batocera/RetroBat/ES-DE note this branch added, so the conflict is resolved in its favour. Scanning & Watcher's platform-folder section is repointed at that alias table for the same reason. Regenerating all four snippets at this branch's pin reproduces the merged files exactly, so the alias table needs no bump. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
Description
Follows the platform slug work in
rommapp/romm(unreleased, lands with the next tag). RomM now:megadrive/,gamecube/,n3ds/,mame/,easyrpg/, ...) with nosystem.platformsbinding,rpg-makerplatform for theeasyrpg/folder those frontends all carry.The docs still told readers every platform folder has to be named after a slug, which is now wrong in the common case, and two of the remap examples were stale:
gcis a built-in alias (sogc: "ngc"changes nothing), andpsx: "ps"pointed atps, which has never been a RomM slug (the PlayStation slug ispsx, andps/is now an alias for it).What changed
platforms/supported-platforms.md: new Folder name aliases section, carrying a generated table plus the two caveats that bite — a binding always overrides an alias, and a folder name that is itself a slug never reaches the alias table.reference/configuration-file.md(system.platforms): reframed as "for folders RomM doesn't recognise or gets wrong", documented the case-insensitive matching and the binding → slug → alias order, replaced the two stale examples.getting-started/folder-structure.md,platforms/custom-platforms.md,about/faqs.md,troubleshooting/index.md,reference/glossary.md: pointed at the new section,ps→psxin the glossary.scripts/gen_platform_aliases.py+docs/resources/snippets/platform-aliases.md+romm-release-bump.yml: the alias table is generated and regenerates on the release bump, per review.The generator
gen_platform_aliases.pyfetchesplatform_aliases.pyandplatform_slugs.pyfrom the pinned ref and parses them withast, rather than shelling out to a romm-side script the waygen_platforms.pydoes. The alias table is a plain dict literal, so nothing needs importing, which means no romm checkout, no romm-side script and no cross-repo sequencing. It runs on bare stdlib. Output is 138 folder names over 103 platforms, grouped so folders sharing a target sit on one row and the many-to-one mappings stay visible.The pin is
5.2.0, which predates the alias table, so the committed snippet was seeded with--ref master; the next bump regenerates it from the pin. Against a ref without the file the generator warns, leaves the committed table untouched and exits 0 — a missing alias table costs the alias table, not the whole bump PR (see the review thread; the earlier exit-1 behaviour would have taken the env-var and scheduled-task updates down with it).Separately, and not fixed here:
gen_platformscan't currently run inromm-release-bump.yml, because it needsROMM_SRCand that job neither checks romm out nor sets it. Worth noting the workflow's 11 green runs all took thechanged=falseno-op path, so the regenerate step has never actually executed — this fires on the first real release bump. Flagged in the review thread; happy to fix in its own PR.The
atari800caseResolution checks the slug list before the alias table, so a folder name that already is a slug never reaches the aliases. ES-DE and Batocera use
atari800/for the whole Atari 8-bit family, butatari800is RomM's slug for the Atari 800 alone, so it still needs an explicit binding. Both shipped example configs carry it.Checks
uv run mkdocs build --strictclean; the#folder-name-aliasesanchor, its 7 inbound links, and the included snippet all verified in the built HTMLuv run python -m scripts.check_redirects— all 46 targets exist5.2.0it warns and leaves the snippet byte-identical; against a ref carrying the table its output matches the committed snippet byte-for-bytearcadefolders matchPLATFORM_FS_ALIASESexactlyNote on timing
This documents behaviour that is on
masterbut not in a released tag yet. Merging now follows thefilesystem.structureprecedent (documented here Sep 10, feature landed Sep 8); happy to hold it until the next release instead if you'd rather the site only describe shipped versions.AI assistance disclosure
Written with Claude Code. The alias table, resolution order, slug values and folder-name claims were each checked against
backend/utils/platform_aliases.pyandbackend/utils/platform_slugs.py; a human should still review the wording.Companion example-config tweak: rommapp/romm#4461 (merged).
🤖 Generated with Claude Code
https://claude.ai/code/session_0172ovkiqiK6JgEYCmi3uqe2