fix(modtool): a folder mod named with punctuation imports instead of being refused #3112
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3112
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/mod-slug-punctuation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adding a folder mod (a
romfs/orexefs/folder with nomod.toml) fails when its name has punctuation next to a space. A player'sFierce Deity Armor + Reskinsgave:The importer wrote one
-for each character an id does not take, and the manifest check refuses two of._-together, so it refused themod.tomlit had just made.slug()ingame/crates/modtool/src/import.rsnow writes one separator per run and puts none at either end, also after the 64-byte cut. Every slug that was accepted before comes out the same.To see it on
main:longshot-builder mod importof a folder with that name and aromfs/in it.Workaround for players until this is released: rename the folder to letters, numbers and single spaces.
The Launcher has its own copy of this rule; its fix is a separate pull request in LongshotLauncher.
Testing
Tested: Linux (CachyOS), game-free.
cargo test -p modtool: 257 passed, 2 ignored.longshot-builder mod importof a made-upFierce Deity Armor + Reskins/romfs/a.binaddedlocal/fierce-deity-armor-reskins, exit 0.mise run test: 875 passed, 12 skipped, 3 failed (test_utf8_paths.py,test_run_all_junit.py,test_lifter.py). The failure read intest_lifter.pyis inbuild-corelint, formatting and abuild-drivertest, none of which this changes. Not yet confirmed onmain: that run is queued.Still to test:
Measurements
Nothing to time: this only changes the id made once when a mod is imported.
76092c5e3d10b73fFierce Deity Armor + Reskinslocal/fierce-deity-armor-reskinsRisks
Two folders whose names differ only in punctuation (
A + B,A B) now get the same id; before, one of them could not be imported at all. Mods already imported keep their ids. A revert is enough.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (maincomparison still queued.)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
WIP: fix(modtool): a folder mod named with punctuation imports instead of being refusedto fix(modtool): a folder mod named with punctuation imports instead of being refusedllun referenced this pull request2026-12-03 21:42:52 +00:00