From 38734d36b89543dee781c5583f8eea4a9f0208e9 Mon Sep 17 00:00:00 2001 From: "K. S. Ernest (iFire) Lee" Date: Thu, 19 Dec 2024 17:00:51 -0800 Subject: [PATCH] git subrepo pull (merge) --force --branch=groups-4.4.2024-12-20T010013Z godot subrepo: subdir: "godot" merged: "79cae3c1ed" upstream: origin: "https://github.com/V-Sekai/godot.git" branch: "groups-4.4.2024-12-20T010013Z" commit: "79cae3c1ed" git-subrepo: version: "0.4.9" origin: "https://github.com/ingydotnet/git-subrepo" commit: "cce3d93" --- godot/.github/workflows/linux_builds.yml | 2 +- godot/.gitrepo | 6 +++--- godot/modules/mono/build_scripts/build_assemblies.py | 12 +++++++++--- .../Core/Bridge/ScriptManagerBridge.types.cs | 4 +++- godot/platform/windows/detect.py | 2 +- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/godot/.github/workflows/linux_builds.yml b/godot/.github/workflows/linux_builds.yml index 6b786a7b..e5c28cab 100644 --- a/godot/.github/workflows/linux_builds.yml +++ b/godot/.github/workflows/linux_builds.yml @@ -176,7 +176,7 @@ jobs: if: matrix.build-mono run: | dotnet --info - ./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd + ./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd --werror - name: Prepare artifact if: matrix.artifact diff --git a/godot/.gitrepo b/godot/.gitrepo index 45af9723..cc4a8c03 100644 --- a/godot/.gitrepo +++ b/godot/.gitrepo @@ -5,8 +5,8 @@ ; [subrepo] remote = https://github.com/V-Sekai/godot.git - branch = groups-4.4.2024-12-18T182458Z - commit = bc496968c2caca58e3238bf5c3b9142b67d9512b - parent = 69950ef9a8943198fef28a30d8596c51630985fe + branch = groups-4.4.2024-12-20T010013Z + commit = 79cae3c1edf7d7b31689ff6f52b1a2b1126ec11f + parent = 35b42efeec650a063eec460a18c37e23520be098 method = merge cmdver = 0.4.9 diff --git a/godot/modules/mono/build_scripts/build_assemblies.py b/godot/modules/mono/build_scripts/build_assemblies.py index bdb0ce89..862a4797 100755 --- a/godot/modules/mono/build_scripts/build_assemblies.py +++ b/godot/modules/mono/build_scripts/build_assemblies.py @@ -194,7 +194,7 @@ def run_msbuild(tools: ToolsLocation, sln: str, chdir_to: str, msbuild_args: Opt return subprocess.call(args, env=msbuild_env, cwd=chdir_to) -def build_godot_api(msbuild_tool, module_dir, output_dir, push_nupkgs_local, precision, no_deprecated): +def build_godot_api(msbuild_tool, module_dir, output_dir, push_nupkgs_local, precision, no_deprecated, werror): target_filenames = [ "GodotSharp.dll", "GodotSharp.pdb", @@ -219,6 +219,8 @@ def build_godot_api(msbuild_tool, module_dir, output_dir, push_nupkgs_local, pre args += ["/p:GodotFloat64=true"] if no_deprecated: args += ["/p:GodotNoDeprecated=true"] + if werror: + args += ["/p:TreatWarningsAsErrors=true"] sln = os.path.join(module_dir, "glue/GodotSharp/GodotSharp.sln") exit_code = run_msbuild(msbuild_tool, sln=sln, chdir_to=module_dir, msbuild_args=args) @@ -339,13 +341,15 @@ def generate_sdk_package_versions(): def build_all( - msbuild_tool, module_dir, output_dir, godot_platform, dev_debug, push_nupkgs_local, precision, no_deprecated + msbuild_tool, module_dir, output_dir, godot_platform, dev_debug, push_nupkgs_local, precision, no_deprecated, werror ): # Generate SdkPackageVersions.props and VersionDocsUrl constant generate_sdk_package_versions() # Godot API - exit_code = build_godot_api(msbuild_tool, module_dir, output_dir, push_nupkgs_local, precision, no_deprecated) + exit_code = build_godot_api( + msbuild_tool, module_dir, output_dir, push_nupkgs_local, precision, no_deprecated, werror + ) if exit_code != 0: return exit_code @@ -402,6 +406,7 @@ def main(): default=False, help="Build GodotSharp without using deprecated features. This is required, if the engine was built with 'deprecated=no'.", ) + parser.add_argument("--werror", action="store_true", default=False, help="Treat compiler warnings as errors.") args = parser.parse_args() @@ -427,6 +432,7 @@ def main(): push_nupkgs_local, args.precision, args.no_deprecated, + args.werror, ) sys.exit(exit_code) diff --git a/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.types.cs b/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.types.cs index aca9595e..4aa887a4 100644 --- a/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.types.cs +++ b/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.types.cs @@ -12,6 +12,8 @@ namespace Godot.Bridge; public static partial class ScriptManagerBridge { + [SuppressMessage("Design", "CA1001", MessageId = "Types that own disposable fields should be disposable", + Justification = "Not applicable. The class functions as a persistent singleton.")] private class ScriptTypeBiMap { public readonly ReaderWriterLockSlim ReadWriteLock = new(LockRecursionPolicy.SupportsRecursion); @@ -66,7 +68,7 @@ private class PathScriptTypeBiMap private System.Collections.Generic.Dictionary _pathTypeMap = new(); private System.Collections.Generic.Dictionary _typePathMap = new(); - public IReadOnlyCollection Paths => _pathTypeMap.Keys; + public System.Collections.Generic.Dictionary.KeyCollection Paths => _pathTypeMap.Keys; public void Add(string scriptPath, Type scriptType) { diff --git a/godot/platform/windows/detect.py b/godot/platform/windows/detect.py index dbdc560a..33b0f774 100644 --- a/godot/platform/windows/detect.py +++ b/godot/platform/windows/detect.py @@ -807,7 +807,7 @@ def configure_mingw(env: "SConsEnvironment"): env.Append(CCFLAGS=san_flags) env.Append(LINKFLAGS=san_flags) - if env["use_llvm"] and os.name == "nt" and methods._colorize: + if env["use_llvm"] and os.name == "nt" and methods._can_color: env.Append(CCFLAGS=["$(-fansi-escape-codes$)", "$(-fcolor-diagnostics$)"]) if get_is_ar_thin_supported(env):