Commit Graph

2310 Commits

Author SHA1 Message Date
Rémi Verschelde 907298d673
Merge pull request #68747 from rune-scape/rune-stringname-unification
GDScript: Unify StringName and String
2022-12-09 18:06:48 +01:00
Adam Scott da65b61edb Fix autocomplete crash as it would infinite loop 2022-12-08 23:40:17 -05:00
Adam Scott 59c6642f2a Add missing packed scene cache clear inside `GDScriptCache::clear()` 2022-12-07 15:29:18 -05:00
Yuri Rubinsky b229a19688 Fix lookup to docs for variables initialized with `get_node` 2022-12-07 15:16:04 +03:00
Rémi Verschelde 9bd7ad53f7
Merge pull request #69506 from adamscott/move-gdscript-uninit-to-finalize
Move GDScript uninitialization to `GDScriptLanguage::finish()`
2022-12-06 16:11:21 +01:00
Adam Scott 88f3045301 Move GDScript uninitialization to `GDScriptLanguage::finalize()`
Co-authored-by: Ricardo Buring <ricardo.buring@gmail.com>
Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
2022-12-06 09:35:39 -05:00
Rémi Verschelde 18f7461db8
Merge pull request #69606 from red1939/bug/vscode_crash
Keep GDScriptAnalyzer alive for whole parse()
2022-12-06 11:00:51 +01:00
Rémi Verschelde 85602efef6
Merge pull request #69639 from Chaosus/gds_fix_completion
Fix completion for the raw `get_node` call
2022-12-06 11:00:15 +01:00
Bartosz Bielecki 2af4f7f762 Keep GDScriptAnalyzer alive for whole parse()
Analyzed data is allocated by Parser but kept as a reference in the cache
which in turn is held by the Analyzer. If Analyzer goes away Parser is left
with a tree of dangling references.

Code is analogous to all other usages of Analyzer + Parser pair.
2022-12-06 10:01:18 +01:00
Yuri Rubinsky 20660bb23a Fix completion for the raw `get_node` call 2022-12-06 10:42:44 +03:00
rune-scape e79be6ce07 Unify String and StringName 2022-12-05 21:46:47 -05:00
Dmitrii Maganov 97280279ee Fix incomplete shadowing of member properties by parameters 2022-12-06 00:22:56 +02:00
Adam Scott 7bcaa9df9e Fix missing parent class name identifier crash 2022-12-02 21:30:19 -05:00
Yuri Sizov bf9cf7d034
Merge pull request #69166 from souplamp/icon-annotation-not-working
Update docs to clarify `@icon` only works with global script classes
2022-12-02 03:04:23 +03:00
souplamp 369c7d2422 Update docs to mention `@icon` only works with global script classes
Update the docs to clarify that the `@icon` annotation does not work
when only attaching a script to a node, and clarify that the script itself
must be a globally accessible script type.
2022-12-01 12:52:58 -06:00
Rémi Verschelde 4821de146e
Merge pull request #69423 from KoBeWi/parenture
Improve parent signature error
2022-12-01 18:10:31 +01:00
Rémi Verschelde 2d96f63e09
Merge pull request #68481 from dalexeev/gds-fix-dyn-arg-def-val
GDScript 2.0: Fix shift due to skip of non-constant default argument values
2022-12-01 18:09:25 +01:00
kobewi d1e4146462 Improve parent signature error 2022-12-01 15:16:16 +01:00
Rémi Verschelde eb555d7559
Merge pull request #69303 from Chaosus/gds_fix_loops
Reset unassigned local variables to null in the loops
2022-12-01 10:21:21 +01:00
Rémi Verschelde c868e0b4b9
Merge pull request #69269 from red1939/red1939/master
Acknowledge that a CLASS kind of a DataType might not have an identifier
2022-11-30 10:49:09 +01:00
Bartosz Bielecki e10b0c5d98 Acknowledge that a CLASS kind of a DataType might not have an identifier 2022-11-30 09:26:50 +01:00
trollodel c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
Yuri Rubinsky 8d2506e811 Reset unassigned local variables to null in the loops 2022-11-28 19:45:24 +03:00
Rémi Verschelde 4555ccdf98
Merge pull request #69224 from adamscott/fix-PackedScene-reload_from_file
Add `PackedScene::reload_from_file()` override
2022-11-28 16:53:36 +01:00
Adam Scott a34a26eb66 Add PackedScene::reload_from_file() override 2022-11-28 10:23:02 -05:00
Yuri Rubinsky afbea19a22 Fix lookup code to pass functions with the same name as built-ins 2022-11-28 15:53:14 +03:00
Rémi Verschelde 166066d9f7
Merge pull request #69259 from adamscott/fix-cyclic-reference-base-issue
Fix cyclic reference base being loaded but not valid (which is ok)
2022-11-28 11:45:11 +01:00
Adam Scott 4e60689695 Fix cyclic reference base being loaded but not valid (which is ok) 2022-11-27 15:50:19 -05:00
rune-scape 847c9bd248 GDScript: Avoid using `get_global_class_native_base` 2022-11-27 03:55:53 -05:00
Rémi Verschelde c7ceb94e37
Merge pull request #69079 from adamscott/fix-singleton-scene-cyclic-load
Fix singleton scene cyclic loading
2022-11-25 19:29:57 +01:00
Adam Scott 69bb7e5b11 Fix singleton scene cyclic loading 2022-11-25 12:43:55 -05:00
Rémi Verschelde 8b7efd2306
Merge pull request #69134 from jquinl/export_range_int_fix
GDScript: Properly respect `int` type hint for `@export_range`
2022-11-24 23:30:40 +01:00
unknown 5fd382c2ab GDScript: Properly respect `int` type hint for `@export_range`
Fixes #69104.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-11-24 22:14:05 +01:00
clayjohn 075cea1077 Ensure class name is printed in STATIC_CALLED_ON_INSTANCE warning 2022-11-24 12:06:11 -08:00
Rémi Verschelde 910d6d8e62
GDScript: Only check if ignoring warnings in debug build 2022-11-24 11:50:32 +01:00
Adam Scott 2918689ff1 [godot#68977] Fix constants parameters 2022-11-23 08:15:54 -05:00
Rémi Verschelde 4abbb2d684
GDScript: Don't warn about RETURN_VALUE_DISCARDED by default
This happens too often with normal usage of the API.
The warning can still be useful to find actual bugs where discarding the return
value wasn't intentional, but this should stay enabled manually, at least until
we either improve the API to remove false positives, or improve the warning (e.g.
to only warn about unused return value on const functions).
2022-11-22 15:01:24 +01:00
Rémi Verschelde 0b2dc0f017
Merge pull request #68970 from Chaosus/gds_fix_lambda_signal
Fix using signals in lambda functions
2022-11-22 10:00:05 +01:00
Yuri Rubinsky f6c8c140f0 Fix using signals in lambda functions 2022-11-22 11:22:41 +03:00
Rémi Verschelde c474e2f639
Merge pull request #68987 from adamscott/fix-godot#61386-autoload-scenes-implicit-types
Fix autoload scenes implicit types
2022-11-22 08:31:36 +01:00
Rémi Verschelde 17b0c862ff
Merge pull request #68972 from adamscott/fix-godot#68971-cached-scene
Fetch cached scene if it exists in `GDScriptCache::get_packed_scene()`
2022-11-22 08:31:24 +01:00
Rémi Verschelde 28039094b3
Merge pull request #68911 from souplamp/return-value-discarded-error
Clarify what happens when return value is discarded in GDScript warning text
2022-11-22 08:30:51 +01:00
Adam Scott eb62d241c0 [godot#61386] Fix autoload scenes implicit types 2022-11-21 23:39:31 -05:00
souplamp 5bdd883dfd change RETURN_VALUE_DISCARDED GDScript warn text
changed RETURN_VALUE_DISCARDED GDscript warning text to mention how the return value of a function is discarded; update GDScript parser warning test to include new warning text.
2022-11-21 15:04:04 -06:00
Adam Scott e86e15571f [godot#68971] Fetch cached scene if it exists in `GDScriptCache` 2022-11-21 15:57:45 -05:00
Yuri Rubinsky 4a8276a773 Fix GDScript completion crash 2022-11-21 16:34:03 +03:00
Rémi Verschelde 190226098b
Merge pull request #68929 from adamscott/add-rename-check
Add `GDScriptCache::move_script` check before executing logic
2022-11-20 23:25:30 +01:00
Rémi Verschelde 15df1ffa9b
Merge pull request #68927 from rune-scape/rune-cache-parse-error
GDScript: Cache scripts after parse error
2022-11-20 23:25:19 +01:00
Adam Scott 98ceb7ecf5 Add move_script check before executing logic 2022-11-20 15:21:57 -05:00
rune-scape 5ef971da1a GDScript: Cache scripts after parse error 2022-11-20 13:06:14 -05:00