-
-
Notifications
You must be signed in to change notification settings - Fork 425
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
[3.0] COM Binding Transformation #2406
base: develop/3.0
Are you sure you want to change the base?
Conversation
@Perksey Ready for Review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! It's cool to see this come together :)
Some notes...
sources/Win32/Win32/DirectX/d3d12/d3dcommon/ID3DDestructionNotifier.gen.cs
Outdated
Show resolved
Hide resolved
Obviously note the CI errors as well if you haven't already. |
sources/Win32/Win32/DirectX/d3d12/d3dcommon/D3D_CBUFFER_TYPE.gen.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry this review is a bit all over the place, I wrote things as I saw them so comments may not be placed at their root causes.
Glad to see this moving along nicely.
sources/Core/Core/DSL/MaybeBool`1.cs
Outdated
/// <summary> | ||
/// compares boolean value and int | ||
/// </summary> | ||
/// <param name="lh"></param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't really called this out in past PRs as it is a bit of a nitpick, but it would be nice if you did fill out the documentation template generated!
[MethodImpl( | ||
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization | ||
)] | ||
public static implicit operator Ptr<T>(nuint ptr) => new((T*)ptr.ToPointer()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment.
-also support for csv lists in --only and --skip
-Setup to run using new mod system properly -Added pointer member accessor to member accessor conversion -Added Logging
per Mod Performance
-Added early out -fix duplicate call -Add INativeGuid
-fixed some broken using from TerraFX files -Allowed BaseType to be specified for ComTypes -Added several files for override due to issue in generation
-allowed for multiple COM base types -allowed for addition of manual COM types -added several manual overrides -added all manual files necessary for compilation
Fixed some manual warnings as well
This reverts commit 0a1bd47.
-using globbing instead of regex -removed an unnecessary restriction on interface finding -updates single line code to expression bodies
Co-authored-by: Dylan Perks <[email protected]>
for rollback purposes
moved to internal Native struct INativeInterface and IComInterface added to represent all interfaces and Com interfaces, respectively. - IComInterface is a child of INativeInterface and INativeGuid
-and fixing issues with how it works
added manual file importer added a progress bar in some cases for QoL moved rename function into NameUtils
Added per job file logs fixed up the progress bar system to be cleaner
This reverts commit ed1c763.
6c6d633
to
fe2f36c
Compare
Also split some common classes out into core
Benefit of the doubt is expected and will now be accounted for
also fix for CI issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really getting excited at this point now, and really happy with the progress on this PR. Yes I know there's 30 comments, but most of these are fairly small (in my opinion) and don't call into question conceptual/large ways of doing things as previous reviews have. Thanks for keeping with it!
@@ -409,8 +409,7 @@ ptr.Native is not null && ptr.Native->Native is not null | |||
[MethodImpl( | |||
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization | |||
)] | |||
// TODO analyzer to ensure ptr is on stack or otherwise pinned |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you keep this comment please
|
||
namespace Silk.NET.Windows; | ||
#pragma warning disable CS1589, CS1591, CS0419, CA1416, CS0618 | ||
namespace Silk.NET.Core; | ||
|
||
public readonly partial struct BOOL : IComparable, IComparable<BOOL>, IEquatable<BOOL>, IFormattable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to have a discussion on whether we want to keep this type. We already have MaybeBool<int>
- if this is missing functionality then we should probably add that functionality there.
|
||
namespace Silk.NET.Windows; | ||
#pragma warning disable CS1589, CS1591, CS0419, CA1416, CS0618 | ||
namespace Silk.NET.Core; | ||
|
||
public readonly unsafe partial struct HANDLE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be Handle
? Or perhaps NativeHandle
/Win32Handle
?
|
||
namespace Silk.NET.Windows; | ||
#pragma warning disable CS1589, CS1591, CS0419, CA1416, CS0618 | ||
namespace Silk.NET.Core; | ||
|
||
public readonly unsafe partial struct HRESULT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be HResult?
|
||
namespace Silk.NET.WinRT; | ||
#pragma warning disable CS1589, CS1591, CS0419, CA1416, CS0618 | ||
namespace Silk.NET.Core; | ||
|
||
public readonly unsafe partial struct HSTRING |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be HString? Note: In 2.X this was called WinString iirc, which is also a terrible name but oh well.
using Silk.NET.SilkTouch.Mods.Transformation; | ||
using Silk.NET.SilkTouch.Naming; | ||
using Silk.NET.SilkTouch.Utility; | ||
using static System.Runtime.InteropServices.JavaScript.JSType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what happened here
SeparatedList( | ||
x.Attributes.Where(y => | ||
!y.IsAttribute( | ||
"System.Runtime.InteropServices.UnmanagedCallersOnly" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe my other comment makes this unnecessary or invalid?
"Namespace": "Silk.NET.Win32", | ||
"Parent": "IDispatch.Interface" | ||
}, | ||
"IInspectable.Interface": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tbh, all the ones that are in Silk.NET.Core should be in additional COM types by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair, we can append them easily enough.
/// <summary> | ||
/// Information on the current Job | ||
/// </summary> | ||
public class JobContext |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make this internal for now given that it's only our CLI that uses it today and there's no immediate use case for anyone else using this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't, makes DI upset for the progressService. You would have to make the constructor internal as well and DI doesn't seem to like that. It only seems to work with a public one.
var sp = new ServiceCollection() | ||
.AddSingleton(jobContext) | ||
.AddSingleton<IProgressService, ProgressService>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this line should be part of AddSilkTouch. Note that you'll probably have to move the ConsoleRenderer AddSingleton call to after AddSilkTouch (might not though, but if it breaks this might be why).
Co-authored-by: Dylan Perks <[email protected]>
Summary of the PR
Adds the necessary enhancements to allow for easy to use COM bindings and any changes required to get Microsoft Bindings building.
-Adds TransformCOM mod to implement in place ComPtr transformations in all COM classes
-Adds DisableWarnings mod to disable warnings in all files for a job in order to avoid build errors from unavoidable or ignorable errors
-Adds several additions to ClangScraper to disable caching and remove generated files from the output.
-Adds some QOL improvements such as --only and csv list support to silk touch