[src] Fix numerous API typos and improve the introspection typo test. Fixes #25397.#25706
Conversation
Fix real typos in API names by introducing correctly-spelled alternatives and deprecating the old misspelled names. For binding methods/properties, the old name keeps [Export] to preserve virtual dispatch (no breaking API changes), and the new name uses [Wrap]. In XAMCORE_5_0 only the correctly spelled name will remain with [Export]. For enum values, the old value is [Obsolete] with [EditorBrowsable(Never)] and will be removed in XAMCORE_5_0. Fixed typos include: - StandarizePath → StandardizePath (NSString) - ReplaceOcurrences → ReplaceOccurrences (NSMutableString) - DequeueNotificationsMatchingcoalesceMask → DequeueNotificationsMatchingCoalesceMask - SkipDescendents → SkipDescendants (NSDirectoryEnumerator) - SetParamDescriptorforKeyword → SetParamDescriptorForKeyword - SetAttributeDescriptorforKeyword → SetAttributeDescriptorForKeyword - InsertDescriptoratIndex → InsertDescriptorAtIndex - SetDescriptorforKeyword → SetDescriptorForKeyword - WilllDownloadToUrl → WillDownloadToUrl (AVAssetDownloadDelegate) - DenimonatorExpression → DenominatorExpression (AXNumericDataAxisDescriptor) - GpsDifferental → GpsDifferential (CSSearchableItemAttributeSet) - ExhangeDataMaximumSize → ExchangeDataMaximumSize (GKTurnBasedMatch) - RightCallpoutOffset → RightCalloutOffset (MKAnnotationView) - RoundToOddHermitean → RoundToOddHermitian (MPSGraphResizeMode) - SetImageforSearchBarIcon → SetImageForSearchBarIcon (UISearchBar) - SetPositionAdjustmentforSearchBarIcon → SetPositionAdjustmentForSearchBarIcon - GetNumberofItems → GetNumberOfItems (NSCollectionViewDataSource) - TitleWidthConstraintedToSize → TitleWidthConstrainedToSize (NSToolbarItem) - IndexOfItemWithTargetandAction → IndexOfItemWithTargetAndAction - TryToPerformwith → TryToPerformWith (NSResponder) - ConvertRectfromBacking → ConvertRectFromBacking (NSView) - UpdateSpellingPanelWithGrammarl → UpdateSpellingPanelWithGrammarString - SetIconforFile → SetIconForFile (NSWorkspace) - SetAttributesforExportedKey → SetAttributesForExportedKey (CIFilter) - CommitedLoad → CommittedLoad (WebResourceLoadDelegate, XAMCORE_5_0 only) - ExifSubsecTimeOrginal → ExifSubsecTimeOriginal (CGImageProperties) - WarichuPunctiation → WarichuPunctuation (CTCharacterCollection) - Various enum value fixes in AudioUnit, CoreGraphics, CoreLocation, CoreWlan, HomeKit, MLCompute, PrintCore, Darwin, and ImageKit Also rewrite the introspection TypoTest to use a word-level dedup approach that is faster and more reliable than the previous full-name spell checking. Document all remaining allowed typos with comments explaining why they are valid (brand names, abbreviations, technical terms, etc.). Fixes #25397 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ristic, Directionfor, Emebedding - SortedArrayFromArraycollationStringSelector → SortedArrayFromArrayCollationStringSelector (UILocalizedIndexedCollation) - ReplacementValueForAttributevalue → ReplacementValueForAttributeValue (NSMetadataQueryDelegate, XAMCORE_5_0 only) - UpdatedCharacterteristicValue → UpdatedCharacteristicValue (CBPeripheralDelegate, XAMCORE_5_0 only) - NLContextualEmebeddingKey → NLContextualEmbeddingKey (XAMCORE_5_0 only) - SetBaseWritingDirectionforRange already fixed, wrap allowed entry with #if !XAMCORE_5_0 For delegate methods with [EventArgs], only XAMCORE_5_0 rename is possible (no Wrap pattern). For the enum type rename, only XAMCORE_5_0 rename is possible. Also add comments to Formati, ks, ove explaining why they're not typos. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
This PR fixes a set of spelling/casing typos in the public API surface (bindings + a few manual APIs) by introducing correctly-spelled alternatives and deprecating the misspelled names, and it re-enables/updates the introspection typo test to be more reliable.
Changes:
- Add correctly-spelled API members (methods/properties/enum values) while keeping old misspelled members as
[Obsolete](and conditionally removing them inXAMCORE_5_0). - Rewrite
ApiTypoTest.TypoTestto deduplicate and spell-check at the word level, and expand/document the allowed-word list. - Update unit tests and documentation-known-failure baselines to match the new public API names.
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/monotouch-test/CoreGraphics/PdfTagTypeTest.cs | Update test to validate the corrected CGPdfTagType enum value name. |
| tests/introspection/ApiTypoTest.cs | Rewrite typo detection logic + expand allowed words list and enable the test. |
| tests/cecil-tests/Documentation.KnownFailures.txt | Update known-failure entries to reflect renamed APIs. |
| src/webkit.cs | Fix CommitedLoad typo under XAMCORE_5_0. |
| src/uikit.cs | Add corrected binding method/property names with [Wrap] + obsolete aliases. |
| src/PrintCore/Defs.cs | Fix PluginRegisterationFailed enum value typo with obsolete alias. |
| src/Network/NWConnectionGroup.cs | Fix GetRemmoteEndpoint typo with obsolete forwarding wrapper. |
| src/NaturalLanguage/Enums.cs | Rename misspelled enum type under XAMCORE_5_0. |
| src/mlcompute.cs | Fix Inot32 enum value typo with obsolete alias. |
| src/metalperformanceshadersgraph.cs | Fix RoundToOddHermitean property typo with wrap + obsolete alias. |
| src/mapkit.cs | Fix RightCallpoutOffset typo with wrap + obsolete alias (macOS-only API). |
| src/imagekit.cs | Fix ExportSlideshowItemtoApplication typo with corrected API + obsolete alias. |
| src/imageio.cs | Add corrected Exif/GPS key properties and obsolete misspelled aliases. |
| src/HomeKit/HMEnums.cs | Fix NotSignedIntoiCloud enum value typo with obsolete alias. |
| src/gamekit.cs | Fix ExhangeDataMaximumSize typo with wrap + obsolete alias. |
| src/Foundation/NSUrlCredential.cs | Fix misspelled factory name by introducing Create + obsolete wrapper. |
| src/Foundation/NSMetadataItem.cs | Add corrected GpsDifferential property + obsolete wrapper. |
| src/foundation.cs | Fix multiple binding method/property typos with wrap + obsolete aliases and some XAMCORE_5_0 renames. |
| src/Darwin/KernelNotification.cs | Fix ProcAppactive enum value typo with obsolete alias. |
| src/CoreWlan/Enums.cs | Fix FourtyMHz enum value typo with obsolete alias. |
| src/CoreVideo/CVBuffer.cs | Fix PropogateAttachments typo with obsolete wrapper. |
| src/corespotlight.cs | Fix GpsDifferental property typo with wrap + obsolete alias. |
| src/CoreLocation/CLEnums.cs | Fix typo in XML doc cref (AccurracyBestForNavigation → AccuracyBestForNavigation). |
| src/coreimage.cs | Fix SetAttributesforExportedKey typo with wrap + obsolete alias. |
| src/CoreGraphics/CGEventSource.cs | Fix “Supression” typos in method/property names with obsolete wrappers. |
| src/CoreGraphics/CGEnums.cs | Fix WarichuPunctiation enum value typo with obsolete alias. |
| src/corebluetooth.cs | Fix delegate method typo under XAMCORE_5_0. |
| src/avfoundation.cs | Fix WilllDownloadToUrl typo with wrap + obsolete alias. |
| src/authenticationservices.cs | Fix RegisterDefaultsForAswas… typo with corrected API + obsolete alias. |
| src/AudioUnit/AUEnums.cs | Fix OcclussionAttenuation enum value typo with obsolete alias. |
| src/AppKit/Enums.cs | Fix enum value typos with obsolete aliases. |
| src/appkit.cs | Fix multiple AppKit binding typos with wrap + obsolete aliases. |
| src/accessibility.cs | Fix DenimonatorExpression typo with wrap + obsolete alias. |
…d import, wrap Commited with #if !XAMCORE_5_0 - Add [EditorBrowsable(Never)] to WarichuPunctiation, AvailableLangauges, ExportSlideshowItemtoApplication, RegisterDefaultsForAswasInSetupAssistantIfNeeded, FromUserPasswordPersistance - Remove unused System.Diagnostics import from ApiTypoTest.cs - Wrap 'Commited' allowed entry with #if !XAMCORE_5_0 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
✅ [PR Build #85c51db] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #85c51db] Build passed (Build packages) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [PR Build #85c51db] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #85c51db] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 193 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Fix real typos in API names by introducing correctly-spelled alternatives and deprecating the old misspelled names.
Approach
For binding methods/properties, the old name keeps
[Export]to preserve virtual dispatch (no breaking API changes), and the new name uses[Wrap]. InXAMCORE_5_0only the correctly spelled name will remain with[Export].For enum values, the old value is
[Obsolete]with[EditorBrowsable(Never)]and will be removed inXAMCORE_5_0.For delegate methods with
[EventArgs], only a#if XAMCORE_5_0rename is possible (the binding generator requires EventArgs on all delegate methods).For manual code (non-generated), the correctly-spelled method is the implementation; the old misspelled name is a thin wrapper marked
[Obsolete].Fixed typos
Other changes
TypoTestto use a word-level dedup approach (faster and more reliable)XAMCORE_5_0with#if !XAMCORE_5_0in the allowed listFixes #25397
🤖 Pull request created by Copilot