Commit Graph

490 Commits

Author SHA1 Message Date
rune-scape e680369d5b GDScript: Fix too many calls to 'remove_parser'
+fix excessive memory allocations when 'load'ing many dependant scripts
+fix excessive calls to vformat
2024-08-03 20:52:44 -07:00
rune-scape 6e8fa6dd50 GDScript: Fix common mismatched external parser errors 2024-07-31 12:54:16 -07:00
Rémi Verschelde f2918c73cf Revert "GDScript: Fix common mismatched external parser errors"
This reverts commit c75225ffb2.

This caused a crashing regression for multiple users:
https://github.com/godotengine/godot/pull/94617#issuecomment-2247868580
2024-07-25 09:20:23 +02:00
Rémi Verschelde e91725f490 Merge pull request #94617 from rune-scape/fix-mismatched-parsers
GDScript: Fix common mismatched external parser errors
2024-07-24 09:59:19 +02:00
rune-scape c75225ffb2 GDScript: Fix common mismatched external parser errors 2024-07-23 12:25:23 -07:00
Danil Alexeev 638148a184 GDScript: Fix false positive cases of ENUM_VARIABLE_WITHOUT_DEFAULT 2024-07-22 21:45:01 +03:00
baptr 810fcc7431 Fix gdscript analyzer error when instantiating EditorPlugins.
Editor code is not instantiable outside of the editor
(https://github.com/godotengine/godot/blob/1d14c054a12dacdc193b589e4afb0ef319ee2aae/core/object/class_db.cpp#L369).
This is fine for editor plugins and the like, but the GDScript analyzer
balks at it, causing F5 runs to fail: #73525.

Instead, we really just want to know if the type is abstract - so add
a new ClassDB method to check that and nothing else.

Update core/object/class_db.cpp

Apply code review comments

Co-Authored-By: Bryce <1522777+baptr@users.noreply.github.com>
2024-07-10 10:24:57 +02:00
Danil Alexeev d15ed0bcbb GDScript: Fix false positive CONFUSABLE_CAPTURE_REASSIGNMENT warnings 2024-06-28 16:41:32 +03:00
Danil Alexeev 68898dbcc9 GDScript: Add CONFUSABLE_CAPTURE_REASSIGNMENT warning 2024-06-28 11:12:01 +03:00
Rémi Verschelde 0364443d12 Merge pull request #93346 from RandomShaper/gds_cyc_alt
GDScript: Enhance handling of cyclic dependencies
2024-06-26 18:15:16 +02:00
Pedro J. Estébanez c1391489e3 GDScript: Enhance handling of cyclic dependencies 2024-06-26 17:44:32 +02:00
Hilderin e18db6fe60 Fix editor crash when invalid global class script path 2024-06-25 08:13:04 -04:00
Rémi Verschelde ce82984b5c Merge pull request #92544 from dalexeev/gds-fix-const-non-metatype-subscript
GDScript: Fix subscript resolution on constant non-metatype GDScript base
2024-05-30 22:38:36 +02:00
Danil Alexeev 3fd30ed4ff GDScript: Do not produce INFERRED_DECLARATION on type import 2024-05-30 19:30:07 +03:00
Danil Alexeev 18d8838051 GDScript: Fix subscript resolution on constant non-metatype GDScript base 2024-05-30 17:37:05 +03:00
Danil Alexeev 4b692959de GDScript: Fix lambdas capturing non-local variables 2024-05-22 10:07:31 +03:00
Danil Alexeev 7dd801c580 GDScript: Fix STANDALONE_EXPRESSION warning for preload() 2024-05-17 10:33:01 +03:00
Rémi Verschelde bdefe53992 Merge pull request #91909 from KoBeWi/have_fun_reviewing_this
Use Core/Scene stringnames consistently
2024-05-14 12:07:03 +02:00
kobewi 413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
Rémi Verschelde 0a67ee52d1 Revert "GDScript: Implement get_dependencies()"
This reverts commit dc73440f89.

This commit in some form is needed to fix handling of dependencies on
export, but as it's also used for import, it's exposing some pre-existing
issues which we need to solve first.

So reverting for now to give ourselves time to iron this out for a future
Godot release.

Fixes #91726.
2024-05-13 16:59:43 +02:00
kobewi a262d2d881 Add shorthand for using singleton string names 2024-05-11 18:53:08 +02:00
A Thousand Ships 955d5affa8 Reduce and prevent unnecessary random-access to List
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
K. S. Ernest (iFire) Lee f9b488508c Add PackedVector4Array Variant type
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-05-03 00:58:27 +02:00
Danil Alexeev 8122a27eac GDScript: Fix access non-static members in static context 2024-05-01 19:55:40 +03:00
Rémi Verschelde c4733e8003 Merge pull request #90860 from vnen/gdscript-get-dependencies
GDScript: Implement `get_dependencies()`
2024-04-29 12:30:12 +02:00