Skip to content

Commit ff4838a

Browse files
authored
Merge pull request #518 from godot-rust/feature/godot-4.2
Update to Godot 4.2 by default
2 parents 0b164ab + 4d1687b commit ff4838a

File tree

195 files changed

+275
-43
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+275
-43
lines changed

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) godot-rust; Bromeon and contributors.
12
# This Source Code Form is subject to the terms of the Mozilla Public
23
# License, v. 2.0. If a copy of the MPL was not distributed with this
34
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

.github/composite/godot-install/action.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) godot-rust; Bromeon and contributors.
12
# This Source Code Form is subject to the terms of the Mozilla Public
23
# License, v. 2.0. If a copy of the MPL was not distributed with this
34
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
@@ -43,12 +44,10 @@ runs:
4344
# If a specific Godot revision should be used, rather than latest, use this:
4445
# curl https://nightly.link/Bromeon/godot4-nightly/actions/runs/4910907653/${{ inputs.artifact-name }}.zip \
4546
run: |
46-
if [[ $ARTIFACT_NAME == *"stable"* ]]; then
47-
url="https://nightly.link/Bromeon/godot4-nightly/workflows/compile-godot-stable/master/$ARTIFACT_NAME.zip"
48-
elif [[ $ARTIFACT_NAME == *"4.0.4"* ]]; then
49-
url="https://nightly.link/Bromeon/godot4-nightly/workflows/compile-godot-4.0/master/$ARTIFACT_NAME.zip"
50-
else
47+
if [[ $ARTIFACT_NAME == *"nightly"* ]]; then
5148
url="https://nightly.link/Bromeon/godot4-nightly/workflows/compile-godot-nightly/master/$ARTIFACT_NAME.zip"
49+
else
50+
url="https://nightly.link/Bromeon/godot4-nightly/workflows/compile-godot-stable/master/$ARTIFACT_NAME.zip"
5251
fi
5352
5453
curl "$url" -Lo artifact.zip --retry 3

.github/composite/godot-itest/action.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) godot-rust; Bromeon and contributors.
12
# This Source Code Form is subject to the terms of the Mozilla Public
23
# License, v. 2.0. If a copy of the MPL was not distributed with this
34
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

.github/composite/llvm/action.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) godot-rust; Bromeon and contributors.
12
# This Source Code Form is subject to the terms of the Mozilla Public
23
# License, v. 2.0. If a copy of the MPL was not distributed with this
34
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

.github/composite/rust/action.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) godot-rust; Bromeon and contributors.
12
# This Source Code Form is subject to the terms of the Mozilla Public
23
# License, v. 2.0. If a copy of the MPL was not distributed with this
34
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

.github/other/licenserc.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) godot-rust; Bromeon and contributors.
12
# This Source Code Form is subject to the terms of the Mozilla Public
23
# License, v. 2.0. If a copy of the MPL was not distributed with this
34
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
@@ -6,7 +7,14 @@
67

78
header:
89
license:
9-
spdx-id: MPL-2.0
10+
spdx-id: 'MPL-2.0'
11+
# Note: There would be fields 'copyright-owner', 'copyright-year' and 'software-name', however these infos are not substituted into
12+
# the MPL-2.0 header, because the latter needs additional (external) copyright. Thus, content is overridden manually.
13+
content: |
14+
Copyright (c) godot-rust; Bromeon and contributors.
15+
This Source Code Form is subject to the terms of the Mozilla Public
16+
License, v. 2.0. If a copy of the MPL was not distributed with this
17+
file, You can obtain one at https://mozilla.org/MPL/2.0/.
1018
1119
paths:
1220
- '**/*.rs'

.github/other/retry.sh

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
# Copyright (c) godot-rust; Bromeon and contributors.
23
# This Source Code Form is subject to the terms of the Mozilla Public
34
# License, v. 2.0. If a copy of the MPL was not distributed with this
45
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

.github/workflows/full-ci.yml

+34-25
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) godot-rust; Bromeon and contributors.
12
# This Source Code Form is subject to the terms of the Mozilla Public
23
# License, v. 2.0. If a copy of the MPL was not distributed with this
34
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
@@ -170,18 +171,17 @@ jobs:
170171
godot-binary: godot.macos.editor.dev.double.x86_64
171172
rust-extra-args: --features godot/custom-godot,godot/double-precision
172173

173-
- name: macos-4.1
174+
- name: macos-4.2
174175
os: macos-12
175-
artifact-name: macos-stable
176+
artifact-name: macos-4.2
176177
godot-binary: godot.macos.editor.dev.x86_64
177-
#godot-prebuilt-patch: '4.1'
178+
# godot-prebuilt-patch: '4.2.x'
178179

179-
# TODO merge with other jobs
180-
- name: macos-lazy-fptrs
180+
- name: macos-4.1
181181
os: macos-12
182-
artifact-name: macos-nightly
182+
artifact-name: macos-4.1
183183
godot-binary: godot.macos.editor.dev.x86_64
184-
rust-extra-args: --features godot/lazy-function-tables
184+
godot-prebuilt-patch: '4.1.3'
185185

186186
# Windows
187187

@@ -197,18 +197,17 @@ jobs:
197197
godot-binary: godot.windows.editor.dev.double.x86_64.exe
198198
rust-extra-args: --features godot/custom-godot,godot/double-precision
199199

200-
- name: windows-4.1
200+
- name: windows-4.2
201201
os: windows-latest
202-
artifact-name: windows-stable
202+
artifact-name: windows-4.2
203203
godot-binary: godot.windows.editor.dev.x86_64.exe
204-
#godot-prebuilt-patch: '4.1'
204+
#godot-prebuilt-patch: '4.2.x'
205205

206-
# TODO merge with other jobs
207-
- name: windows-lazy-fptrs
206+
- name: windows-4.1
208207
os: windows-latest
209-
artifact-name: windows-nightly
208+
artifact-name: windows-4.1
210209
godot-binary: godot.windows.editor.dev.x86_64.exe
211-
rust-extra-args: --features godot/lazy-function-tables
210+
godot-prebuilt-patch: '4.1.3'
212211

213212
# Linux
214213

@@ -241,21 +240,21 @@ jobs:
241240

242241
# Linux compat
243242

244-
- name: linux-4.1.1
243+
- name: linux-4.2
245244
os: ubuntu-20.04
246-
artifact-name: linux-stable
245+
artifact-name: linux-4.2
247246
godot-binary: godot.linuxbsd.editor.dev.x86_64
248-
#godot-prebuilt-patch: '4.1.1'
247+
#godot-prebuilt-patch: '4.2.x'
249248

250249
- name: linux-4.1
251250
os: ubuntu-20.04
252-
artifact-name: linux-stable
251+
artifact-name: linux-4.2
253252
godot-binary: godot.linuxbsd.editor.dev.x86_64
254-
godot-prebuilt-patch: '4.1'
253+
godot-prebuilt-patch: '4.1.3'
255254

256-
- name: linux-4.0.4
255+
- name: linux-4.0
257256
os: ubuntu-20.04
258-
artifact-name: linux-4.0.4
257+
artifact-name: linux-4.0
259258
godot-binary: godot.linuxbsd.editor.dev.x86_64
260259
godot-prebuilt-patch: '4.0.4'
261260

@@ -267,19 +266,29 @@ jobs:
267266
# cause false positives like println!. See https://github.com/google/sanitizers/issues/89.
268267
#
269268
# There is also a gcc variant besides clang, which is currently not used.
270-
- name: linux-memcheck
269+
- name: linux-memcheck-nightly
271270
os: ubuntu-20.04
272-
artifact-name: linux-memcheck-clang-nightly
271+
artifact-name: linux-memcheck-nightly
273272
godot-binary: godot.linuxbsd.editor.dev.x86_64.llvm.san
274273
rust-toolchain: nightly
275274
rust-env-rustflags: -Zrandomize-layout -Zsanitizer=address
276275
rust-extra-args: --features godot/custom-godot
277276
# Sanitizers can't build proc-macros and build scripts; with --target, cargo ignores RUSTFLAGS for those two.
278277
rust-target: x86_64-unknown-linux-gnu
279278

280-
- name: linux-memcheck-4.0.4
279+
- name: linux-memcheck-4.1
280+
os: ubuntu-20.04
281+
artifact-name: linux-memcheck-4.1
282+
godot-binary: godot.linuxbsd.editor.dev.x86_64.llvm.san
283+
godot-prebuilt-patch: '4.1.3'
284+
rust-toolchain: nightly
285+
rust-env-rustflags: -Zrandomize-layout -Zsanitizer=address
286+
# Sanitizers can't build proc-macros and build scripts; with --target, cargo ignores RUSTFLAGS for those two.
287+
rust-target: x86_64-unknown-linux-gnu
288+
289+
- name: linux-memcheck-4.0
281290
os: ubuntu-20.04
282-
artifact-name: linux-memcheck-clang-4.0.4
291+
artifact-name: linux-memcheck-4.0
283292
godot-binary: godot.linuxbsd.editor.dev.x86_64.llvm.san
284293
godot-prebuilt-patch: '4.0.4'
285294
rust-toolchain: nightly

.github/workflows/minimal-ci.yml

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) godot-rust; Bromeon and contributors.
12
# This Source Code Form is subject to the terms of the Mozilla Public
23
# License, v. 2.0. If a copy of the MPL was not distributed with this
34
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
@@ -160,27 +161,33 @@ jobs:
160161

161162
# Linux compat
162163

164+
- name: linux-4.1.3
165+
os: ubuntu-20.04
166+
artifact-name: linux-4.1
167+
godot-binary: godot.linuxbsd.editor.dev.x86_64
168+
godot-prebuilt-patch: '4.1.3'
169+
163170
- name: linux-4.0.4
164171
os: ubuntu-20.04
165-
artifact-name: linux-4.0.4
172+
artifact-name: linux-4.0
166173
godot-binary: godot.linuxbsd.editor.dev.x86_64
167174
godot-prebuilt-patch: '4.0.4'
168175

169176
# Memory checkers
170177

171178
- name: linux-memcheck
172179
os: ubuntu-20.04
173-
artifact-name: linux-memcheck-clang-nightly
180+
artifact-name: linux-memcheck-nightly
174181
godot-binary: godot.linuxbsd.editor.dev.x86_64.llvm.san
175182
rust-toolchain: nightly
176183
rust-env-rustflags: -Zrandomize-layout -Zsanitizer=address
177184
rust-extra-args: --features godot/custom-godot
178185
# Sanitizers can't build proc-macros and build scripts; with --target, cargo ignores RUSTFLAGS for those two.
179186
rust-target: x86_64-unknown-linux-gnu
180187

181-
- name: linux-memcheck-4.0.4
188+
- name: linux-memcheck-4.0
182189
os: ubuntu-20.04
183-
artifact-name: linux-memcheck-clang-4.0.4
190+
artifact-name: linux-memcheck-4.0
184191
godot-binary: godot.linuxbsd.editor.dev.x86_64.llvm.san
185192
godot-prebuilt-patch: '4.0.4'
186193
rust-toolchain: nightly

.github/workflows/update-docs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (c) godot-rust; Bromeon and contributors.
12
# This Source Code Form is subject to the terms of the Mozilla Public
23
# License, v. 2.0. If a copy of the MPL was not distributed with this
34
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

check.sh

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
# Copyright (c) godot-rust; Bromeon and contributors.
23
# This Source Code Form is subject to the terms of the Mozilla Public
34
# License, v. 2.0. If a copy of the MPL was not distributed with this
45
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

examples/dodge-the-creeps/rust/build-wasm.sh

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/bin/sh
2+
# Copyright (c) godot-rust; Bromeon and contributors.
3+
# This Source Code Form is subject to the terms of the Mozilla Public
4+
# License, v. 2.0. If a copy of the MPL was not distributed with this
5+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
26

37
# Must be in dodge-the-creep's rust directory in order to pick up the .cargo/config
48
cd `dirname "$0"`

examples/dodge-the-creeps/rust/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-bindings/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ custom-godot = ["dep:bindgen", "dep:regex", "dep:which"]
1818
custom-godot-extheader = []
1919

2020
[dependencies]
21-
godot4-prebuilt = { optional = true, git = "https://github.com/godot-rust/godot4-prebuilt", branch = "4.1.1" }
21+
godot4-prebuilt = { optional = true, git = "https://github.com/godot-rust/godot4-prebuilt", branch = "4.2" }
2222

2323
# Version >= 1.5.5 for security: https://blog.rust-lang.org/2022/03/08/cve-2022-24713.html
2424
# 'unicode-gencat' needed for \d, see: https://docs.rs/regex/1.5.5/regex/#unicode-features

godot-bindings/src/godot_exe.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-bindings/src/godot_version.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-bindings/src/header_gen.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-bindings/src/lib.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
@@ -123,6 +124,8 @@ pub use prebuilt::*;
123124
// ----------------------------------------------------------------------------------------------------------------------------------------------
124125
// Common
125126

127+
const NEXT_MINOR_VERSION: u8 = 3;
128+
126129
pub fn clear_dir(dir: &Path, watch: &mut StopWatch) {
127130
if dir.exists() {
128131
std::fs::remove_dir_all(dir).unwrap_or_else(|e| panic!("failed to delete dir: {e}"));
@@ -140,7 +143,7 @@ pub fn emit_godot_version_cfg() {
140143
} = get_godot_version();
141144

142145
// Start at 1; checking for "since/before 4.0" makes no sense
143-
let max = 2;
146+
let max = NEXT_MINOR_VERSION;
144147
for m in 1..=minor {
145148
println!(r#"cargo:rustc-cfg=since_api="{major}.{m}""#);
146149
}

godot-bindings/src/watch.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-codegen/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-codegen/src/api_parser.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-codegen/src/central_generator.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-codegen/src/class_generator.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-codegen/src/codegen_special_cases.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-codegen/src/context.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-codegen/src/interface_generator.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-codegen/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-codegen/src/special_cases.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-codegen/src/tests.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-codegen/src/util.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-codegen/src/utilities_generator.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-core/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

godot-core/src/builder/method.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) godot-rust; Bromeon and contributors.
23
* This Source Code Form is subject to the terms of the Mozilla Public
34
* License, v. 2.0. If a copy of the MPL was not distributed with this
45
* file, You can obtain one at https://mozilla.org/MPL/2.0/.

0 commit comments

Comments
 (0)