Skip to content

Conversation

@radical
Copy link
Member

@radical radical commented Jan 18, 2018

The @(CopyUpToDateMarker) file is not added to @(FileWrites), so it gets
left behind after a Clean.

https://bugzilla.xamarin.com/show_bug.cgi?id=58174

  • This is a Xamarin.Android bug, but the same issue is reproducible with
    regular .net projects too

@radical radical requested a review from rainersigwald January 18, 2018 21:22
Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should totally do this. Nit on the implementation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you instead do this?

     <Touch Files="@(CopyUpToDateMarker)"
             AlwaysCreate="true"
             Condition="'@(ReferencesCopiedInThisBuild)' != ''">
       <Output TaskParameter="TouchedFiles" ItemName="FileWritesShareable"/>
     </Touch>

That is more parallel to the copy task above, and it might be infinitesimally faster to avoid the additional implied item creation below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is definitely better. BTW, why *Shareable? IIUC, this file should get removed if the project's build outputs are being removed. Please correct me if I'm wrong.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, use FileWrites, not -Shareable. That naming convention never really sunk in for me and I find it confusing every time I have to think about it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For posterity: I was very, very wrong on this: #6917.

The @(CopyUpToDateMarker) file is not added to @(FileWrites), so it gets
left behind after a Clean.

https://bugzilla.xamarin.com/show_bug.cgi?id=58174
- This is a Xamarin.Android bug, but the same issue is reproducible with
  regular .net projects too
@radical
Copy link
Member Author

radical commented Jan 19, 2018

Updated.

@AndyGerlicher
Copy link
Contributor

Looks good, thanks!

@AndyGerlicher AndyGerlicher merged commit f2224dc into dotnet:master Jan 19, 2018
@radical radical deleted the fix-clean branch January 22, 2018 18:17
radical added a commit to radical/msbuild that referenced this pull request Jan 30, 2018
The @(CopyUpToDateMarker) file is not added to @(FileWrites), so it gets
left behind after a Clean.

https://bugzilla.xamarin.com/show_bug.cgi?id=58174
- This is a Xamarin.Android bug, but the same issue is reproducible with
  regular .net projects too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants