Skip to content
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
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
<PackageVersion Include="Microsoft.VisualStudio.SolutionPersistence" Version="1.0.52" />
<PackageVersion Include="NuGet.Versioning" Version="7.6.0" />
<PackageVersion Include="Octokit" Version="14.0.0" />
<PackageVersion Include="PolyKit.Embedded" Version="3.0.27-preview" />
<PackageVersion Include="Spectre.Console" Version="0.57.2" />
</ItemGroup>

<!-- Development dependencies-->
<ItemGroup>
<PackageVersion Include="PolySharp" Version="1.16.0" />
</ItemGroup>

<!-- Test dependencies-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
<TargetFramework>$(SourceGeneratorsTfm)</TargetFramework>
<CLSCompliant>false</CLSCompliant>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>

<!-- Restrict PolySharp to the polyfills this project actually uses; add types here as new needs arise.
Mind the polyfills' own dependencies (e.g. System.Index needs the nullable attributes, which would
collide with the BCL's in projects that see our internals through InternalsVisibleTo). -->
<PolySharpIncludeGeneratedTypes>System.Runtime.CompilerServices.IsExternalInit</PolySharpIncludeGeneratedTypes>
</PropertyGroup>

<ItemGroup>
Expand All @@ -18,7 +23,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" PrivateAssets="all" />
<PackageReference Include="PolyKit.Embedded" PrivateAssets="all" />
<PackageReference Include="PolySharp" PrivateAssets="all" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static bool TryParse(string? str, out object? result)
return true;
}

if (str!.Length > 1 && str[0] == '"' && str[^1] == '"')
if (str!.Length > 1 && str[0] == '"' && str[str.Length - 1] == '"')
{
result = str.Substring(1, str.Length - 2).Replace("\"\"", "\"");
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
</ItemGroup>

<ItemGroup>
<!-- The alias keeps the project's internals (which include PolyKit polyfills, made visible by InternalsVisibleTo)
out of the global namespace, where they would clash with the framework's own types. -->
<ProjectReference Include="..\..\src\Buildvana.Sdk.SourceGenerators\Buildvana.Sdk.SourceGenerators.csproj" Aliases="Generators" />
<ProjectReference Include="..\..\src\Buildvana.Sdk.SourceGenerators\Buildvana.Sdk.SourceGenerators.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright (C) Tenacom and Contributors. Licensed under the MIT license.
// See the LICENSE file in the project root for full license information.

extern alias Generators;

using Generators::Buildvana.Sdk.SourceGenerators.Internal;
using Buildvana.Sdk.SourceGenerators.Internal;

internal sealed class ConstantValueParserTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// Copyright (C) Tenacom and Contributors. Licensed under the MIT license.
// See the LICENSE file in the project root for full license information.

extern alias Generators;

using System.Globalization;
using Generators::Buildvana.Sdk.SourceGenerators;
using Buildvana.Sdk.SourceGenerators;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;

Expand Down