From 1eec968dbd5a58da5ec51011b619065e07c24500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Tue, 12 Mar 2019 14:19:31 +0000 Subject: [PATCH 1/2] Work on DeploymentExecuteIncremental - Improve output messages. - Add missing code to report failure on retrieving device flash map. --- .../WireProtocol/Engine.cs | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/source/nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Engine.cs b/source/nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Engine.cs index d9515ef2..208d7612 100644 --- a/source/nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Engine.cs +++ b/source/nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Engine.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) 2017 The nanoFramework project contributors // Portions Copyright (c) Microsoft Corporation. All rights reserved. // See LICENSE file in the project root for full license information. @@ -2697,7 +2697,7 @@ private bool DeploymentExecuteIncremental(List assemblies, IProgress b.Size) < deployLength) { // compose error message - string errorMessage = $"Deployment storage (total size: {deploymentBlob.ToDeploymentBlockList().Sum(b => b.Size)} bytes) was not large enough to fit assemblies to deploy (total size: {deployLength} bytes)"; + string errorMessage = $"Deployment storage (available size: {deploymentBlob.ToDeploymentBlockList().Sum(b => b.Size)} bytes) is not large enough for assemblies to deploy (total size: {deployLength} bytes)."; progress?.Report(errorMessage); @@ -2755,7 +2755,7 @@ private bool DeploymentExecuteIncremental(List assemblies, IProgress assemblies, IProgress assemblies, IProgress b.Size)} bytes"); + progress?.Report($"Deployed assemblies with a total size of {blocksToDeploy.Sum(b => b.Size)} bytes."); } // deployment successful @@ -2793,7 +2793,10 @@ private bool DeploymentExecuteIncremental(List assemblies, IProgress assemblies, bool fRebootAfterDeploy = if (Capabilities.IncrementalDeployment) { - progress?.Report("Incrementally deploying assemblies to device"); + progress?.Report("Incrementally deploying assemblies to the device"); fDeployedOK = DeploymentExecuteIncremental(assemblies, progress); } @@ -2900,11 +2903,11 @@ public bool DeploymentExecute(List assemblies, bool fRebootAfterDeploy = if (!fDeployedOK) { - progress?.Report("Assemblies not successfully deployed to device."); + progress?.Report("Error deploying assemblies to the device."); } else { - progress?.Report("Assemblies successfully deployed to device."); + progress?.Report("Assemblies successfully deployed to the device."); if (fRebootAfterDeploy) { @@ -3733,5 +3736,5 @@ private DeviceConfiguration.DeviceConfigurationOption GetDeviceConfigurationOpti #endregion -} + } } From bf09d2f715fa67e247d5e44598e82750370f474a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Tue, 12 Mar 2019 15:48:28 +0000 Subject: [PATCH 2/2] Update Engine.cs --- .../WireProtocol/Engine.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Engine.cs b/source/nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Engine.cs index 208d7612..bd287c24 100644 --- a/source/nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Engine.cs +++ b/source/nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Engine.cs @@ -2796,8 +2796,6 @@ private bool DeploymentExecuteIncremental(List assemblies, IProgress assemblies, IProgress progress)