Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
roalyr committed Dec 4, 2024
2 parents 13a23f1 + 1f47e4c commit 01cf433
Show file tree
Hide file tree
Showing 1,207 changed files with 38,048 additions and 9,858 deletions.
20 changes: 5 additions & 15 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Commented out parameters are those with the same value as base LLVM style.
# We can uncomment them if we want to change their value, or enforce the
# chosen value in case the base style changes (last sync: Clang 18.1.8).
# chosen value in case the base style changes (last sync: Clang 17.0.6).
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
Expand All @@ -10,28 +10,24 @@ AlignAfterOpenBracket: DontAlign
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: true
# AlignConsecutiveBitFields:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveDeclarations:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveMacros:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveShortCaseStatements:
# Enabled: false
Expand All @@ -45,15 +41,14 @@ AlignTrailingComments:
OverEmptyLines: 0
# AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
# AllowBreakBeforeNoexceptSpecifier: Never
# AllowShortBlocksOnASingleLine: Never
# AllowShortCaseLabelsOnASingleLine: false
# AllowShortCompoundRequirementOnASingleLine: true
# AllowShortEnumsOnASingleLine: true
# AllowShortFunctionsOnASingleLine: All
# AllowShortIfStatementsOnASingleLine: Never
# AllowShortLambdasOnASingleLine: All
# AllowShortLoopsOnASingleLine: false
# AlwaysBreakAfterDefinitionReturnType: None
# AlwaysBreakAfterReturnType: None
# AlwaysBreakBeforeMultilineStrings: false
# AlwaysBreakTemplateDeclarations: MultiLine
Expand Down Expand Up @@ -81,8 +76,7 @@ AllowAllParametersOfDeclarationOnNextLine: false
# SplitEmptyFunction: true
# SplitEmptyRecord: true
# SplitEmptyNamespace: true
# BreakAdjacentStringLiterals: true
# BreakAfterAttributes: Leave
# BreakAfterAttributes: Never
# BreakAfterJavaFieldAnnotations: false
# BreakArrays: true
# BreakBeforeBinaryOperators: None
Expand Down Expand Up @@ -171,7 +165,6 @@ PackConstructorInitializers: NextLine
# PenaltyBreakComment: 300
# PenaltyBreakFirstLessLess: 120
# PenaltyBreakOpenParenthesis: 0
# PenaltyBreakScopeResolution: 500
# PenaltyBreakString: 1000
# PenaltyBreakTemplateDeclaration: 10
# PenaltyExcessCharacter: 1000000
Expand All @@ -188,7 +181,6 @@ RemoveSemicolon: true
# RequiresExpressionIndentation: OuterScope
# SeparateDefinitionBlocks: Leave
# ShortNamespaceLines: 1
# SkipMacroDefinitionBody: false
# SortIncludes: CaseSensitive
# SortJavaStaticImport: Before
# SortUsingDeclarations: LexicographicNumeric
Expand All @@ -202,14 +194,14 @@ RemoveSemicolon: true
# SpaceBeforeCtorInitializerColon: true
# SpaceBeforeInheritanceColon: true
# SpaceBeforeJsonColon: false
# SpaceBeforeParens: ControlStatements
# SpaceBeforeParensOptions:
# AfterControlStatements: true
# AfterForeachMacros: true
# AfterFunctionDeclarationName: false
# AfterFunctionDefinitionName: false
# AfterIfMacros: true
# AfterOverloadedOperator: false
# AfterPlacementOperator: true
# AfterRequiresInClause: false
# AfterRequiresInExpression: false
# BeforeNonEmptyParentheses: false
Expand All @@ -219,10 +211,8 @@ RemoveSemicolon: true
# SpacesBeforeTrailingComments: 1
# SpacesInAngles: Never
# SpacesInContainerLiterals: true
## Godot TODO: We'll want to use a min of 1, but we need to see how to fix
## our comment capitalization at the same time.
SpacesInLineCommentPrefix:
Minimum: 0
Minimum: 0 # We want a minimum of 1 for comments, but allow 0 for disabled code.
Maximum: -1
# SpacesInParens: Never
# SpacesInParensOptions:
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
/modules/mbedtls/tests/ @godotengine/network @godotengine/tests
/modules/multiplayer/ @godotengine/network
/modules/multiplayer/doc_classes/ @godotengine/network @godotengine/documentation
/modules/multiplayer/tests/ @godotengine/network @godotengine/tests
/modules/upnp/ @godotengine/network
/modules/upnp/doc_classes/ @godotengine/network @godotengine/documentation
/modules/webrtc/ @godotengine/network
Expand Down
6 changes: 5 additions & 1 deletion .github/actions/godot-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ inputs:
default: x64
scons-version:
description: The SCons version to use.
default: 4.8.0
default: 4.8.1

runs:
using: composite
Expand All @@ -29,3 +29,7 @@ runs:
python -c "import sys; print(sys.version)"
python -m pip install scons==${{ inputs.scons-version }}
scons --version
- name: Setup problem matchers
shell: bash
run: echo ::add-matcher::misc/utility/problem-matchers.json
7 changes: 3 additions & 4 deletions .github/workflows/godot_cpp_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: .github
sparse-checkout: |
.github
misc/utility/problem-matchers.json
- name: Checkout godot-cpp
uses: actions/checkout@v4
Expand All @@ -34,9 +36,6 @@ jobs:
- name: Setup Python and SCons
uses: ./.github/actions/godot-deps

- name: Setup GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master

- name: Download GDExtension interface and API dump
uses: ./.github/actions/download-artifact
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@ jobs:
python-version: 3.8
scons-version: 4.0

- name: Setup GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master

- name: Compilation
uses: ./.github/actions/godot-build
with:
Expand All @@ -158,6 +155,9 @@ jobs:
- name: Build .NET solutions
if: matrix.build-mono
run: |
# FIXME: C# warnings should be properly handled eventually, but we don't want to clutter
# the GitHub Actions annotations, so remove the associated problem matcher for now.
echo "::remove-matcher owner=msvc::"
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
- name: Prepare artifact
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/windows_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,6 @@ jobs:
- name: Extract pre-built ANGLE static libraries
run: Expand-Archive -Force angle/angle.zip ${{ github.workspace }}/

- name: Setup MSVC problem matcher
if: matrix.compiler == 'msvc'
uses: ammaraskar/msvc-problem-matcher@master

- name: Setup GCC problem matcher
if: matrix.compiler != 'msvc'
uses: ammaraskar/gcc-problem-matcher@master

- name: Compilation
uses: ./.github/actions/godot-build
with:
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ compile_commands.json
platform/windows/godot_res.res

# Ninja build files
build.ninja
.ninja
*.ninja
.ninja/
run_ninja_env.bat

# Generated by Godot binary
Expand Down Expand Up @@ -216,6 +216,7 @@ xcuserdata/
*.xcscmblueprint
*.xccheckout
*.xcodeproj/*
!misc/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj

##############################
### Visual Studio specific ###
Expand Down
7 changes: 4 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,11 @@ repos:
.*\.patch$|
.*\.out$|
modules/gdscript/tests/scripts/parser/features/mixed_indentation_on_blank_lines\.gd$|
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment\.notest\.gd$|
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline\.notest\.gd$|
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment\.norun\.gd$|
modules/gdscript/tests/scripts/parser/warnings/empty_file_newline\.norun\.gd$|
platform/android/java/editor/src/main/java/com/android/.*|
platform/android/java/lib/src/com/google/.*
platform/android/java/lib/src/com/google/.*|
tests/data/.*\.bin$
)
- id: dotnet-format
Expand Down
7 changes: 6 additions & 1 deletion COPYRIGHT.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ License: MPL-2.0

Files: ./thirdparty/clipper2/
Comment: Clipper2
Copyright: 2010-2023, Angus Johnson
Copyright: 2010-2024, Angus Johnson
License: BSL-1.0

Files: ./thirdparty/cvtt/
Expand Down Expand Up @@ -334,6 +334,11 @@ Comment: WebP codec
Copyright: 2010, Google Inc.
License: BSD-3-clause

Files: ./thirdparty/manifold/
Comment: Manifold
Copyright: 2020-2024, The Manifold Authors
License: Apache-2.0

Files: ./thirdparty/mbedtls/
Comment: Mbed TLS
Copyright: The Mbed TLS Contributors
Expand Down
23 changes: 9 additions & 14 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ opts.Add(BoolVariable("use_volk", "Use the volk library to load the Vulkan loade
opts.Add(BoolVariable("disable_exceptions", "Force disabling exception handling code", True))
opts.Add("custom_modules", "A list of comma-separated directory paths containing custom modules to build.", "")
opts.Add(BoolVariable("custom_modules_recursive", "Detect custom modules recursively for each specified path.", True))
opts.Add(BoolVariable("swappy", "Use Swappy Frame Pacing Library in Android builds.", False))

# Advanced options
opts.Add(
Expand Down Expand Up @@ -383,8 +382,7 @@ if env["platform"] not in platform_list:

# Add platform-specific options.
if env["platform"] in platform_opts:
for opt in platform_opts[env["platform"]]:
opts.Add(opt)
opts.AddVariables(*platform_opts[env["platform"]])

# Platform-specific flags.
# These can sometimes override default options, so they need to be processed
Expand Down Expand Up @@ -440,12 +438,11 @@ for name, path in modules_detected.items():
else:
enabled = False

opts.Add(BoolVariable("module_" + name + "_enabled", "Enable module '%s'" % (name,), enabled))
opts.Add(BoolVariable(f"module_{name}_enabled", f"Enable module '{name}'", enabled))

# Add module-specific options.
try:
for opt in config.get_opts(env["platform"]):
opts.Add(opt)
opts.AddVariables(*config.get_opts(env["platform"]))
except AttributeError:
pass

Expand Down Expand Up @@ -580,7 +577,7 @@ env.Append(RCFLAGS=env.get("rcflags", "").split())
# Feature build profile
env.disabled_classes = []
if env["build_profile"] != "":
print('Using feature build profile: "{}"'.format(env["build_profile"]))
print(f'Using feature build profile: "{env["build_profile"]}"')
import json

try:
Expand All @@ -592,7 +589,7 @@ if env["build_profile"] != "":
for c in dbo:
env[c] = dbo[c]
except json.JSONDecodeError:
print_error('Failed to open feature build profile: "{}"'.format(env["build_profile"]))
print_error(f'Failed to open feature build profile: "{env["build_profile"]}"')
Exit(255)

# 'dev_mode' and 'production' are aliases to set default options if they haven't been
Expand Down Expand Up @@ -854,8 +851,6 @@ else: # GCC, Clang

if methods.using_gcc(env):
common_warnings += ["-Wshadow", "-Wno-misleading-indentation"]
if cc_version_major == 7: # Bogus warning fixed in 8+.
common_warnings += ["-Wno-strict-overflow"]
if cc_version_major < 11:
# Regression in GCC 9/10, spams so much in our variadic templates
# that we need to outright disable it.
Expand Down Expand Up @@ -931,7 +926,7 @@ env.module_icons_paths = []
env.doc_class_path = platform_doc_class_path

for name, path in modules_detected.items():
if not env["module_" + name + "_enabled"]:
if not env[f"module_{name}_enabled"]:
continue
sys.path.insert(0, path)
env.current_module = name
Expand Down Expand Up @@ -1044,13 +1039,13 @@ if env["compiledb"]:

if env["ninja"]:
if env.scons_version < (4, 2, 0):
print_error("The `ninja=yes` option requires SCons 4.2 or later, but your version is %s." % scons_raw_version)
print_error(f"The `ninja=yes` option requires SCons 4.2 or later, but your version is {scons_raw_version}.")
Exit(255)

SetOption("experimental", "ninja")
env["NINJA_FILE_NAME"] = env["ninja_file"]
env["NINJA_DISABLE_AUTO_RUN"] = not env["ninja_auto_run"]
env.Tool("ninja", "build.ninja")
env.Tool("ninja", env["ninja_file"])

# Threads
if env["threads"]:
Expand Down Expand Up @@ -1112,7 +1107,7 @@ atexit.register(print_elapsed_time)


def purge_flaky_files():
paths_to_keep = ["build.ninja"]
paths_to_keep = [env["ninja_file"]]
for build_failure in GetBuildFailures():
path = build_failure.node.path
if os.path.isfile(path) and path not in paths_to_keep:
Expand Down
Loading

0 comments on commit 01cf433

Please sign in to comment.