The Markdown UTI has no hyphen - #185
Merged
Merged
Conversation
"Make Compose the default" has never worked, for anyone, on any machine.
It reported:
LaunchServices could not set the default app (OSStatus -50)
-50 is paramErr, and the invalid parameter was the content type. The
constant read `net.daring-fireball.markdown`. The system's is
`net.daringfireball.markdown` — the blog is two words, the reverse-DNS
identifier is not. The hyphenated form is not a UTI that has ever
existed, so LaunchServices was being asked to set a default handler for
nothing.
Confirmed against the real API rather than by reading:
net.daring-fireball.markdown -> OSStatus -50
net.daringfireball.markdown -> OSStatus 0
The failure was well disguised. The error surfaced only a number; the
code's own comment anticipated -10814 ("app unknown to LaunchServices"),
so the remedy it offered was Finder — which would have failed too, being
the same lookup. And this machine had four dead registrations for the
bundle id, including a corrupt 12KB husk in /Applications, which looked
like cause and was coincidence.
The test asserts the constant names a UTI the system declares. That is
the property no other check could see: it compiles, it typechecks, it
reads plausibly, and it is wrong only at runtime. Verified to fail
against the old spelling before being kept —
net.daring-fireball.markdown is not declared on this system
Found while verifying the alpha.13 build before publishing it.
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.
"Make Compose the default" has never worked — for anyone, on any machine. It reported:
-50isparamErr, and the invalid parameter was the content type:The system's is
net.daringfireball.markdown. The blog is two words; the reverse-DNS identifier is not. LaunchServices was being asked to set a default handler for a UTI that has never existed.Confirmed against the real API, not by reading
and after the successful call,
LSCopyDefaultRoleHandlerForContentTypereturnsai.latentic.compose.Why it hid so well
-10814("app unknown to LaunchServices") — a different failure entirely.ai.latentic.compose, including a corrupt 12 KB husk at/Applications/Compose.appwith an emptyMacOS/and an unreadableInfo.plist. Cleaning all that up and installing a freshly notarized build changed nothing, which is what ruled it out.CFBundleTypeExtensionsand never declaresLSItemContentTypes, so "LaunchServices won't hand a UTI to an app that doesn't claim it" was a good theory — but the corrected UTI returns0without anyInfo.plistchange, so no bundle change is needed.The test
It asserts the constant names a UTI the system actually declares — the one property nothing else could see. It compiles, it typechecks, it reads plausibly, and it is wrong only at runtime.
Verified to fail against the old spelling before being kept:
245 Rust tests pass with the fix.
Timing
Found while verifying the alpha.13 build before publishing it — which is what that step is for. This wants to go into alpha.13 rather than trail it, so the release needs a rebuild and re-notarize after merge.