-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Don't generate deps or runtimeconfig files when build has failed but _CleanRecordFileWrites is being run #1257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't generate deps or runtimeconfig files when build has failed but _CleanRecordFileWrites is being run #1257
Conversation
|
Definitely a band aid. I think we should run earlier by a different mechanism. From an email thread about a related problem, beforetargets=copyfilestooutputdirectory instead of after build should do the trick. |
nguerrera
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to find a proper fix
…_CleanRecordFileWrites is being run Fixes dotnet#1234
5b39a23 to
8952139
Compare
nguerrera
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now. Please update the description to match the new change.
…emblies aren't found
|
test Ubuntu16.04 Release |
|
@MattGertz for approval Customer scenario Build targeting a version of .NET Framework where the reference assemblies aren't installed. This fixes an issue where an extra (and far more verbose error) would be reported, making it less obvious what the problem was. Bugs this fixes: Workarounds, if any Read the error spew carefully Risk Low Performance impact Low to none - This just changes where in the build we do some work. Is this a regression from a previous update? No Root cause analysis: Some of our targets were running even when the build failed, which caused them to fail (since the output path didn't exist). How was the bug found? Dogfooding |
|
@dotnet-bot test Ubuntu16.04 Release |
|
(Just for bar context -- note that I would probably have punted on this after next week.) |
…206.12 (dotnet#1257) - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20106.12
Fixes #1234
The
GenerateBuildRuntimeConfigurationFilesruns before_CheckForCompileOutputs, so that theFileWritesitems it adds will be picked up by_CleanGetCurrentAndPriorFileWrites, and incremental builds and cleans will work correctly. (See some discussion of this on #381)However, the
CoreBuildtarget invokes the_CleanRecordFileWritestarget when it errors:This means that even if there is a previous build error, we are trying to generate the runtime config files. In the case of #1234, the output path where we would write them hasn't been created, so the task throws an exception.
This PR adds a condition to only run the task if the folder it's going to write to exists. This feels like a band-aid solution though. Is there a better way to structure this which would add the correct
FileWritesitems when needed, but not even run the target ifGetReferenceAssemblyPathsor some other target before-hand has failed?@rainersigwald @AndyGerlicher @nguerrera