Граф коммитов

1122 Коммитов

Автор SHA1 Сообщение Дата
Sergio Pedri a6921f2cfb
Support [GeneratedBindableCustomProperty] on structs and records (#1854)
* Enable ICPP generator on records/structs

* Add unit test

* Add more types to authoring tests

* Add test for record type

* Add factory test with internal type

* Fix build error

* Fix 'ClassDeclarationSyntax' invalid cast

* Update generator to account for structs and records

* Skip attribute in generated .winmd files

* Fix build and unit test

* Fix authoring unit tests

* Actually fix authoring unit tests

* Update AuthoringConsumptionTest.exe.manifest
2024-10-30 16:38:47 -07:00
Sergio Pedri 0ca5cd65e3
Improve ICPP exception messages (#1857)
* Improve ICPP exception messages

* Fix typo

Co-authored-by: Manodasan Wignarajah <mawign@microsoft.com>

---------

Co-authored-by: Manodasan Wignarajah <mawign@microsoft.com>
2024-10-29 21:36:10 -07:00
Sergio Pedri 0966edb395
Special case internal 'ReadOnlyList' type (#1847)
* Special case internal 'ReadOnlyList' type

* Bump patch version to 7
2024-10-28 15:20:45 -07:00
Manodasan Wignarajah 9a519161ee
Add GC.KeepAlive when doing ABI call (#1848)
* Try running with GC stress

* Also disable

* Add GC keep alive

* Remove optional

* Add KeepAlive

* Keep alive

* Try increasing timeout to see if it is just taking longer to launch

* Diagnose test issue

* Try to fix test

* Update timeouts

* Increase timeout

* Try one more fix
2024-10-28 15:16:15 -07:00
Sergio Pedri 89c9552893
Add 'CsWinRTDynamicallyInterfaceCastableExclusiveTo' (#1835)
* Add 'CsWinRTDynamicallyInterfaceCastableExclusiveTo'

* Support 'idic_exclusiveto' in code writer

* Add new parameter to 'CsWinRTParams'

* Fix IDIC generation, skip CCW vtable generation

* Fix CCW codegen for non IDIC scenarios

* Fix illegal break in code writer

* Apply suggestions from code review

Co-authored-by: Manodasan Wignarajah <mawign@microsoft.com>

---------

Co-authored-by: Manodasan Wignarajah <mawign@microsoft.com>
2024-10-25 15:33:00 -07:00
Sergio Pedri 43e8172ebc
Support explicitly implementing 'ICustomPropertyProvider' (#1841)
* Support user implemented 'ICPP'

* Add unit test for custom 'ICPP'

* Add 'Microsoft.UI.Xaml.Data.h' to 'pch.h'

* Unbox property value before comparison
2024-10-24 00:26:41 -07:00
0x5BFA 32b3f17cfb
Updated issue templates with Issue Form (#1842)
* Update and rename bug_report.md to bug_report.yml

* Update bug_report.yml

* Update and rename feature_request.md to feature_request.yml

* Update feature_request.yml

* Update bug_report.yml

* Update bug_report.yml
2024-10-23 16:11:49 -07:00
Sergio Pedri 13ea06ce8a
Minor improvements to 'ExceptionHelpers.SetErrorInfo' (#1824)
* Use HSTRING reference

* Skip managed object reference allocation

* Fix HSTRING_HEADER parameter
2024-10-21 20:50:14 -07:00
Sergio Pedri 7c85a8d03d
Fix 'CsWinRT1028' for generated 'EventSource' (#1840) 2024-10-21 20:48:25 -07:00
Manodasan Wignarajah 445b4f6511
Fix exception when using funcs and take another approach to escape assembly name (#1836) 2024-10-17 21:08:34 -07:00
Dongle 578f892727
Fix types in attributes being projected as System.Type in WinMD. (#1829) 2024-10-16 18:02:23 -07:00
Sergio Pedri 69ef4176b7
Add null checks to some 'Marshal.Release' calls (#1832) 2024-10-16 17:59:34 -07:00
Sergio Pedri 0a18c1f5dd
Skip QI and 'IObjectReference' allocation in IDIC fallback (#1833) 2024-10-16 17:54:58 -07:00
Sergio Pedri 938d95f6ff
Improve exception messages for failed casts (#1826) 2024-10-15 01:08:02 -07:00
Dongle ce2ef94d5c
Fix enum attribute argument. (#1827)
* Fix enum attribute argument.

* Update src/Authoring/WinRT.SourceGenerator/WinRTTypeWriter.cs

Co-authored-by: Sergio Pedri <sergio0694@live.com>

---------

Co-authored-by: Sergio Pedri <sergio0694@live.com>
2024-10-15 00:53:18 -07:00
Manodasan Wignarajah 3478372c55
Update CsWinRT-Variables.yml (#1823) 2024-10-13 16:46:25 -07:00
Manodasan Wignarajah db00a61ddd
Reuse generated code when possible (#1821)
* Initialize size improvements

* Also optimize ccw

* Fix build

* Add comments and renaming
2024-10-13 16:46:06 -07:00
Manodasan Wignarajah eb67781cec
Fix couple issues (#1820)
* Fixes for various issues

* Fix nullable scenarios

* Ensure trailing slash

* Add another test
2024-10-12 20:27:08 -07:00
Sergio Pedri 848212447d
Don't emit default ctor for non activatable types (#1817)
* Don't emit default ctor for non activatable types

* Add test for non activatable type

* Add more unit tests

* Remove 'NonActivatableType' test

* Add one more test case
2024-10-10 19:52:29 -07:00
Manodasan Wignarajah 7578691c9e
Add fallback code for managed vtables for skia scenarios (#1819) 2024-10-10 16:50:08 -07:00
Manodasan Wignarajah 45a9e87762
For CsWinRT component support, if a old version of CsWinRT is referenced but new source generator is used, don't generate the new sources (#1818) 2024-10-10 15:10:42 -07:00
Manodasan Wignarajah ec94cc7bb6
Fixing multiple type definition issue and fixing NotifyCollectionChangedAction issue (#1816)
* Detect if a type is defined in mutliple places so that we can avoid a compiler error in the fallback generator

* Fix NotifyCollectionChangedAction not marked as blittable or a value type

* Fix RCW fallback source generator when there are multiple definitions for the same type in references.

* Undo rename
2024-10-10 11:49:34 -07:00
Manodasan Wignarajah 4bc7bfd261
Improve performance of source generator (#1804)
* Try to improve generator performance by checking properties earlier and checking WinRT.Runtime reference

* Handle embedded support

* Scope to when lookup generation is enabled

* Undo check for WinRT.Runtime reference

* Minor reordering update to improve caching potentially and static

* Add missed file

* Remove unused namespace
2024-10-08 17:34:21 -07:00
Manodasan Wignarajah ad5cc38488
Escape a couple more special characters (#1807)
* Add more special characters for escaping

* One more special character
2024-10-02 21:34:48 -07:00
Manodasan Wignarajah 60e11829f9
Fix build pipeline failure with autobaselining (#1806) 2024-10-02 11:27:01 -07:00
Johan Laanstra 2e56fca49d
ToArray fails when buffer capacity is larger than its length. (#1805)
* Add failing test for ToArray.

* Add missing Slice call to limit length of span to count.

* Add another test.
2024-09-30 17:19:48 -07:00
Manodasan Wignarajah 3c1ba7f770
Update version (#1803) 2024-09-28 21:32:54 -07:00
Manodasan Wignarajah 3e1724e0f3
Fix IsPartial check and escaping of assembly name (#1802)
* Fix scenarios where the parent type isn't partial

* Fix partial for bindablecustomproperty scenarios too

* Escape dashes in assembly name

* Escape @

* Remove namespace
2024-09-28 21:12:02 -07:00
Dongle 037f6aedf2
Add explicit GUID support for delegates and non-synthesized interfaces. (#1792)
* Add explicit GUID support for delegates and non-synthesized interfaces.

* Add wrapper method for GUID attribute

* Fix variable name mismatch.

* Add tests (untested)

* Fix indentation

* Fix typo

* Add GUID test class for regfree WinRT

---------

Co-authored-by: Sergio Pedri <sergio0694@live.com>
2024-09-18 15:51:15 -07:00
Manodasan Wignarajah b55ca83f3c
Fix ordering of targets impacting WPF scenarios (#1738) 2024-09-09 18:30:39 -07:00
Manodasan Wignarajah 7b7b412d3f
Detect when property expressions are used. (#1737) 2024-09-07 14:21:55 -07:00
Manodasan Wignarajah 3ee0ef2e4f
Fix GetEnumerator when C# enumerator gets passed to native and back (#1735)
* Fix GetEnumerator when C# enumerator gets passed to native and back and add tests

* Fix spacing

* Update version

* Fix projected enumerator scenario

* Fix iterator mapping
2024-09-07 14:20:51 -07:00
Manodasan Wignarajah 34d8d54cd2
Fix issue in WPF scenarios where our source generator was getting included twice. (#1731) 2024-09-05 01:14:58 -07:00
Manodasan Wignarajah c109e10360
Fix source generator issues (#1732)
* Fix instantiations of generic classes not being put of lookup table

* Fix check for WinRT classes

* Add more scenarios for unsafe diagnostics

* Fix sln

* Fix build

* Fix issue in WPF scenarios where our source generator was getting included twice.

* Revert "Fix issue in WPF scenarios where our source generator was getting included twice."

This reverts commit 7d3ee3346f.

* Move to debug as intended
2024-09-04 23:54:58 -07:00
Steve 5ad543d507
Treat initonly properties as cannot write (#1730) 2024-09-03 17:18:09 -07:00
Manodasan Wignarajah 465773913c
Add NuGet.config (#1728)
* Update nuget.config

* Remove restore sources

* Authenticate

* Fix runtimeidentifier warning

* Update VCRT forwarders
2024-08-29 17:55:08 -07:00
Manodasan Wignarajah ad6c15a97a
Update docs (#1723)
* Update docs

* Rename

* Make table

* Fix

* Fix

* Fix again

* Update

* Update versions

* Line break

* Make version consistent

* Update with exception note
2024-08-26 13:39:39 -07:00
Manodasan Wignarajah 98122be462
Fix diagnostic rule to be warning and not error (#1711)
* Fix rule to be warning and not error

* Update URL
2024-08-07 13:47:10 -07:00
Manodasan Wignarajah eebf9ae909
Make generator compatible with older version of projections (#1710)
* Make generator compatible with older version of projections

* Increment version
2024-08-07 09:06:51 -07:00
Manodasan Wignarajah aeaaf0c45f
Merge pull request #1708 from microsoft/staging/AOT
Merge AOT changes to master
2024-08-06 02:23:34 -07:00
Sergio Pedri c7b2929734
Add 'Windows.UI.Xaml.*' exception types (#1705)
* Add 'Windows.UI.Xaml' exception types

* Add WUX exceptions unit tests

* Remove WUX exception types downlevel

* Fix test

---------

Co-authored-by: Manodasan Wignarajah <mawign@microsoft.com>
2024-08-05 23:15:40 -07:00
Sergio Pedri b9fb45deee
Add some more missing 'readonly' modifiers (#1707) 2024-08-05 23:09:29 -07:00
Sergio Pedri d008663c1f
Allow projecting `Windows.UI.ColorHelper` type (#1706)
* Remove 'ColorHelper' from custom mapped types

* Exclude 'ColorHelper' from test Windows SDK
2024-08-05 20:55:29 -07:00
Manodasan Wignarajah 8bfadfe1c7
Add .NET 8 version to nuget package (#1704)
* Add .NET 8 binaries to package

* Update .NET versions
2024-08-05 17:04:27 -07:00
Manodasan Wignarajah a56fba4d42
Fix get type for nullable enums and fix WUX projections (#1701)
* Add support for nullable enums and structs and add some missed attributes in the WUX types

* Remove exception that gets caught

* PR feedback
2024-08-04 22:50:31 -07:00
Manodasan Wignarajah c65ab3d4aa
Merge pull request #1700 from microsoft/manodasanw/merge3
Merge master to staging/AOT branch
2024-08-03 11:43:42 -07:00
Manodasan Wignarajah e3fc0a0081 Fix bad merge 2024-08-02 23:21:14 -07:00
Manodasan Wignarajah c0bcb7a7c5 Disable memory pressure on AOT for now to avoid making the GC hang issue happen more often. 2024-08-02 23:18:32 -07:00
Manodasan Wignarajah cd0fea8fec Merge branch 'master' into manodasanw/merge3 2024-08-02 23:10:42 -07:00
Manodasan Wignarajah 589d1bc5fa
Make contracts internal when using embedded (#1698) 2024-08-02 20:43:47 -07:00