mirror of
https://github.com/godotengine/godot-visual-script.git
synced 2026-01-07 02:10:47 +03:00
Codebase Enhancements and Performance Improvements
We've made several updates to improve our codebase and application performance. - Clang format was applied for better readability and consistency, aiding other developers in understanding and contributing to the code. - We resolved issues that were causing visual script compilation failure. The visual script now compiles successfully, ensuring application functionality. - Broken sections within the codebase were fixed, improving overall stability. - Built-in functions from the visual script were removed to simplify the code and enhance readability. - Generic search performance was improved to provide faster results, enhancing user experience. - Missing flow nodes were added to the Visual Script, ensuring all necessary components are present for correct functioning. In an effort to streamline the codebase: - `VisualScriptComment` class and related code were removed, reducing complexity and improving maintainability. - Error messages were optimized for quicker feedback when errors occur. - Licenses were updated to reflect recent changes, ensuring legal compliance and project transparency. - The `get_global_name()` override in `visual_script.h` was fixed, and `TYPE_BUILTIN_FUNC` in `visual_script_expression.h` was removed, improving code functionality. - Search logic was refactored to avoid double searching, enhancing performance. - Documentation was updated to reflect recent changes, providing accurate information to users and developers. - Property selection logic in `VisualScriptPropertySelector` was refactored for easier understanding and modification. - Code was refactored to avoid variable shadowing, improving readability and reducing potential errors. - `.clang-format` and `.clang-tidy` configuration files were added to ensure consistent code styling. To make the code more robust and easier to understand: - Variable names were corrected for clarity, and error handling in `visual_script_expression.cpp` was improved. - Function and variable names were refactored for better readability and maintainability. - Member editing logic in `VisualScriptEditor` was simplified. - Name variables were updated to be unique, avoiding potential conflicts and errors. - The `VisualScriptSubCall` class was refactored for simplicity and ease of understanding. For macOS workflow: - It was updated to use the latest version and correct path for installing Vulkan SDK, enabling the application to leverage the latest features and improvements from the Vulkan SDK. - Mac Vulkan SDK was installed to support Vulkan-based functionalities. Lastly, we made necessary changes to pass CI/CD tests, ensuring the code quality and stability of the application.
This commit is contained in:
4
.github/workflows/linux.yml
vendored
4
.github/workflows/linux.yml
vendored
@@ -30,8 +30,6 @@ jobs:
|
||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
||||
- name: Make apt sources.list use the default Ubuntu repositories
|
||||
run: |
|
||||
sudo rm -f /etc/apt/sources.list.d/*
|
||||
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
|
||||
sudo apt-get update
|
||||
|
||||
# Install all packages (except scons)
|
||||
@@ -74,7 +72,7 @@ jobs:
|
||||
env:
|
||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
||||
run: |
|
||||
scons -j2 verbose=yes warnings=all werror=yes platform=linuxbsd tools=yes tests=no target=release_debug production=yes
|
||||
scons -j2 verbose=yes warnings=all werror=yes platform=linuxbsd tools=yes tests=no target=template_release production=yes
|
||||
|
||||
# TODO Such tests are able to run from Godot 4.0 only
|
||||
# Execute unit tests for the editor
|
||||
|
||||
8
.github/workflows/macos.yml
vendored
8
.github/workflows/macos.yml
vendored
@@ -12,7 +12,7 @@ env:
|
||||
|
||||
jobs:
|
||||
macos-editor:
|
||||
runs-on: "macos-10.15"
|
||||
runs-on: "macos-latest"
|
||||
name: Editor
|
||||
|
||||
steps:
|
||||
@@ -56,12 +56,16 @@ jobs:
|
||||
python --version
|
||||
scons --version
|
||||
|
||||
- name: Setup Vulkan SDK
|
||||
run: |
|
||||
sh misc/scripts/install_vulkan_sdk_macos.sh
|
||||
|
||||
# We should always be explicit with our flags usage here since it's gonna be sure to always set those flags
|
||||
- name: Compilation
|
||||
env:
|
||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
||||
run: |
|
||||
scons -j2 verbose=yes warnings=all werror=yes platform=osx tools=yes tests=no target=release_debug production=yes module_text_server_fb_enabled=yes
|
||||
scons -j2 verbose=yes warnings=all werror=yes platform=macos tools=yes tests=no target=template_release production=yes module_text_server_fb_enabled=yes
|
||||
|
||||
# TODO Such tests are able to run from Godot 4.0 only
|
||||
# Execute unit tests for the editor
|
||||
|
||||
0
.github/workflows/scripts/clang_format.sh
vendored
Normal file → Executable file
0
.github/workflows/scripts/clang_format.sh
vendored
Normal file → Executable file
5
.github/workflows/scripts/file_format.sh
vendored
5
.github/workflows/scripts/file_format.sh
vendored
@@ -46,9 +46,9 @@ while IFS= read -rd '' f; do
|
||||
continue
|
||||
fi
|
||||
# Disallow empty lines after the opening brace.
|
||||
sed -z -i 's/\x7B\x0A\x0A/\x7B\x0A/g' "$f"
|
||||
perl -i -0777 -pe 's/\x7B\x0A\x0A/\x7B\x0A/g' "$f"
|
||||
# Disallow some empty lines before the closing brace.
|
||||
sed -z -i 's/\x0A\x0A\x7D/\x0A\x7D/g' "$f"
|
||||
perl -i -0777 -pe 's/\x0A\x0A\x7D/\x0A\x7D/g' "$f"
|
||||
done
|
||||
|
||||
git diff > patch.patch
|
||||
@@ -66,4 +66,5 @@ printf "and the formatting rules:\n\n"
|
||||
cat patch.patch
|
||||
printf "\n*** Aborting, please fix your commit(s) with 'git commit --amend' or 'git rebase -i <hash>'\n"
|
||||
rm -f patch.patch
|
||||
|
||||
exit 1
|
||||
|
||||
22
.github/workflows/scripts/install_vulkan_sdk_macos.sh
vendored
Executable file
22
.github/workflows/scripts/install_vulkan_sdk_macos.sh
vendored
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
# Download and install the Vulkan SDK.
|
||||
curl -L "https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.dmg" -o /tmp/vulkan-sdk.dmg
|
||||
hdiutil attach /tmp/vulkan-sdk.dmg -mountpoint /Volumes/vulkan-sdk
|
||||
/Volumes/vulkan-sdk/InstallVulkan.app/Contents/MacOS/InstallVulkan \
|
||||
--accept-licenses --default-answer --confirm-command install
|
||||
|
||||
cnt=5
|
||||
until hdiutil detach -force /Volumes/vulkan-sdk
|
||||
do
|
||||
[[ cnt -eq "0" ]] && break
|
||||
sleep 1
|
||||
((cnt--))
|
||||
done
|
||||
|
||||
rm -f /tmp/vulkan-sdk.dmg
|
||||
|
||||
echo 'Vulkan SDK installed successfully! You can now build Godot by running "scons".'
|
||||
4
.github/workflows/windows.yml
vendored
4
.github/workflows/windows.yml
vendored
@@ -65,7 +65,7 @@ jobs:
|
||||
env:
|
||||
SCONS_CACHE: /.scons_cache/
|
||||
run: |
|
||||
scons -j2 verbose=yes warnings=all werror=yes platform=windows tools=yes tests=no target=release_debug
|
||||
scons -j2 verbose=yes warnings=all werror=yes platform=windows tools=yes tests=no target=template_release
|
||||
|
||||
# TODO Such tests are able to run from Godot 4.0 only
|
||||
# Execute unit tests for the editor
|
||||
@@ -131,7 +131,7 @@ jobs:
|
||||
env:
|
||||
SCONS_CACHE: /.scons_cache/
|
||||
run: |
|
||||
scons -j2 verbose=yes warnings=all werror=yes platform=windows tools=no tests=no target=release
|
||||
scons -j2 verbose=yes warnings=all werror=yes platform=windows tools=no tests=no target=template_release
|
||||
|
||||
# TODO Such tests are able to run from Godot 4.0 only
|
||||
# Execute unit tests for the editor
|
||||
|
||||
Reference in New Issue
Block a user