Skip to content
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

Split CleanBinaries target #9357

Closed
wants to merge 1 commit into from
Closed

Split CleanBinaries target #9357

wants to merge 1 commit into from

Conversation

Tim-Pohlmann
Copy link
Contributor

Comment on lines +67 to +69
<BinariesToDelete Include="$(BinariesFolder)\Google.Protobuf.dll" />
<BinariesToDelete Include="$(BinariesFolder)\SonarAnalyzer.dll" />
<BinariesToDelete Include="$(BinariesFolder)\SonarAnalyzer.CFG.dll" />
Copy link
Contributor

Choose a reason for hiding this comment

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

This will collide with VB and doesn't solve the problem of deleting files that should no longer be there. We'll need to create subdirs per analyzer if you want to split this.

The deletion needs to solve the problem of SonarAnalyzer.dll was renamed to SonarAnalyzer.Something.dll but local packaging is still, by accident, or funky checked out commit, picking up the old file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we change the file structure we need to update the consumers. Is it only the java plugin?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is also this solution but it requires a lot more scaffolding. On the other hand, it would probably the cleanest.

Copy link
Contributor

Choose a reason for hiding this comment

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

Java plugin, NuSpec files, .NET ITs AFAICT. Search for the well-known filenames in the repo should do the trick of finding what I missed

Copy link
Contributor

Choose a reason for hiding this comment

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

Such "helper projects" will cause more confusion and might introduce some troublesome dependencies.

@@ -9,9 +9,4 @@
<BinariesFolderInternal>$(BinariesFolder)internal\</BinariesFolderInternal>
</PropertyGroup>

<!-- The condition causes the target to only be executed once during the outer build step.
Copy link
Contributor

Choose a reason for hiding this comment

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

The idea with setting a flag here didn't work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What was the exact idea? I remember trying something and it didn't work.

Copy link
Contributor

Choose a reason for hiding this comment

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

Basically add Condition="$(SomeCustomFlag)!='True'" (wrong syntax, just illustrative) and then inside the target
<PropertyGroup><SomeCustomFlag>True</....

That will try to execute it just once. I'm not sure if it will work as expected. That should be the smallest change. The need for maintaining this on many different files is scattered => hard to keep track of.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it does not work. The flag is not persisted.

@Tim-Pohlmann Tim-Pohlmann deleted the Tim/CleanBinaries branch June 19, 2024 12:55
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.

2 participants