Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit51fe090

Browse files
authored
Work around corecompile.cache bugs (#3833)
1 parent9925e99 commit51fe090

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

‎src/fsharp/FSharp.Build/Microsoft.FSharp.Targets‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,48 @@ this file.
328328
============================================================
329329
-->
330330

331+
<!--
332+
============================================================
333+
Override _GenerateCompileDependencyCache
334+
335+
Workaround for Issue #3824 and #3739
336+
337+
MsBuild does some optimisations around CompileInputs
338+
The project system erroneously uses this to determine whether
339+
to notify language services of CommandLine Information changes.
340+
C# accidently changes it's file lists every build ... and so
341+
gets the notifications.
342+
F# doesn't ... so we don't get CL notifications following rebuilds
343+
or build.
344+
This workaround is basically to adds the current time (in ticks)
345+
into the hash of CoreCompileInputs.cache at design time so that
346+
we always appear to have different options and overcome the
347+
brokencache behaviour.
348+
349+
Both msbuild and the project-system will fix their code at which time
350+
this can go away.
351+
352+
============================================================
353+
-->
354+
<TargetName="_GenerateCompileDependencyCache"DependsOnTargets="ResolveAssemblyReferences"Condition="'$(DesignTimeBuild)' == 'true'">
355+
<ItemGroup>
356+
<CustomAdditionalCompileInputsInclude="$(IntermediateOutputPath)$(MSBuildProjectFile).CoreCompileInputs.cache" />
357+
<CoreCompileCacheRemove="@(Compile)" />
358+
<CoreCompileCacheInclude="@(ReferencePath)" />
359+
<CoreCompileCacheInclude="$([System.DateTime]::Now.Ticks)" />
360+
</ItemGroup>
361+
362+
<HashItemsToHash="@(CoreCompileCache)">
363+
<OutputTaskParameter="HashResult"PropertyName="CoreCompileDependencyHash" />
364+
</Hash>
365+
366+
<WriteLinesToFileLines="$(CoreCompileDependencyHash)"File="$(IntermediateOutputPath)$(MSBuildProjectFile).CoreCompileInputs.cache"Overwrite="True"WriteOnlyWhenDifferent="True" />
367+
368+
<ItemGroup>
369+
<FileWritesInclude="$(IntermediateOutputPath)$(MSBuildProjectFile).CoreCompileInputs.cache" />
370+
</ItemGroup>
371+
</Target>
372+
331373
<TargetName="GenerateTargetFrameworkMonikerAttribute"BeforeTargets="BeforeCompile"DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths"Inputs="$(MSBuildThisFileFullPath)"Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)"Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
332374

333375
<PropertyGroup>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp