Skip to content

This is the April 2022 Update (v2.15.0) #875

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file modified build/cache/vulkan.json.gz
Binary file not shown.
56 changes: 52 additions & 4 deletions build/nuke/Build.PublicApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,49 @@

partial class Build
{
const string FormatDeclCmd =
"format analyzers {0} --diagnostics=RS0016 --severity=error -v=diag --include-generated";
const string DefaultFormatCmd = "dotnet format";
string FormatCmd
{
get
{
// hack to use the dotnet-format NOT included with the SDK if it's available. this is useful if the one
// that's shipped with the SDK is bugged.
var process = OperatingSystem.IsWindows()
? InheritedShell("cmd /c where dotnet-format")
: InheritedShell("whereis dotnet-format");
process.AssertWaitForExit();
if (process.ExitCode == 1)
{
return DefaultFormatCmd;
}

var path = process.Output.FirstOrDefault(x => !string.IsNullOrWhiteSpace(x.Text)).Text;
if (path is null)
{
return DefaultFormatCmd;
}

const string startsWith = "dotnet-format:";
if (path.StartsWith(startsWith))
{
path = path[startsWith.Length..].Trim();
}

var split = path.Split(' ');
for (var i = 1; i <= split.Length; i++)
{
var candidatePath = string.Join(' ', split[..i]).Trim();
if (File.Exists(candidatePath))
{
var preface = OperatingSystem.IsWindows() ? "& " : string.Empty;
return $"{preface}\"{candidatePath}\"";
}
}

return DefaultFormatCmd;
}
}
string FormatDeclCmd => $"{FormatCmd} analyzers {{0}} --diagnostics=RS0016 --severity=error -v=diag --include-generated";

Target ShipApi => CommonTarget
(
Expand Down Expand Up @@ -63,7 +104,14 @@ partial class Build
)
);

Target DeclareApi => CommonTarget(x => x.Executes(() => DotNet(string.Format(FormatDeclCmd, "Silk.NET.sln"))));
Target DeclareApi => CommonTarget
(
x => x.Executes
(
() => InheritedShell(string.Format(FormatDeclCmd, "Silk.NET.sln"))
.AssertZeroExitCode()
)
);

Target EnsureApiDeclared => CommonTarget
(
Expand All @@ -87,7 +135,7 @@ partial class Build
EnvironmentInfo.SetVariable("GITHUB_TOKEN", string.Empty);

// run the format command
DotNet($"{cmd} --verify-no-changes");
InheritedShell($"{cmd} --verify-no-changes").AssertZeroExitCode();

// add our github token back
EnvironmentInfo.SetVariable("GITHUB_TOKEN", githubToken);
Expand Down
23 changes: 10 additions & 13 deletions build/props/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,24 @@
<LangVersion>preview</LangVersion>
<Authors>.NET Foundation and Contributors</Authors>
<PackageReleaseNotes>
Silk.NET March 2022 Update
Silk.NET April 2022 Update

- Add a Version13 convenience property (thanks @Eeveelution)
- Add DXGI_CREATE_FACTORY_DEBUG Constant to DXGI (thanks @Eeveelution)
- Update to Vulkan 1.3.207
- Update to latest OpenCL specifications
- Add DirectStorage bindings
- Add legacy OpenGL 2.0 support for the ImGui extension (thank you @Beyley)
- Add the ability to customize the functionality/priorities of DefaultPathResolver
- Add more auto-generated constants to Assimp, DirectX, and SDL
- Update to Vulkan 1.3.210
- Update to latest OpenGL specifications
- Fix SilkMarshal.StringToPtr throwing "buffer is too small to contain the encoded data" in some cases
- Fix Direct3D11 having its own ID3D10Blob type
- Fix Assimp using the wrong quaternion types
- Fix SDL windowing backend causing lots of allocations
- Fix GLFW windowing backend circular reference/memory leak

This release may be breaking for users, but those users who experience breaking changes most likely had code that didn't work anyway.
- Fix Assimp native package being out-of-sync with latest binding
- Fix SDL input backend producing different key mappings to the GLFW input backend
- Fix Android Activity restarts not being properly handled by Silk.NET Windowing
</PackageReleaseNotes>
<PackageTags Condition="'$(PackageTags)' == ''">OpenCL;OpenGL;OpenAL;OpenGLES;GLES;Vulkan;Assimp;DirectX;GLFW;SDL;Windowing;Input;Gamepad;Joystick;Keyboard;Mouse;SilkTouch;Source;Generator;C#;F#;.NET;DotNet;Mono;Vector;Math;Maths;Numerics;Game;Graphics;Compute;Audio;Sound;Engine;Silk;Silk.NET;Slim.NET;ElgarTK;GPU;Sharp;Science;Scientific;Visualization;Visual;Audiovisual;Windows;macOS;Linux;Android;Bindings;OSX;Wrapper;Native</PackageTags>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageOutputPath>$(MSBuildThisFileDirectory)/../output_packages</PackageOutputPath>
<RepositoryUrl>https://github.com/dotnet/Silk.NET</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
<VersionPrefix>2.14</VersionPrefix>
<VersionPrefix>2.15</VersionPrefix>
<VersionSuffix Condition="'$(VersionSuffix)' == ''"></VersionSuffix>
<Description Condition="'$(Description)' == ''">
Silk.NET is a high-speed, advanced library, providing bindings to popular low-level APIs such as OpenGL, OpenCL, OpenAL, OpenXR, GLFW, SDL, Vulkan, Assimp, and DirectX.
Expand Down
Loading