Skip to content

Commit

Permalink
That's relativity folks
Browse files Browse the repository at this point in the history
  • Loading branch information
Perksey committed Jan 1, 2024
1 parent 130a663 commit 4684c22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 5 additions & 2 deletions sources/SilkTouch/Clang/ResponseFile.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using ClangSharp;
using ClangSharp.Interop;
Expand Down Expand Up @@ -27,15 +28,15 @@ CXTranslationUnit_Flags TranslationFlags
)
{
internal string FlatString =>
$"{GeneratorConfiguration.OutputLocation}:{GeneratorConfiguration.TestOutputLocation}:"
$"{R(GeneratorConfiguration.OutputLocation)}:{R(GeneratorConfiguration.TestOutputLocation)}:"
+ $"{GeneratorConfiguration.GenerateLatestCode}:{GeneratorConfiguration.GeneratePreviewCode}:"
+ $"{GeneratorConfiguration.GenerateCompatibleCode}:{GeneratorConfiguration.Language}:"
+ $"{GeneratorConfiguration.DefaultClass}:{GeneratorConfiguration.DefaultNamespace}:"
+ $"{string.Join(',', GeneratorConfiguration.ExcludedNames)}:{GeneratorConfiguration.HeaderText}:"
+ $"{string.Join(',', GeneratorConfiguration.IncludedNames)}:{GeneratorConfiguration.LanguageStandard}:"
+ $"{GeneratorConfiguration.LibraryPath}:{GeneratorConfiguration.LogExclusions}:"
+ $"{GeneratorConfiguration.OutputMode}:{string.Join(',', GeneratorConfiguration.RemappedNames)}:"
+ $"{string.Join(',', GeneratorConfiguration.TraversalNames)}:"
+ $"{string.Join(',', GeneratorConfiguration.TraversalNames.Select(R))}:"
+ $"{string.Join(',', GeneratorConfiguration.WithAttributes)}:"
+ $"{string.Join(',', GeneratorConfiguration.WithClasses)}:{string.Join(',', GeneratorConfiguration.WithGuids)}:"
+ $"{string.Join(',', GeneratorConfiguration.WithNamespaces)}:"
Expand Down Expand Up @@ -68,4 +69,6 @@ CXTranslationUnit_Flags TranslationFlags
+ $"{string.Join(',', GeneratorConfiguration.WithSuppressGCTransitions)}:"
+ $"{GeneratorConfiguration.DontUseUsingStaticsForEnums}:"
+ $"{GeneratorConfiguration.GenerateSetsLastSystemErrorAttribute}";

private static string R(string p) => Path.GetRelativePath(Environment.CurrentDirectory, p);
}
1 change: 0 additions & 1 deletion sources/SilkTouch/SilkTouchGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ public async Task<GeneratedSyntax> GenerateSyntaxAsync(
.Where(x => x.Key.StartsWith($"Jobs:{key}", StringComparison.OrdinalIgnoreCase))
) + string.Join(',', rsps.Select(x => x.FlatString))
)
.Replace(Environment.CurrentDirectory, "...", StringComparison.OrdinalIgnoreCase)
.Replace('\\', '/')
.ToLower();
logger.LogTrace("Cache key for job (before hashing): {}", cacheKey);
Expand Down

0 comments on commit 4684c22

Please sign in to comment.