Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change panics when parsing a malformed dmi to return a Result instead #319

Merged
merged 2 commits into from
May 18, 2022

Conversation

moxian
Copy link
Contributor

@moxian moxian commented May 15, 2022

Currently parsing a malformed - but also well-formed, yet ancient - .dmi files results in a panic deep within the guts of SapacemanDMM. That's undesirable, since .dmi's which SpacemanDMM does not understand (yet BYOND dreammaker handles fine) do exist in the wild (see ParadiseSS13/Paradise#17800 for a couple of examples).

I don't think teaching SpacemanDMM of the legacy file formats is worth it, but making it return a Result instead of outright panicking definitely is (and it's much less work than the former).

This is technically a breaking change since it changes the signature of the public dreammaker::dmi::Metadata::meta_from_str(). (But it's probably rarely used, and definitely easy to fix at the call site?..)

@SpaceManiac SpaceManiac merged commit 860d6c4 into SpaceManiac:master May 18, 2022
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.

2 participants