refactor: clarify plugin API names with deprecated compatibility aliases - #15
Merged
Merged
Conversation
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.
Summary
The plugin protocol is named
NectoPluginable, whileNectoHandlercollects handler registrations rather than handling requests itself. Rename them toNectoPluginandNectoRegistrar, rename the cancellation message toNectoPluginCancellation, and pair captureinstall(reporting:)withuninstall().Keep all four old public entry points as deprecated aliases or a forwarding method, with rename diagnostics. Update every adopter, the device-plugin generator template, and English/Korean documentation. An external SDK consumer fixture checks legacy protocol conformance,
NectoHandler.Out, both capture entry points, and the unchanged cancellation JSON shape. JSON keys,plugin.cancel, and manifest schemas are unchanged; no removal version is scheduled for the compatibility aliases.Also normalize four internal identifiers to American spelling: the settings-row property, the design-gallery parameter, and two test names. Correct the capture comment's
pluginreference toreporter.Rechecked against main
0650f1b, including the newly added Control plugin and renamed built-in plugins. The previous review'sDefaultEventsPluginobservation is obsolete; it is alreadyNectoEventsPlugin. The gallery parameter was an additional spelling occurrence missing from that review.Changelog
Clarify plugin SDK names while retaining deprecated source-compatible names for existing adopters.
Test Plan
script/test swift: 160 root tests, 267 Mac tests, and 2 external SDK consumer tests passed. All four legacy API names emit the expected rename warnings.script/test web: type checks, 29 Vitest tests, 13 generator tests, and panel asset checks passed.node --test script/tests/create-plugin.test.mjs: 12 passed.yarn docs:buildandnode --check docs/design/gallery.js: passed.script/build: web packages, both Swift packages, and the macOS app built successfully. Its simulator selection parsed the parenthesized device name as an ID, so the ExampleApp step failed before building. Re-runningxcodebuild -project Necto.xcodeproj -scheme ExampleApp -configuration Debug -destination 'id=ADCDB781-969E-4B62-8520-D1C3EB6DCE4B' -derivedDataPath Build buildsucceeded. The macOS app was launched and its process remained running./tmpand runningxcodebuild -project Necto.xcodeproj -scheme NectoAppTests -destination "platform=macOS,arch=arm64" -derivedDataPath Build/Tests testthere. The initialscript/test nativecould not load its test bundle under Documents; moving only build output exposed fixture read permission errors. Relocating both source fixtures and build output resolved these local access failures without source changes.git diff --check: passed. Old type names remain only in compatibility declarations and the explicit legacy-consumer fixture.Environment: Xcode 26.0.1, macOS 26.6.2, iOS 26.0 simulator. Simulator E2E and physical USB testing were not run. App launch is a smoke check, not a visual or end-to-end connection check.