Follow-up suggested in the review of #4930: IceRpc.Slice.Tools.targets should take the cleanups made to the Protobuf targets in #4923. The two files mirror each other, and the Protobuf side now has:
_SlicecPruneStaleOutputs with BeforeTargets="Slicec;SlicecClean" only. A BeforeTargets target runs even when its target's Condition is false, and SlicecClean has no condition, so CoreCompile and Clean in the list are redundant.
<Compile Remove="@(_StaleSlicecOutput)" MatchOnMetadata="FullPath" MatchOnMetadataOptions="PathLike" /> instead of the _StaleSlicecOutputRelative item, its comment and the MakeRelative call. MatchOnMetadata matches the SDK glob's relative identities directly. The unquoted MakeRelative(..., %(Identity)) also splits on a comma in the path and fails with MSB4186.
- No
MakeDir in _SlicecWriteOutputManifest: WriteLinesToFile creates the directory, and PrepareForBuild already created it.
- No
Exists guard on the manifest Delete in SlicecClean: Delete skips missing files.
WriteOnlyWhenDifferent="true" on the manifest WriteLinesToFile.
Behavior to keep, verified on the Protobuf side: renaming a Slice file removes the glob's Compile entry and deletes the old outputs; removing the last Slice file still prunes and deletes the manifest; Rebuild and Clean unchanged.
Follow-up suggested in the review of #4930:
IceRpc.Slice.Tools.targetsshould take the cleanups made to the Protobuf targets in #4923. The two files mirror each other, and the Protobuf side now has:_SlicecPruneStaleOutputswithBeforeTargets="Slicec;SlicecClean"only. ABeforeTargetstarget runs even when its target'sConditionis false, andSlicecCleanhas no condition, soCoreCompileandCleanin the list are redundant.<Compile Remove="@(_StaleSlicecOutput)" MatchOnMetadata="FullPath" MatchOnMetadataOptions="PathLike" />instead of the_StaleSlicecOutputRelativeitem, its comment and theMakeRelativecall.MatchOnMetadatamatches the SDK glob's relative identities directly. The unquotedMakeRelative(..., %(Identity))also splits on a comma in the path and fails with MSB4186.MakeDirin_SlicecWriteOutputManifest:WriteLinesToFilecreates the directory, andPrepareForBuildalready created it.Existsguard on the manifestDeleteinSlicecClean:Deleteskips missing files.WriteOnlyWhenDifferent="true"on the manifestWriteLinesToFile.Behavior to keep, verified on the Protobuf side: renaming a Slice file removes the glob's
Compileentry and deletes the old outputs; removing the last Slice file still prunes and deletes the manifest;RebuildandCleanunchanged.