SDK-style deploy/debug: selected-device + checksum pre-check + pluggable engine-binding seam - #929
SDK-style deploy/debug: selected-device + checksum pre-check + pluggable engine-binding seam#929danielmeza wants to merge 25 commits into
Conversation
…checksum-only Two fixes proven out in the SDK-style debugging POC, ported clean onto move-to-sdk (without the POC's [BP-DIAG] diagnostics or the larger INanoDebugEngineBinding device-selection refactor): DeployProvider - Deploy to deviceExplorer.SelectedDevice (the same source the debug launcher resolves from) instead of the global NanoDeviceCommService.Device, so deploy and debug always agree on the target when more than one device is connected. SelectedDevice is already guaranteed non-null by the guard earlier in the method; the ?? fallback preserves prior single-device behavior. - Relax CheckNativeAssembliesAvailability to a checksum-only match. The nativeMethodsChecksum is the native ABI fingerprint (minor field bumps with the ABI, so the checksum moves with it); the 4-part native version is a cosmetic label. Matching the checksum alone means the ABI is identical and the assembly is deployable even when build/revision differ. Mirrors the on-device resolver CLR_RT_TypeSystem::FindAssembly, which compares only major.minor. Confirmed: device flashes and runs with this relaxation. NanoDebuggerLaunchProvider - PortName now follows deployDeviceName (the device chosen for this launch) rather than the global NanoDeviceCommService.Device, so the per-device Run-dropdown selector targets the chosen device. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Per the migration plan, decouple *which Visual Studio debugger API* drives a session from *how nanoFramework launches and talks to the device*, so a future engine can be swapped in without touching the launch/deploy/project-system layers above it or the nf-debugger wire-protocol client below it. - INanoDebugEngineBinding: the seam. Exposes EngineId, EngineGuid, PortSupplierGuid and CreateLaunchSettings(launchOptions, device, peFilesToLoad, project). The three concerns NanoDebuggerLaunchProvider used to hard-code (CorDebug.EngineGuid, DebugPortSupplier.PortSupplierGuid, CorDebugProcess) now live behind it. - Ad7CorDebugEngineBinding: today's implementation — a faithful extraction of the existing custom AD7 / CorDebug launch, no behavior change. PortName follows the device chosen for this launch (the per-device Run-dropdown selector needs it). - ConcordEngineBinding: compiling placeholder that proves the swap point and MEF wiring (exported alongside AD7, selectable by EngineId = "Concord"); members throw NotImplementedException until the engine is built. Modeled on the Concord Iris sample. - NanoDebuggerLaunchProvider: now an engine-agnostic orchestrator. [ImportMany]s the bindings, resolves the active one in ResolveEngineBinding() (defaults to AD7; NANOFRAMEWORK_DEBUG_ENGINE selects another), crawls the PE files to load via the shared ReferenceCrawler in CollectPeFilesToLoadAsync(), and delegates the engine-specific launch settings to the binding. This is the single point a future AD7 -> Concord swap flips. The PortName=selected-device fix from the previous commit now lives in Ad7CorDebugEngineBinding. Builds clean (VisualStudio.Extension-vs2022, Debug). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…th implemented status Move the full SDK-style project-system migration plan from the standalone POC branch (poc/sdk-style-debugging) into this repo on move-to-sdk so it travels with the code it describes, and update it to match what's now implemented. Layout under docs/plans/sdk-style-projects/: - Design spec set (00-overview .. 10-tooling-specs), README index, the NanoMigrate converter, the home issue/chore bodies, and supporting analysis. - EXECUTION-PLAN.md promoted to the plan top level as the live tracker. - poc-findings/ holds the executed-POC evidence: RESULTS.md, DEBUGGING-LOG.md, DEVICE-RUN-DROPDOWN.md. Reconciled with reality (the enablers are no longer pending — they're commits): - EXECUTION-PLAN.md: A1-A4 (SDK) and B1-B3 + WS3 engine-binding seam (extension) marked done with their move-to-sdk commit SHAs; v2/NFMRK2 + DebugType=full "open questions" marked resolved; PR step called out as the remaining work. - README.md: added an "implemented & pushed" callout and listed EXECUTION-PLAN.md as the live tracker. Links fixed for the new home: relative findings links repointed to poc-findings/; the RESULTS.md reference to the standalone build-and-verify.sh repointed to a poc-branch permalink. The home issue/chore GitHub permalinks (pinned to b8c2ede) are intentionally preserved for copy-paste into nanoFramework/Home. All relative markdown links validated. The standalone POC harness (poc-sdk-style/ prototype SDK, samples, tools, build scripts) stays on poc/sdk-style-debugging — it's superseded by the real nanoFramework.Sdk repo. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The POC branch is deleted (local + origin); only move-to-sdk remains. Its commit is preserved at tag poc-sdk-style-archive so the b8c2ede permalinks used by the public Home#1784 issue keep resolving. Repointed all plan references from the branch to the tag. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: nanoframework/coderabbit/.coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…upgrader Capture the org-wide pull-request template (nanoframework/.github) and the conventions for opening PRs (GitFlow base, issue links to Home, draft policy, slot-filling). The fleet upgrader (07 §7.7) must render every auto-created lib-* PR from this template rather than a bespoke body. Referenced from README + EXECUTION-PLAN PR strategy. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…tyle Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…tracker - 09-implementation-strategy.md Phase 1: add the Samples-update work item. - phase-1-execution.md (new): per-repo Phase 1 readiness, the samples conversion pilot (BlinkLed + Button built to NFMRK2 against the official SDK), the dev-local build harness, and remaining Phase 1 work. Linked from README. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…erences The NanoMigrate converter now lives in the SDK repo (tools/NanoMigrate) where it belongs, not under the plan docs. Remove it from docs/plans/sdk-style-projects/NanoMigrate and repoint every reference (README, 07-library-migration, PR-INSTRUCTIONS, phase-1-execution, migration-rules, SKILL) to the SDK repo location; also fix the stale scripts/NanoMigrate paths to tools/NanoMigrate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…he Phase 1 tracker Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…+ test-first Add a dotnet nano migrate verb (05 §5.1/§5.3 + new §5.7) surfacing the NanoMigrate converter that ships in the SDK repo tools/NanoMigrate: idempotent + reentrant, --glob filtering, and a dry-run-a-directory-first-then-full workflow. Update 10-tooling-specs C6 (migrate verb) and C8 (converter location + dotnet nano migrate). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…grate.py mention The migration skill is now a proper text skill at nanoFramework.Sdk/skills/nanoframework-sdk-migration (binary .skill + nano-migrate.py removed). Update the plan README Tooling note and add a pointer at the top of the plan's SKILL.md to the canonical installable skill. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…xternal prebuilt tools) Design for the single dotnet nano CLI that ships with the SDK: a Spectre.Console.Cli host with built-in managed commands (migrate -> NanoMigrate.Core library, deploy/monitor/devices) and an IExternalTool model to deploy/wrap prebuilt external tools from other repos (e.g. nanoff), pinned via a tool manifest. Documents the engine-as-library + repo layout (NanoMigrate.Core/.Cli/.Tests) that the upcoming refactor + tests + NuGet packaging follow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ow-ups Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…dmap Record the three opened/cross-referenced draft PRs and the land order (SDK -> publish -> extension -> samples), and lay out the next steps per the impl plan (templates, VS Code dotnet build, CoreLibrary adoption, lib-* pilot exit gate, Phase 4 fleet) plus the gated items (samples v2 bump, nanoff download). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…osis Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…n PR text Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…jects under tools/
Point nano-tool.md, 07-library-migration.md, and the skill narrative at the as-built tools/nano/README.md and tools/migrate/README.md in the SDK repo as the source of truth, keeping the plan docs as design narrative.
Add a C1-C11 + developer-loop coverage matrix to EXECUTION-PLAN.md so every doc 00-10 deliverable maps to done/tracked/missing, and capture the untracked items (C4 checksum gate, NanoDeploy task/target, dotnet watch, device selection, CI fast-fail, fleet CI rewriter, auto-PR renderer) as paste-ready nanoFramework/Home backlog stubs under epic Home#1784.
…them Filed the seven untracked docs-00-10 deliverables as child issues of epic Home#1784 (checksum gate, deploy task/target+verbs, watch, device selection, CI fast-fail, fleet CI rewriter, auto-PR renderer). Annotate the coverage matrix rows with their issue numbers, turn the backlog file into a filed-issue index, and list the children in the chore epic doc.
…s-reference File the larger spec deliverables and infrastructure that lacked a tracking issue: VS Code dotnet build switch, SDK repo CI/CD, dotnet new templates, the lib-* Phase 1 pilot, the fleet campaign, CoreLibrary adoption, the workload manifest, the nanoff downloader, and Samples v2 alignment. Annotate the coverage matrix (incl. a new CI/CD row), the deferred items, the backlog index, and the chore epic with their numbers.
josesimoes
left a comment
There was a problem hiding this comment.
We prefer atomic commits. This one is 4 parts! 😅
Please:
- Move docs to https://github.com/nanoframework/nanoframework.github.io (add new folder docs/plans/sdk-style-projects)
- Breaking change on checksum has to be evaluated/discussed and whatever comes out of it, will be on its own PR.
- Extract the fix for the selected device handling on its own PR. OK to submit against main branch as this a general fix.
- Leave this PR for engine-binding seam only.
Description
nativeMethodsChecksumis the native ABI fingerprint while the four-part native version is a cosmetic label; this mirrors the on-device resolverCLR_RT_TypeSystem::FindAssembly, which compares only major.minor.PortNamefollow the chosen device, so deploy and debug agree on the target when more than one device is connected.INanoDebugEngineBindingseam withAd7CorDebugEngineBinding(today's AD7/CorDebug engine, extracted without behaviour change) and a compilingConcordEngineBindingstub, and refactorNanoDebuggerLaunchProviderto resolve the active binding, so a future engine can be swapped without touching the launch, deploy, or project-system layers.Motivation and Context
How Has This Been Tested?
VisualStudio.Extension-vs2022in Debug with no compiler errors.Types of changes
Checklist: