Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f9d957f
Eliminate redundant existence checks in workload resolver
mhutch Jun 3, 2021
b8ade8e
Implement workload redirects
mhutch Jun 9, 2021
a22e8d0
Fix 'avaliable' typo
mhutch Jun 9, 2021
e7a3eb2
Allow deferred opening of workload manifest stream
mhutch Jun 9, 2021
cf013d2
Add workload resolver method to determine updated workloads
mhutch Jun 9, 2021
3374ec9
Replace workload TempDirResolver with more generic OverlayResolver
mhutch Jun 10, 2021
0a8238c
Improve diagnosability of manifest conflicts
mhutch Jun 10, 2021
accd669
Improve workload composition errors
mhutch Jun 22, 2021
ed81dd4
Nullability checks in workload manifest reader tests
mhutch Jun 22, 2021
3d64056
Stronger typing of workload/pack ids in public API
mhutch Jun 22, 2021
a6cd134
Disable workload redirects for now
mhutch Jul 1, 2021
0254d95
Improve WorkloadResolver.GetPacksInWorkload
mhutch Jul 2, 2021
15d527f
Fix available workloads returned by resolver
mhutch Jul 2, 2021
619304d
Include workload ID in exception when resolver cannot find it
mhutch Jul 2, 2021
d867fef
Hide WorkloadResolver.GetPackPath in favor of ResolvePackPath
mhutch Jul 2, 2021
536f67c
When suggesting workloads, only consider available workloads
mhutch Jul 2, 2021
e4b36e3
Localize remaining workload composition errors
mhutch Jul 13, 2021
d75137c
Simplify WorkloadResolver.GetInstalledManifests
mhutch Jul 14, 2021
c9d64aa
Fix ResolvePackPath returning empty workload pack ids
mhutch Jul 15, 2021
48720b8
Check updated composition error messages in workload tests
mhutch Jul 15, 2021
0537ca7
Don't assume missing workload packs can always be satisfied
mhutch Jul 17, 2021
f4ed4c7
Fix accidental removal that broke workload search tests
mhutch Jul 19, 2021
b736168
Fix error message argument indices
dsplaisted Jul 18, 2021
4d4f3ef
Fix workload mocks to use correct manifest IDs
dsplaisted Jul 18, 2021
9f15943
Update test now that mock workload manifest has right ID
dsplaisted Jul 19, 2021
88fc6b4
Generate correct error message when trying to install a workload whic…
dsplaisted Jul 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix 'avaliable' typo
  • Loading branch information
mhutch committed Jul 17, 2021
commit a22e8d0db58d55553ebccf113fa9310cc119dd31
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
<data name="BundleUpToDateMessage" xml:space="preserve">
<value>Up to date.</value>
</data>
<data name="NewPatchAvaliableMessage" xml:space="preserve">
<data name="NewPatchAvailableMessage" xml:space="preserve">
<value>Patch {0} is available.</value>
</data>
<data name="OutOfSupportMessage" xml:space="preserve">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private string GetRuntimeStatusMessage(NetRuntimeInfo runtime)
}
else if (NewerRuntimePatchExists(runtime))
{
return string.Format(LocalizableStrings.NewPatchAvaliableMessage, NewestRuntimePatchVersion(runtime));
return string.Format(LocalizableStrings.NewPatchAvailableMessage, NewestRuntimePatchVersion(runtime));
}
else
{
Expand Down
12 changes: 6 additions & 6 deletions src/Cli/dotnet/commands/dotnet-sdk/check/SdkOutputWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ public void PrintSdkInfo()

table.PrintRows(_sdkInfo.OrderBy(sdk => sdk.Version), l => _reporter.WriteLine(l));

if (NewFeatureBandAvaliable())
if (NewFeatureBandAvailable())
{
_reporter.WriteLine();
_reporter.WriteLine(string.Format(LocalizableStrings.NewFeatureBandMessage, NewestFeatureBandAvaliable()));
_reporter.WriteLine(string.Format(LocalizableStrings.NewFeatureBandMessage, NewestFeatureBandAvailable()));
}
}

Expand All @@ -52,7 +52,7 @@ private string GetSdkStatusMessage(NetSdkInfo sdk)
}
else if (NewerSdkPatchExists(sdk))
{
return string.Format(LocalizableStrings.NewPatchAvaliableMessage, NewestSdkPatchVersion(sdk));
return string.Format(LocalizableStrings.NewPatchAvailableMessage, NewestSdkPatchVersion(sdk));
}
else
{
Expand Down Expand Up @@ -86,12 +86,12 @@ private ReleaseVersion NewestSdkPatchVersion(NetSdkInfo bundle)
}
}

private bool NewFeatureBandAvaliable()
private bool NewFeatureBandAvailable()
{
return NewestFeatureBandAvaliable() > _sdkInfo.Select(sdk => sdk.Version).Max();
return NewestFeatureBandAvailable() > _sdkInfo.Select(sdk => sdk.Version).Max();
}

private ReleaseVersion NewestFeatureBandAvaliable()
private ReleaseVersion NewestFeatureBandAvailable()
{
return _productCollection.OrderByDescending(product => product.ProductVersion).First().LatestSdkVersion;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<target state="new">Try out the newest .NET SDK features with .NET {0}.</target>
<note />
</trans-unit>
<trans-unit id="NewPatchAvaliableMessage">
<trans-unit id="NewPatchAvailableMessage">
<source>Patch {0} is available.</source>
<target state="new">Patch {0} is available.</target>
<note />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<target state="new">Try out the newest .NET SDK features with .NET {0}.</target>
<note />
</trans-unit>
<trans-unit id="NewPatchAvaliableMessage">
<trans-unit id="NewPatchAvailableMessage">
<source>Patch {0} is available.</source>
<target state="new">Patch {0} is available.</target>
<note />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<target state="new">Try out the newest .NET SDK features with .NET {0}.</target>
<note />
</trans-unit>
<trans-unit id="NewPatchAvaliableMessage">
<trans-unit id="NewPatchAvailableMessage">
<source>Patch {0} is available.</source>
<target state="new">Patch {0} is available.</target>
<note />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<target state="new">Try out the newest .NET SDK features with .NET {0}.</target>
<note />
</trans-unit>
<trans-unit id="NewPatchAvaliableMessage">
<trans-unit id="NewPatchAvailableMessage">
<source>Patch {0} is available.</source>
<target state="new">Patch {0} is available.</target>
<note />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<target state="new">Try out the newest .NET SDK features with .NET {0}.</target>
<note />
</trans-unit>
<trans-unit id="NewPatchAvaliableMessage">
<trans-unit id="NewPatchAvailableMessage">
<source>Patch {0} is available.</source>
<target state="new">Patch {0} is available.</target>
<note />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<target state="new">Try out the newest .NET SDK features with .NET {0}.</target>
<note />
</trans-unit>
<trans-unit id="NewPatchAvaliableMessage">
<trans-unit id="NewPatchAvailableMessage">
<source>Patch {0} is available.</source>
<target state="new">Patch {0} is available.</target>
<note />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<target state="new">Try out the newest .NET SDK features with .NET {0}.</target>
<note />
</trans-unit>
<trans-unit id="NewPatchAvaliableMessage">
<trans-unit id="NewPatchAvailableMessage">
<source>Patch {0} is available.</source>
<target state="new">Patch {0} is available.</target>
<note />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<target state="new">Try out the newest .NET SDK features with .NET {0}.</target>
<note />
</trans-unit>
<trans-unit id="NewPatchAvaliableMessage">
<trans-unit id="NewPatchAvailableMessage">
<source>Patch {0} is available.</source>
<target state="new">Patch {0} is available.</target>
<note />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<target state="new">Try out the newest .NET SDK features with .NET {0}.</target>
<note />
</trans-unit>
<trans-unit id="NewPatchAvaliableMessage">
<trans-unit id="NewPatchAvailableMessage">
<source>Patch {0} is available.</source>
<target state="new">Patch {0} is available.</target>
<note />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<target state="new">Try out the newest .NET SDK features with .NET {0}.</target>
<note />
</trans-unit>
<trans-unit id="NewPatchAvaliableMessage">
<trans-unit id="NewPatchAvailableMessage">
<source>Patch {0} is available.</source>
<target state="new">Patch {0} is available.</target>
<note />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<target state="new">Try out the newest .NET SDK features with .NET {0}.</target>
<note />
</trans-unit>
<trans-unit id="NewPatchAvaliableMessage">
<trans-unit id="NewPatchAvailableMessage">
<source>Patch {0} is available.</source>
<target state="new">Patch {0} is available.</target>
<note />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<target state="new">Try out the newest .NET SDK features with .NET {0}.</target>
<note />
</trans-unit>
<trans-unit id="NewPatchAvaliableMessage">
<trans-unit id="NewPatchAvailableMessage">
<source>Patch {0} is available.</source>
<target state="new">Patch {0} is available.</target>
<note />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<target state="new">Try out the newest .NET SDK features with .NET {0}.</target>
<note />
</trans-unit>
<trans-unit id="NewPatchAvaliableMessage">
<trans-unit id="NewPatchAvailableMessage">
<source>Patch {0} is available.</source>
<target state="new">Patch {0} is available.</target>
<note />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ public WorkloadInstallCommand(

private void ValidateWorkloadIdsInput()
{
var avaliableWorkloads = _workloadResolver.GetAvaliableWorkloads();
var availableWorkloads = _workloadResolver.GetAvailableWorkloads();
foreach (var workloadId in _workloadIds)
{
if (avaliableWorkloads.Select(workload => workload.Id.ToString()).Contains(workloadId))
if (availableWorkloads.Select(workload => workload.Id.ToString()).Contains(workloadId))
{
if (!_workloadResolver.IsWorkloadPlatformCompatible(new WorkloadId(workloadId)))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="CommandDescription" xml:space="preserve">
<value>Search for avaliable workloads.</value>
<value>Search for available workloads.</value>
</data>
<data name="WorkloadIdStubArgumentName" xml:space="preserve">
<value>WORKLOAD_ID</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ public WorkloadSearchCommand(

public override int Execute()
{
IEnumerable<WorkloadDefinition> avaliableWorkloads = _workloadResolver.GetAvaliableWorkloads()
IEnumerable<WorkloadDefinition> availableWorkloads = _workloadResolver.GetAvailableWorkloads()
.OrderBy(workload => workload.Id);

if (!string.IsNullOrEmpty(_workloadIdStub))
{
avaliableWorkloads = avaliableWorkloads.Where(workload => workload.Id.ToString().Contains(_workloadIdStub, StringComparison.OrdinalIgnoreCase));
availableWorkloads = availableWorkloads.Where(workload => workload.Id.ToString().Contains(_workloadIdStub, StringComparison.OrdinalIgnoreCase));
}

var table = new PrintableTable<WorkloadDefinition>();
Expand All @@ -56,7 +56,7 @@ public override int Execute()
}

_reporter.WriteLine();
table.PrintRows(avaliableWorkloads, l => _reporter.WriteLine(l));
table.PrintRows(availableWorkloads, l => _reporter.WriteLine(l));
_reporter.WriteLine();

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<file datatype="xml" source-language="en" target-language="cs" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CommandDescription">
<source>Search for avaliable workloads.</source>
<source>Search for available workloads.</source>
<target state="needs-review-translation">Vypíše globálně nebo místně nainstalované nástroje.</target>
<note />
</trans-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<file datatype="xml" source-language="en" target-language="de" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CommandDescription">
<source>Search for avaliable workloads.</source>
<source>Search for available workloads.</source>
<target state="needs-review-translation">Hiermit listen Sie die global oder lokal installierten Tools auf.</target>
<note />
</trans-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<file datatype="xml" source-language="en" target-language="es" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CommandDescription">
<source>Search for avaliable workloads.</source>
<source>Search for available workloads.</source>
<target state="needs-review-translation">Mostrar las herramientas instaladas local o globalmente.</target>
<note />
</trans-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<file datatype="xml" source-language="en" target-language="fr" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CommandDescription">
<source>Search for avaliable workloads.</source>
<source>Search for available workloads.</source>
<target state="needs-review-translation">Liste les outils installés globalement ou localement.</target>
<note />
</trans-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<file datatype="xml" source-language="en" target-language="it" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CommandDescription">
<source>Search for avaliable workloads.</source>
<source>Search for available workloads.</source>
<target state="needs-review-translation">Elenca gli strumenti installati a livello globale o locale.</target>
<note />
</trans-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<file datatype="xml" source-language="en" target-language="ja" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CommandDescription">
<source>Search for avaliable workloads.</source>
<source>Search for available workloads.</source>
<target state="needs-review-translation">グローバルまたはローカルにインストールされているツールを一覧表示します。</target>
<note />
</trans-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<file datatype="xml" source-language="en" target-language="ko" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CommandDescription">
<source>Search for avaliable workloads.</source>
<source>Search for available workloads.</source>
<target state="needs-review-translation">전역으로 또는 로컬로 설치된 도구를 나열합니다.</target>
<note />
</trans-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<file datatype="xml" source-language="en" target-language="pl" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CommandDescription">
<source>Search for avaliable workloads.</source>
<source>Search for available workloads.</source>
<target state="needs-review-translation">Wyświetl listę narzędzi zainstalowanych globalnie lub lokalnie.</target>
<note />
</trans-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<file datatype="xml" source-language="en" target-language="pt-BR" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CommandDescription">
<source>Search for avaliable workloads.</source>
<source>Search for available workloads.</source>
<target state="needs-review-translation">Ferramentas de lista instaladas de forma global ou local.</target>
<note />
</trans-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<file datatype="xml" source-language="en" target-language="ru" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CommandDescription">
<source>Search for avaliable workloads.</source>
<source>Search for available workloads.</source>
<target state="needs-review-translation">Перечисление средств, установленных глобально или локально.</target>
<note />
</trans-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<file datatype="xml" source-language="en" target-language="tr" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CommandDescription">
<source>Search for avaliable workloads.</source>
<source>Search for available workloads.</source>
<target state="needs-review-translation">Genel veya yerel olarak yüklü araçları listeleyin.</target>
<note />
</trans-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<file datatype="xml" source-language="en" target-language="zh-HANS" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CommandDescription">
<source>Search for avaliable workloads.</source>
<source>Search for available workloads.</source>
<target state="needs-review-translation">列出全局或本地安装的工具。</target>
<note />
</trans-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<file datatype="xml" source-language="en" target-language="zh-HANT" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CommandDescription">
<source>Search for avaliable workloads.</source>
<source>Search for available workloads.</source>
<target state="needs-review-translation">列出已安裝在全域或本機的工具。</target>
<note />
</trans-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public interface IWorkloadResolver
IEnumerable<WorkloadResolver.PackInfo> GetInstalledWorkloadPacksOfKind(WorkloadPackKind kind);
IEnumerable<string> GetPacksInWorkload(string workloadId);
ISet<WorkloadResolver.WorkloadInfo> GetWorkloadSuggestionForMissingPacks(IList<string> packId);
IEnumerable<WorkloadDefinition> GetAvaliableWorkloads();
IEnumerable<WorkloadDefinition> GetAvailableWorkloads();
WorkloadResolver CreateTempDirResolver(IWorkloadManifestProvider manifestProvider, string dotnetRootPath, string sdkVersion);
bool IsWorkloadPlatformCompatible(WorkloadId workloadId);
string GetManifestVersion(string manifestId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ public ISet<WorkloadInfo> GetWorkloadSuggestionForMissingPacks(IList<string> pac
/// <summary>
/// Returns the list of workloads defined by the manifests on disk
/// </summary>
public IEnumerable<WorkloadDefinition> GetAvaliableWorkloads()
public IEnumerable<WorkloadDefinition> GetAvailableWorkloads()
{
return _workloads.Values;
}
Expand Down Expand Up @@ -478,7 +478,7 @@ public WorkloadInfo GetWorkloadInfo(WorkloadId WorkloadId)

public bool IsWorkloadPlatformCompatible(WorkloadId workloadId)
{
var workloadDef = GetAvaliableWorkloads().FirstOrDefault(workload => workload.Id.ToString().Equals(workloadId.ToString()));
var workloadDef = GetAvailableWorkloads().FirstOrDefault(workload => workload.Id.ToString().Equals(workloadId.ToString()));
if (workloadDef == null)
{
throw new Exception("Workload not found");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ protected override void ExecuteCore()
}
else
{
// For the remaining profiles, don't include them in package download but add them to unavaliable if necessary.
// For the remaining profiles, don't include them in package download but add them to unavailable if necessary.
runtimePackForRuntimeIDProcessing = knownFrameworkReference.ToKnownRuntimePack();
includeInPackageDownload = false;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Tests/dotnet-sdk-check.Tests/GivenDotnetSdkCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ public void ItContainsInfoForAllInstalledBundles()
[InlineData(new string[] { "1.1.10", "2.1.300", "2.1.810", "3.1.400" }, new string[] { }, new string[] { "2.1.302", "2.1.811", "3.1.404" })]
[InlineData(new string[] { }, new string[] { "1.1.10", "2.1.20", "3.1.0" }, new string[] { "2.1.23", "3.1.10" })]
[InlineData(new string[] { "1.1.10", "2.1.300", "2.1.810", "3.1.400" }, new string[] { "1.1.10", "2.1.20", "3.1.0" }, new string[] { "2.1.302", "2.1.811", "3.1.404", "2.1.23", "3.1.10" })]
public void WhenANewPatchIsAvaliableItIsAdvertised(string[] sdkVersions, string[] runtimeVersions, string[] latestPatchVersions)
public void WhenANewPatchIsAvailableItIsAdvertised(string[] sdkVersions, string[] runtimeVersions, string[] latestPatchVersions)
{
var parseResult = Parser.Instance.Parse(new string[] { "dotnet", "sdk", "check" });
var bundles = GetFakeEnvironmentInfo(sdkVersions, runtimeVersions);

new SdkCheckCommand(parseResult, new MockNETBundleProvider(bundles), new MockProductCollectionProvider(fakeReleasesPath), _reporter).Execute();

var commandResult = string.Join(' ', _reporter.Lines);
var expectedLines = latestPatchVersions.Select(version => string.Format(LocalizableStrings.NewPatchAvaliableMessage, version));
var expectedLines = latestPatchVersions.Select(version => string.Format(LocalizableStrings.NewPatchAvailableMessage, version));
foreach (var line in expectedLines)
{
commandResult
Expand Down
Loading