Merge pull request #123 from Thealexbarney/build-10

Update build to 0.10.0
This commit is contained in:
Alex Barney 2020-03-23 10:44:50 -07:00 committed by GitHub
commit 30b0c748f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 29 additions and 6 deletions

View file

@ -1 +1 @@
3.1.101
3.1.200

View file

@ -25,6 +25,7 @@ namespace LibHacBuild.CodeGen
SetEmptyResultValues(modules);
ValidateResults(modules);
CheckForDuplicates(modules);
ValidateHierarchy(modules);
CheckIfAggressiveInliningNeeded(modules);
@ -119,6 +120,24 @@ namespace LibHacBuild.CodeGen
}
}
private static void CheckForDuplicates(ModuleInfo[] modules)
{
foreach (ModuleInfo module in modules)
{
var set = new HashSet<long>();
foreach (ResultInfo result in module.Results)
{
long description = (long)result.DescriptionStart << 32 | (uint)result.DescriptionEnd;
if (!set.Add(description))
{
throw new InvalidDataException($"Duplicate result {result.Module}-{result.DescriptionStart}-{result.DescriptionEnd}.");
}
}
}
}
private static void ValidateHierarchy(ModuleInfo[] modules)
{
foreach (ModuleInfo module in modules)

View file

@ -11,9 +11,9 @@
<ItemGroup>
<PackageDownload Include="GitVersion.Tool" Version="[5.1.3]" />
<PackageReference Include="CsvHelper" Version="15.0.0" />
<PackageReference Include="CsvHelper" Version="15.0.2" />
<PackageReference Include="NuGet.CommandLine" Version="5.4.0" />
<PackageReference Include="Nuke.Common" Version="0.24.2" />
<PackageReference Include="Nuke.Common" Version="0.24.4" />
<PackageReference Include="SharpZipLib" Version="1.2.0" />
</ItemGroup>

View file

@ -43,6 +43,7 @@ namespace LibHac.Fs.Shim
if (nameBuffer.Length < requiredNameBufferSize)
return ResultFs.TooLongPath.Log();
// ReSharper disable once RedundantAssignment
int size = new U8StringBuilder(nameBuffer).Append(HostRootFileSystemPath).Append(_path.Str).Length;
Debug.Assert(size == requiredNameBufferSize - 1);
@ -58,6 +59,7 @@ namespace LibHac.Fs.Shim
Debug.Assert(nameBuffer.Length >= requiredNameBufferSize);
// ReSharper disable once RedundantAssignment
int size = StringUtils.Copy(nameBuffer, HostRootFileSystemPath);
Debug.Assert(size == requiredNameBufferSize - 1);

View file

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<VersionPrefix>0.9.0</VersionPrefix>
<VersionPrefix>0.10.0</VersionPrefix>
<TargetFrameworks>netcoreapp3.0;netstandard2.1</TargetFrameworks>
<LangVersion>8.0</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

View file

@ -1,8 +1,10 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.IO;
namespace LibHac
{
[Obsolete("This class has been deprecated. LibHac.Ns.ApplicationControlProperty should be used instead.")]
public class Nacp
{
public NacpDescription[] Descriptions { get; } = new NacpDescription[0x10];

View file

@ -7,7 +7,7 @@
</PropertyGroup>
<PropertyGroup>
<VersionPrefix>0.9.0</VersionPrefix>
<VersionPrefix>0.10.0</VersionPrefix>
<PathMap Condition=" '$(BuildType)' == 'Release' ">$(MSBuildProjectDirectory)=C:/hactoolnet/</PathMap>
</PropertyGroup>