diff --git a/osu.Framework.SourceGeneration.Tests/Dependencies/DependencyInjectionMultiPhaseSourceGeneratorTests.cs b/osu.Framework.SourceGeneration.Tests/Dependencies/DependencyInjectionMultiPhaseSourceGeneratorTests.cs index cd99dce75c..e9a5db3277 100644 --- a/osu.Framework.SourceGeneration.Tests/Dependencies/DependencyInjectionMultiPhaseSourceGeneratorTests.cs +++ b/osu.Framework.SourceGeneration.Tests/Dependencies/DependencyInjectionMultiPhaseSourceGeneratorTests.cs @@ -47,7 +47,7 @@ public void Check(string name) [Theory] [MemberData(nameof(CheckWithStatisticsData))] - public void CheckWithStatistics(string name, (int, int, int)[] expectedStatistics) + public void CheckWithStatistics(string name, (int syntaxTargetCreated, int semanticTargetCreated, int emitHits)[] expectedStatistics) { GetTestSources(name, out (string filename, string content)[] commonSources, diff --git a/osu.Framework.SourceGeneration.Tests/GeneratorTestHelper.cs b/osu.Framework.SourceGeneration.Tests/GeneratorTestHelper.cs index 5dabc47f9b..e632b4190f 100644 --- a/osu.Framework.SourceGeneration.Tests/GeneratorTestHelper.cs +++ b/osu.Framework.SourceGeneration.Tests/GeneratorTestHelper.cs @@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Testing; -using Microsoft.CodeAnalysis.Testing.Verifiers; namespace osu.Framework.SourceGeneration.Tests { @@ -57,7 +56,7 @@ public static void VerifyMultiPhaseGeneratedSources(this GeneratorDriverRunResul string actual = source.SourceText.ToString(); - new XUnitVerifier().EqualOrDiff(content, actual, $"Phase {phase}: Generated source {filename} did not match expected content"); + new DefaultVerifier().EqualOrDiff(content, actual, $"Phase {phase}: Generated source {filename} did not match expected content"); matches++; } @@ -77,7 +76,7 @@ public IncrementalCompilation() { Compilation = CSharpCompilation.Create("test", references: new[] { MetadataReference.CreateFromFile(typeof(object).Assembly.Location) }, - options: new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary)); + options: new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, optimizationLevel: OptimizationLevel.Release)); } public GeneratorDriverRunResult RunGenerators(ref GeneratorDriver driver) diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/AcceptsFocusProperty/Generated/g_AcceptsFocusProperty_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/AcceptsFocusProperty/Generated/g_AcceptsFocusProperty_HandleInput.txt index 0e2e16b27b..8141abb3b9 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/AcceptsFocusProperty/Generated/g_AcceptsFocusProperty_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/AcceptsFocusProperty/Generated/g_AcceptsFocusProperty_HandleInput.txt @@ -5,5 +5,6 @@ partial class AcceptsFocusProperty : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::AcceptsFocusProperty); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/CommonGenerated/g_osu.Framework.Graphics.Drawable_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/CommonGenerated/g_osu.Framework.Graphics.Drawable_HandleInput.txt index 5d641826e9..8f8ab03bf3 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/CommonGenerated/g_osu.Framework.Graphics.Drawable_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/CommonGenerated/g_osu.Framework.Graphics.Drawable_HandleInput.txt @@ -7,7 +7,9 @@ namespace osu.Framework.Graphics partial class Drawable : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::osu.Framework.Graphics.Drawable); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => false; + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => false; } } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandleMethod/Generated/g_HandleMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandleMethod/Generated/g_HandleMethod_HandleInput.txt index 9a867cecf8..da039703a3 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandleMethod/Generated/g_HandleMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandleMethod/Generated/g_HandleMethod_HandleInput.txt @@ -5,6 +5,8 @@ partial class HandleMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::HandleMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandleNonPositionalInputProperty/Generated/g_HandleNonPositionalInputProperty_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandleNonPositionalInputProperty/Generated/g_HandleNonPositionalInputProperty_HandleInput.txt index 2fec5a4f63..743b0b86de 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandleNonPositionalInputProperty/Generated/g_HandleNonPositionalInputProperty_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandleNonPositionalInputProperty/Generated/g_HandleNonPositionalInputProperty_HandleInput.txt @@ -5,5 +5,6 @@ partial class HandleNonPositionalInputProperty : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::HandleNonPositionalInputProperty); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandlePositionalInputProperty/Generated/g_HandlePositionalInputProperty_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandlePositionalInputProperty/Generated/g_HandlePositionalInputProperty_HandleInput.txt index e6140fbf90..036f151370 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandlePositionalInputProperty/Generated/g_HandlePositionalInputProperty_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandlePositionalInputProperty/Generated/g_HandlePositionalInputProperty_HandleInput.txt @@ -5,5 +5,6 @@ partial class HandlePositionalInputProperty : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::HandlePositionalInputProperty); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasContextMenuInterface/Generated/g_IHasContextMenuInterface_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasContextMenuInterface/Generated/g_IHasContextMenuInterface_HandleInput.txt index b34773253d..3fe682b934 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasContextMenuInterface/Generated/g_IHasContextMenuInterface_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasContextMenuInterface/Generated/g_IHasContextMenuInterface_HandleInput.txt @@ -5,5 +5,6 @@ partial class IHasContextMenuInterface : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::IHasContextMenuInterface); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasCustomTooltipInterface/Generated/g_IHasCustomTooltipInterface_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasCustomTooltipInterface/Generated/g_IHasCustomTooltipInterface_HandleInput.txt index d312abdc0a..9bb250f493 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasCustomTooltipInterface/Generated/g_IHasCustomTooltipInterface_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasCustomTooltipInterface/Generated/g_IHasCustomTooltipInterface_HandleInput.txt @@ -5,5 +5,6 @@ partial class IHasCustomTooltipInterface : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::IHasCustomTooltipInterface); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasPopoverInterface/Generated/g_IHasPopoverInterface_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasPopoverInterface/Generated/g_IHasPopoverInterface_HandleInput.txt index f529f436d0..a794c70e16 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasPopoverInterface/Generated/g_IHasPopoverInterface_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasPopoverInterface/Generated/g_IHasPopoverInterface_HandleInput.txt @@ -5,5 +5,6 @@ partial class IHasPopoverInterface : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::IHasPopoverInterface); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasTooltipInterface/Generated/g_IHasTooltipInterface_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasTooltipInterface/Generated/g_IHasTooltipInterface_HandleInput.txt index 452c059595..9610475ec5 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasTooltipInterface/Generated/g_IHasTooltipInterface_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasTooltipInterface/Generated/g_IHasTooltipInterface_HandleInput.txt @@ -5,5 +5,6 @@ partial class IHasTooltipInterface : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::IHasTooltipInterface); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IKeyBindingHandlerInterface/Generated/g_IKeyBindingHandlerInterface_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IKeyBindingHandlerInterface/Generated/g_IKeyBindingHandlerInterface_HandleInput.txt index 72c5d7de77..9c225b5b66 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IKeyBindingHandlerInterface/Generated/g_IKeyBindingHandlerInterface_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IKeyBindingHandlerInterface/Generated/g_IKeyBindingHandlerInterface_HandleInput.txt @@ -5,5 +5,6 @@ partial class IKeyBindingHandlerInterface : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::IKeyBindingHandlerInterface); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IntermediateNonPartial/Generated/g_PartialClass_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IntermediateNonPartial/Generated/g_PartialClass_HandleInput.txt index dab954aec0..ea3881228c 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IntermediateNonPartial/Generated/g_PartialClass_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IntermediateNonPartial/Generated/g_PartialClass_HandleInput.txt @@ -5,6 +5,8 @@ partial class PartialClass : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::PartialClass); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnClickMethod/Generated/g_OnClickMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnClickMethod/Generated/g_OnClickMethod_HandleInput.txt index 3ffb370ae8..b1e9ba77b3 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnClickMethod/Generated/g_OnClickMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnClickMethod/Generated/g_OnClickMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnClickMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnClickMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDoubleClickMethod/Generated/g_OnDoubleClickMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDoubleClickMethod/Generated/g_OnDoubleClickMethod_HandleInput.txt index cd9602e9ac..d583cffd67 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDoubleClickMethod/Generated/g_OnDoubleClickMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDoubleClickMethod/Generated/g_OnDoubleClickMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnDoubleClickMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnDoubleClickMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragEndMethod/Generated/g_OnDragEndMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragEndMethod/Generated/g_OnDragEndMethod_HandleInput.txt index c5ec735477..e50ef8176e 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragEndMethod/Generated/g_OnDragEndMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragEndMethod/Generated/g_OnDragEndMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnDragEndMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnDragEndMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragMethod/Generated/g_OnDragMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragMethod/Generated/g_OnDragMethod_HandleInput.txt index 0215339f90..21719ec721 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragMethod/Generated/g_OnDragMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragMethod/Generated/g_OnDragMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnDragMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnDragMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragStartMethod/Generated/g_OnDragStartMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragStartMethod/Generated/g_OnDragStartMethod_HandleInput.txt index cc10baafce..fa311da0a2 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragStartMethod/Generated/g_OnDragStartMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragStartMethod/Generated/g_OnDragStartMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnDragStartMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnDragStartMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnFocusLostMethod/Generated/g_OnFocusLostMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnFocusLostMethod/Generated/g_OnFocusLostMethod_HandleInput.txt index 4aa301a6d4..037c6ca948 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnFocusLostMethod/Generated/g_OnFocusLostMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnFocusLostMethod/Generated/g_OnFocusLostMethod_HandleInput.txt @@ -5,6 +5,8 @@ partial class OnFocusLostMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnFocusLostMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnFocusMethod/Generated/g_OnFocusMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnFocusMethod/Generated/g_OnFocusMethod_HandleInput.txt index 8e48c314f0..34dad357b1 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnFocusMethod/Generated/g_OnFocusMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnFocusMethod/Generated/g_OnFocusMethod_HandleInput.txt @@ -5,6 +5,8 @@ partial class OnFocusMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnFocusMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnHoverLostMethod/Generated/g_OnHoverLostMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnHoverLostMethod/Generated/g_OnHoverLostMethod_HandleInput.txt index bbbe7585c8..cf2af2e112 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnHoverLostMethod/Generated/g_OnHoverLostMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnHoverLostMethod/Generated/g_OnHoverLostMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnHoverLostMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnHoverLostMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnHoverMethod/Generated/g_OnHoverMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnHoverMethod/Generated/g_OnHoverMethod_HandleInput.txt index 7dc5351d6e..66eed186c6 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnHoverMethod/Generated/g_OnHoverMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnHoverMethod/Generated/g_OnHoverMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnHoverMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnHoverMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickAxisMoveMethod/Generated/g_OnJoystickAxisMoveMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickAxisMoveMethod/Generated/g_OnJoystickAxisMoveMethod_HandleInput.txt index b3251e113e..98a643f17f 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickAxisMoveMethod/Generated/g_OnJoystickAxisMoveMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickAxisMoveMethod/Generated/g_OnJoystickAxisMoveMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnJoystickAxisMoveMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnJoystickAxisMoveMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickPressMethod/Generated/g_OnJoystickPressMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickPressMethod/Generated/g_OnJoystickPressMethod_HandleInput.txt index be8a54303d..05159f4d18 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickPressMethod/Generated/g_OnJoystickPressMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickPressMethod/Generated/g_OnJoystickPressMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnJoystickPressMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnJoystickPressMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickReleaseMethod/Generated/g_OnJoystickReleaseMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickReleaseMethod/Generated/g_OnJoystickReleaseMethod_HandleInput.txt index 82767a3d4b..1b43a5e4ab 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickReleaseMethod/Generated/g_OnJoystickReleaseMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickReleaseMethod/Generated/g_OnJoystickReleaseMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnJoystickReleaseMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnJoystickReleaseMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnKeyDownMethod/Generated/g_OnKeyDownMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnKeyDownMethod/Generated/g_OnKeyDownMethod_HandleInput.txt index ab892cc0ad..dad5c7d24e 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnKeyDownMethod/Generated/g_OnKeyDownMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnKeyDownMethod/Generated/g_OnKeyDownMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnKeyDownMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnKeyDownMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnKeyUpMethod/Generated/g_OnKeyUpMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnKeyUpMethod/Generated/g_OnKeyUpMethod_HandleInput.txt index c59b62cbe9..19339375cb 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnKeyUpMethod/Generated/g_OnKeyUpMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnKeyUpMethod/Generated/g_OnKeyUpMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnKeyUpMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnKeyUpMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMidiDownMethod/Generated/g_OnMidiDownMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMidiDownMethod/Generated/g_OnMidiDownMethod_HandleInput.txt index 1d891b2c04..dba643673e 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMidiDownMethod/Generated/g_OnMidiDownMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMidiDownMethod/Generated/g_OnMidiDownMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnMidiDownMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnMidiDownMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMidiUpMethod/Generated/g_OnMidiUpMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMidiUpMethod/Generated/g_OnMidiUpMethod_HandleInput.txt index e03a548caf..5ad28a1d33 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMidiUpMethod/Generated/g_OnMidiUpMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMidiUpMethod/Generated/g_OnMidiUpMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnMidiUpMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnMidiUpMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseDownMethod/Generated/g_OnMouseDownMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseDownMethod/Generated/g_OnMouseDownMethod_HandleInput.txt index 01a8f10e4d..cca0985372 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseDownMethod/Generated/g_OnMouseDownMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseDownMethod/Generated/g_OnMouseDownMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnMouseDownMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnMouseDownMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseMoveMethod/Generated/g_OnMouseMoveMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseMoveMethod/Generated/g_OnMouseMoveMethod_HandleInput.txt index 0c0c5984f6..e6215fb849 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseMoveMethod/Generated/g_OnMouseMoveMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseMoveMethod/Generated/g_OnMouseMoveMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnMouseMoveMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnMouseMoveMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseUpMethod/Generated/g_OnMouseUpMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseUpMethod/Generated/g_OnMouseUpMethod_HandleInput.txt index aa3c2e7a0f..f253a5bd42 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseUpMethod/Generated/g_OnMouseUpMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseUpMethod/Generated/g_OnMouseUpMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnMouseUpMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnMouseUpMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnScrollMethod/Generated/g_OnScrollMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnScrollMethod/Generated/g_OnScrollMethod_HandleInput.txt index d32f8ebf54..b90ca38dbf 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnScrollMethod/Generated/g_OnScrollMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnScrollMethod/Generated/g_OnScrollMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnScrollMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnScrollMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletAuxiliaryButtonPressMethod/Generated/g_OnTabletAuxiliaryButtonPressMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletAuxiliaryButtonPressMethod/Generated/g_OnTabletAuxiliaryButtonPressMethod_HandleInput.txt index fc01beb600..514c4299d2 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletAuxiliaryButtonPressMethod/Generated/g_OnTabletAuxiliaryButtonPressMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletAuxiliaryButtonPressMethod/Generated/g_OnTabletAuxiliaryButtonPressMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnTabletAuxiliaryButtonPressMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnTabletAuxiliaryButtonPressMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletAuxiliaryButtonReleaseMethod/Generated/g_OnTabletAuxiliaryButtonReleaseMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletAuxiliaryButtonReleaseMethod/Generated/g_OnTabletAuxiliaryButtonReleaseMethod_HandleInput.txt index 6844d61957..b9a733793b 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletAuxiliaryButtonReleaseMethod/Generated/g_OnTabletAuxiliaryButtonReleaseMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletAuxiliaryButtonReleaseMethod/Generated/g_OnTabletAuxiliaryButtonReleaseMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnTabletAuxiliaryButtonReleaseMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnTabletAuxiliaryButtonReleaseMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletPenButtonPressMethod/Generated/g_OnTabletPenButtonPressMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletPenButtonPressMethod/Generated/g_OnTabletPenButtonPressMethod_HandleInput.txt index 84c24b4c19..2532894a27 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletPenButtonPressMethod/Generated/g_OnTabletPenButtonPressMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletPenButtonPressMethod/Generated/g_OnTabletPenButtonPressMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnTabletPenButtonPressMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnTabletPenButtonPressMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletPenButtonReleaseMethod/Generated/g_OnTabletPenButtonReleaseMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletPenButtonReleaseMethod/Generated/g_OnTabletPenButtonReleaseMethod_HandleInput.txt index 27e232ed8d..313487ff8e 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletPenButtonReleaseMethod/Generated/g_OnTabletPenButtonReleaseMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletPenButtonReleaseMethod/Generated/g_OnTabletPenButtonReleaseMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnTabletPenButtonReleaseMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnTabletPenButtonReleaseMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchDownMethod/Generated/g_OnTouchDownMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchDownMethod/Generated/g_OnTouchDownMethod_HandleInput.txt index 208a411a93..b7f28befad 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchDownMethod/Generated/g_OnTouchDownMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchDownMethod/Generated/g_OnTouchDownMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnTouchDownMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnTouchDownMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchMoveMethod/Generated/g_OnTouchMoveMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchMoveMethod/Generated/g_OnTouchMoveMethod_HandleInput.txt index eab84c556c..b66d0da64a 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchMoveMethod/Generated/g_OnTouchMoveMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchMoveMethod/Generated/g_OnTouchMoveMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnTouchMoveMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnTouchMoveMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchUpMethod/Generated/g_OnTouchUpMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchUpMethod/Generated/g_OnTouchUpMethod_HandleInput.txt index d2317c800c..57199ecc32 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchUpMethod/Generated/g_OnTouchUpMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchUpMethod/Generated/g_OnTouchUpMethod_HandleInput.txt @@ -5,5 +5,6 @@ partial class OnTouchUpMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnTouchUpMethod); + bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/LongRunningLoad/CommonGenerated/g_osu.Framework.Graphics.Drawable_LongRunningLoad.txt b/osu.Framework.SourceGeneration.Tests/Resources/LongRunningLoad/CommonGenerated/g_osu.Framework.Graphics.Drawable_LongRunningLoad.txt index c3c0ec0238..8003838776 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/LongRunningLoad/CommonGenerated/g_osu.Framework.Graphics.Drawable_LongRunningLoad.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/LongRunningLoad/CommonGenerated/g_osu.Framework.Graphics.Drawable_LongRunningLoad.txt @@ -7,6 +7,7 @@ namespace osu.Framework.Graphics partial class Drawable : global::osu.Framework.Allocation.ISourceGeneratedLongRunningLoadCache { global::System.Type global::osu.Framework.Allocation.ISourceGeneratedLongRunningLoadCache.KnownType => typeof(global::osu.Framework.Graphics.Drawable); + bool global::osu.Framework.Allocation.ISourceGeneratedLongRunningLoadCache.IsLongRunning => false; } } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/LongRunningLoad/LongRunningType/Generated/g_LongRunningType_LongRunningLoad.txt b/osu.Framework.SourceGeneration.Tests/Resources/LongRunningLoad/LongRunningType/Generated/g_LongRunningType_LongRunningLoad.txt index 65a489d3ea..4f19c8dda1 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/LongRunningLoad/LongRunningType/Generated/g_LongRunningType_LongRunningLoad.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/LongRunningLoad/LongRunningType/Generated/g_LongRunningType_LongRunningLoad.txt @@ -5,5 +5,6 @@ partial class LongRunningType : global::osu.Framework.Allocation.ISourceGeneratedLongRunningLoadCache { global::System.Type global::osu.Framework.Allocation.ISourceGeneratedLongRunningLoadCache.KnownType => typeof(global::LongRunningType); + bool global::osu.Framework.Allocation.ISourceGeneratedLongRunningLoadCache.IsLongRunning => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Verifiers/CSharpMultiPhaseSourceGeneratorVerifier_Test.cs b/osu.Framework.SourceGeneration.Tests/Verifiers/CSharpMultiPhaseSourceGeneratorVerifier_Test.cs index 6b4e071cd3..781da8938a 100644 --- a/osu.Framework.SourceGeneration.Tests/Verifiers/CSharpMultiPhaseSourceGeneratorVerifier_Test.cs +++ b/osu.Framework.SourceGeneration.Tests/Verifiers/CSharpMultiPhaseSourceGeneratorVerifier_Test.cs @@ -35,8 +35,6 @@ public Test( driver = CSharpGeneratorDriver.Create(generator = new TSourceGenerator()); driver = driver.WithUpdatedParseOptions(CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion)); - generator.ForceRun = true; - this.commonSources = commonSources; this.commonGenerated = commonGenerated; this.multiPhaseSources = multiPhaseSources; diff --git a/osu.Framework.SourceGeneration.Tests/Verifiers/CSharpSourceGeneratorVerifier_Test.cs b/osu.Framework.SourceGeneration.Tests/Verifiers/CSharpSourceGeneratorVerifier_Test.cs index b45a96e678..a18203f56b 100644 --- a/osu.Framework.SourceGeneration.Tests/Verifiers/CSharpSourceGeneratorVerifier_Test.cs +++ b/osu.Framework.SourceGeneration.Tests/Verifiers/CSharpSourceGeneratorVerifier_Test.cs @@ -1,12 +1,12 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using System; using System.Collections.Generic; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Testing; using Microsoft.CodeAnalysis.Testing; -using Microsoft.CodeAnalysis.Testing.Verifiers; using osu.Framework.SourceGeneration.Generators; namespace osu.Framework.SourceGeneration.Tests.Verifiers @@ -14,14 +14,16 @@ namespace osu.Framework.SourceGeneration.Tests.Verifiers public partial class CSharpSourceGeneratorVerifier where TSourceGenerator : AbstractIncrementalGenerator, new() { - public class Test : CSharpSourceGeneratorTest + public class Test : CSharpSourceGeneratorTest { public LanguageVersion LanguageVersion { get; set; } = LanguageVersion.Default; - protected override IEnumerable GetSourceGenerators() => new[] + protected override IEnumerable GetSourceGenerators() => [typeof(TSourceGenerator)]; + + protected override CompilationOptions CreateCompilationOptions() { - new TSourceGenerator { ForceRun = true }.AsSourceGenerator() - }; + return base.CreateCompilationOptions().WithOptimizationLevel(OptimizationLevel.Release); + } protected override ParseOptions CreateParseOptions() { diff --git a/osu.Framework.SourceGeneration.Tests/osu.Framework.SourceGeneration.Tests.csproj b/osu.Framework.SourceGeneration.Tests/osu.Framework.SourceGeneration.Tests.csproj index 80822f343b..2ef3ebb1a8 100644 --- a/osu.Framework.SourceGeneration.Tests/osu.Framework.SourceGeneration.Tests.csproj +++ b/osu.Framework.SourceGeneration.Tests/osu.Framework.SourceGeneration.Tests.csproj @@ -1,15 +1,15 @@ - + net8.0 - - - - - - - + + + + + + + all runtime; build; native; contentfiles; analyzers diff --git a/osu.Framework.SourceGeneration/Generators/AbstractIncrementalGenerator.cs b/osu.Framework.SourceGeneration/Generators/AbstractIncrementalGenerator.cs index bb88eaf0df..60bd8c9bd9 100644 --- a/osu.Framework.SourceGeneration/Generators/AbstractIncrementalGenerator.cs +++ b/osu.Framework.SourceGeneration/Generators/AbstractIncrementalGenerator.cs @@ -14,11 +14,6 @@ public abstract class AbstractIncrementalGenerator : IIncrementalGenerator { public readonly GeneratorEventDriver EventDriver = new GeneratorEventDriver(); - /// - /// Whether the generator should be forcefully run, even if building as debug. - /// - public bool ForceRun; - public void Initialize(IncrementalGeneratorInitializationContext context) { // Stage 1: Create SyntaxTarget objects for all classes. @@ -28,7 +23,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) (ctx, _) => returnWithEvent(new IncrementalSyntaxTarget((ClassDeclarationSyntax)ctx.Node, ctx.SemanticModel), EventDriver.OnSyntaxTargetCreated)) .Select((t, _) => t.WithName()) .Combine(context.CompilationProvider) - .Where(c => ForceRun || c.Right.Options.OptimizationLevel == OptimizationLevel.Release) + .Where(c => c.Right.Options.OptimizationLevel == OptimizationLevel.Release) .Select((t, _) => t.Item1) .Select((t, _) => returnWithEvent(t.WithSemanticTarget(CreateSemanticTarget), EventDriver.OnSemanticTargetCreated)); diff --git a/osu.Framework/osu.Framework.csproj b/osu.Framework/osu.Framework.csproj index 32889ad1fc..d8ca3abe08 100644 --- a/osu.Framework/osu.Framework.csproj +++ b/osu.Framework/osu.Framework.csproj @@ -39,7 +39,7 @@ - +