-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎅 Fix the Incremental behavior of our Source Generator (#815)
* Fix that puppy, tomorrow I make the code looks nicer * 🎅 Fixed the SG and everyone should be happy again * fix typo Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> * Replace `record` `ValueTuple`, Remove `IsExternalInit`, `SourceStringExtensions` -> `SourceStringService` * Support Nullable * Add `static` modifier * Re-add `record` * Remove `internal` * Remove `Debugger` logic * Remove duplicate null check * `dotnet format` * Update TextColorToGenerator.cs * Update DockLayoutTests.cs Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>
- Loading branch information
1 parent
0540501
commit 06c2b7c
Showing
3 changed files
with
175 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
src/CommunityToolkit.Maui.SourceGenerators/IsExternalInit.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// <auto-generated> | ||
// This code file has automatically been added by the "IsExternalInit" NuGet package (https://www.nuget.org/packages/IsExternalInit). | ||
// Please see https://github.com/manuelroemer/IsExternalInit for more information. | ||
// | ||
// IMPORTANT: | ||
// DO NOT DELETE THIS FILE if you are using a "packages.config" file to manage your NuGet references. | ||
// Consider migrating to PackageReferences instead: | ||
// https://docs.microsoft.com/en-us/nuget/consume-packages/migrate-packages-config-to-package-reference | ||
// Migrating brings the following benefits: | ||
// * The "IsExternalInit" folder and the "IsExternalInit.cs" file don't appear in your project. | ||
// * The added file is immutable and can therefore not be modified by coincidence. | ||
// * Updating/Uninstalling the package will work flawlessly. | ||
// </auto-generated> | ||
|
||
#region License | ||
// MIT License | ||
// | ||
// Copyright (c) Manuel Römer | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in all | ||
// copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
// SOFTWARE. | ||
#endregion | ||
|
||
#if !ISEXTERNALINIT_DISABLE | ||
#nullable enable | ||
#pragma warning disable | ||
|
||
namespace System.Runtime.CompilerServices | ||
{ | ||
using global::System.Diagnostics; | ||
using global::System.Diagnostics.CodeAnalysis; | ||
|
||
/// <summary> | ||
/// Reserved to be used by the compiler for tracking metadata. | ||
/// This class should not be used by developers in source code. | ||
/// </summary> | ||
/// <remarks> | ||
/// This definition is provided by the <i>IsExternalInit</i> NuGet package (https://www.nuget.org/packages/IsExternalInit). | ||
/// Please see https://github.com/manuelroemer/IsExternalInit for more information. | ||
/// </remarks> | ||
#if !ISEXTERNALINIT_INCLUDE_IN_CODE_COVERAGE | ||
[ExcludeFromCodeCoverage, DebuggerNonUserCode] | ||
#endif | ||
internal static class IsExternalInit | ||
{ | ||
} | ||
} | ||
|
||
#pragma warning restore | ||
#nullable restore | ||
#endif // ISEXTERNALINIT_DISABLE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters