-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
C#: Discontinue GodotNuGetFallbackFolder
#73984
Conversation
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.
I don't think we want to get rid of BuildAsync
. The original plan was to eventually implement building C# projects in the background (see godotengine/godot-proposals#849).
About the argumentList, we were using Collection
so we can add arguments directly to ProcessStartInfo.ArgumentList
without having to allocate a temporary list. But now you are allocating a Collection
only to convert it to an array later.
I feel like it's a bit weird to have a BuildArguments
method that is constructing arguments for a Process, and then ExecuteDotNet
which is a wrapper of dotnet CLI that hides the Process inside. I think we should either revert to the Build/LaunchBuild
methods that takes the constructed BuildInfo
and just start the Process, or fully commit to creating a dotnet CLI wrapper (but not sure if it's worth going that far).
As for the NuGet source, I don't think this is the path we want to take. The NuGet packages should be available in NuGet.org and we plan to stop distributing the NuGet packages with the Godot binary in the future (when we implement Editor unification in a future 4.x release). I think it's good to remove the GodotNuGetFallbackFolder
and Godot.Offline.Config
though, and I was planning to do it as part of Editor unification.
The issue with removing the nuget fallback entirely is that this means that dev builds without push-nupkgs-local are broken and that official builds must push the packages to nuget immediately, and i wasn't sure if this was the direction things were suppose to go. re: the whole refactor, if we don't add more uses of the dotnet command that whole refactor isn't really necessary for this PR, tho I think that code still deserves some cleanup in an other PR (at least deduplicate the LaunchBuild & LaunchPublish methods). If the plan is to entirely rely on the online packages this whole PR becomes a lot simpler. |
I'm fine with this change for 3.x, but for 4.x I would prefer to just get rid of this entirely and not distribute the nupkgs with Godot.
That's the workflow we recommend, and it's the reason I added |
7a93f7e
to
1aa8cf4
Compare
GodotNuGetFallbackFolder
in favor of using Tools/nupkgs
directlyGodotNuGetFallbackFolder
Editor unification is not required for this. I don't know if our setup logic for the fallback folder requires the nupkgs to be available. If not, we could stop distributing the nupkgs right away. |
Sorry if I made it sound like it was. What I meant was that, we would have to stop distributing the NuGet packages when that happens, since users that don't use C# won't need them. So it fits well together IMO, but it should be possible to do it earlier. |
Not sure which logic exactly you are referring to, but the editor code that populated the |
Maybe referring to But I think as long as the directory exists, The godot/modules/mono/build_scripts/build_assemblies.py Lines 320 to 321 in 30884ee
Also take a look at
We build Godot as described in Compiling with .NET but maybe with a few different flags or environment variables to set the Godot version, then the resulting nupkgs are published to NuGet.org by the |
I meant this: godot/modules/mono/editor/GodotTools/GodotTools/Build/NuGetUtils.cs Lines 235 to 251 in 0cd1483
It does indeed seem to require the files to exist. We don't check if the file exists, so This PR solves that as it get rids of all of that. |
No, we can't do that. That folder contains the C# loader ( |
1aa8cf4
to
c5e94a6
Compare
c5e94a6
to
27124ed
Compare
Thanks! |
There is no real need extract the nupkgs, NuGet will do this automatically, as when using a folder with the nupkgs as a source.This will also removes the copying offline packages build phase and stop some cache issues with local builds.
While testing the first commit, I found the way sources were added to just no work at all, so switched to using thedotnet nuget add/remove source
commands to manage the package source in the third commit and in the process I ended up refactoring the way the dotnet command is called to deduplicate that code.Get rid of the
GodotNuGetFallbackFolder
and rely on packages distributed via Nuget.org instead (or the--push-nupkgs-local
option for source builds)Atm this PR doesn't try to remove the
GodotSharp/Tools/nupks
folder to avoid breaking the build system. (also it should be possible to remove theGodotSharp/Api
folder as well, but just doing that breaks the editor)