godot icon indicating copy to clipboard operation
godot copied to clipboard

[Editor] Prevent `TOOLS` .Net DefineConstants being overriden by the user

Open Delsin-Yu opened this issue 1 year ago • 4 comments

Related #78513 Closes #98124

As mentioned here, the TOOLS compiler symbol is crucial for C# editor functionality; the absence of TOOLS can lead to data loss and editor malfunctions (all C# script exports become null and Ineditable) without a proper error message.

This PR ensures that the TOOLS are always included in the editor, so even if the user overrides the DefineConstants (by accident or intentionally), the rest of the dotnet editor stays functional.

Thanks Raulsntos for suggesting the better solution.

Delsin-Yu avatar Oct 13 '24 21:10 Delsin-Yu

Do the reviewers forget this PR? Or it should be postponed to 4.5, and the maintainers forgot to edit its milestone.

Delsin-Yu avatar Feb 20 '25 20:02 Delsin-Yu

Do the reviewers forget this PR? Or it should be postponed to 4.5, and the maintainers forgot to edit its milestone.

I don't know if they forgot or were just too busy, but it's a good opportunity to put it back on the radar, CC @godotengine/dotnet.

It should indeed be moved to the 4.5 milestone as we're in full release freeze for 4.4 now with the release candidate, we just haven't had time to re-triage all PRs and issues in the 4.4 milestone.

akien-mga avatar Feb 20 '25 22:02 akien-mga

Thanks for the info; since the TOOLS is a must-have, I think Sdk.targets is what I'm looking for; I wasn't aware that's a viable option due to a lack of understanding of the MSBuild.

~~I will modify the title and implementation of this PR to the suggested approach.~~

Speaking about the attention, what would be a comfortable interval to notify the dotnet team in the dev chat? I don't want to introduce inconveniences by spamming the same information too frequently.

Delsin-Yu avatar Feb 22 '25 15:02 Delsin-Yu

I have finished implementing the suggested approach and renamed the PR title accordingly.

Delsin-Yu avatar Feb 22 '25 16:02 Delsin-Yu

Thanks!

Repiteo avatar Mar 07 '25 21:03 Repiteo