Markus Sauermann
fa8fec2cc1
Fix superfluous `"` in error message
2023-08-13 00:38:10 +02:00
Septian
793cc080cb
Fix `get_method` from named lambda
2023-08-11 20:31:08 +07:00
Danil Alexeev
fb45cab133
GDScript: Fix "Identifier not found" error when accessing inner class from inside
2023-08-11 11:22:01 +03:00
Danil Alexeev
0f27c4ad80
GDScript: Check `get_node()` shorthand in static functions
2023-08-09 17:11:38 +03:00
Rémi Verschelde
40363a88bd
Merge pull request #80283 from ajreckof/fix-completion-option-location-not-found
...
Fix completion option location not found
2023-08-07 14:53:10 +02:00
Rémi Verschelde
87c91dc452
Merge pull request #79761 from dalexeev/gds-hl-comment-markers
...
GDScript: Highlight comment markers (`TODO`, `FIXME`, etc.)
2023-08-07 14:49:09 +02:00
Rémi Verschelde
faaf27f284
Fix various typos with codespell
...
Also includes typo fixes from #79993 , #80068 , #80276 , and #80303 .
Co-authored-by: betalars <contact@betalars.de>
Co-authored-by: spaceyjase <429978+spaceyjase@users.noreply.github.com>
Co-authored-by: Swarkin <102416174+Swarkin@users.noreply.github.com>
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-08-07 13:09:47 +02:00
Danil Alexeev
54231682ba
GDScript: Highlight comment markers (`TODO`, `FIXME`, etc.)
2023-08-07 11:33:51 +03:00
ajreckof
4b724c9252
Fix completion option location not found
2023-08-05 02:15:45 +02:00
Rémi Verschelde
95d71dbad1
Merge pull request #80165 from dalexeev/gds-fix-native-signal-not-found
...
GDScript: Fix regression with native signal not found
2023-08-03 14:46:48 +02:00
Rémi Verschelde
5e1671afd9
Merge pull request #78540 from anvilfolk/gdresloaderr
...
GDScript: Add error message when a GDScript resource fails to load.
2023-08-03 14:46:33 +02:00
Danil Alexeev
f19377160c
GDScript: Fix regression with native signal not found
2023-08-02 15:42:36 +03:00
Yuri Sizov
f37d192860
Merge pull request #80109 from timothyqiu/not-markdown
...
Fix invalid use of markdown syntax in classref
2023-08-01 20:04:00 +02:00
Yuri Sizov
79e28e0914
Merge pull request #80020 from dalexeev/gds-pot-gen-const-string
...
GDScript: Add constant string support for POT generator
2023-08-01 20:03:56 +02:00
Yuri Sizov
f6e02dc437
Merge pull request #79990 from vnen/gdscript-assume-op-types
...
GDScript: Optimize operators by assuming the types
2023-08-01 17:25:52 +02:00
Yuri Sizov
68a49c4959
Merge pull request #79935 from dalexeev/gds-validate-node-path-annotation
...
GDScript: Add validation for `@export_node_path` annotation arguments
2023-08-01 17:25:44 +02:00
Haoyu Qiu
c4b5161ed1
Fix invalid use of markdown syntax in classref
...
Also:
* changed `[b]true[/b]` to `[code]true[/code]`
* use `[i]` for mathematical constant "e"
* use `[b]` for button text & menu item text
* improve markups about "tap1" and "tap2" in AudioEffectDelay
2023-08-01 22:44:31 +08:00
Yuri Sizov
3de7dd902c
Merge pull request #79880 from dalexeev/gds-fix-id-shadowing-below
...
GDScript: Fix bug with identifier shadowed below in current scope
2023-07-31 21:01:36 +02:00
Yuri Sizov
41efc7cb86
Merge pull request #78941 from dalexeev/gds-doc-comments-deprecated-and-experimental
...
GDScript: Add `@deprecated` and `@experimental` doc comment tags
2023-07-31 21:01:08 +02:00
Yuri Sizov
efbff1369a
Merge pull request #78254 from dalexeev/gds-fix-property-group-name-conflict
...
GDScript: Fix conflict between property and group names
2023-07-31 21:01:03 +02:00
Yuri Sizov
62b4643d85
Merge pull request #73226 from AThousandShips/gdscript_tok_improvement
...
Improve GDScript identifier tokenization
2023-07-31 21:00:57 +02:00
ocean (they/them)
cca57171c1
Add error message when a GDScript resource fails to load.
...
Currently, GDScripts who are only loaded through `ResourceLoader::load()`,
like Autoloads, do not have a pathway to announce there is an error in their
code. This contributes to significant confusion in error projects when
autoloads are involved. At least partially closes #78230 .
2023-07-31 13:16:29 -04:00
Danil Alexeev
ae42c23e09
GDScript: Add constant string support for POT generator
2023-07-29 19:24:48 +03:00
George Marques
c1bca65d09
GDScript: Optimize operators by assuming the types
...
This assumes that operators are called usually with the same type of
operands as the first time. So it stores the types of the first run and
if matched it uses an optimized path by calling the validated operator
function directly. Otherwise it uses the regular untyped evaluator.
With this change, if operators do use the same type they run quite
faster. OTOH, if the types mismatch it takes longer to run than they
would with the previous code.
2023-07-28 13:08:21 -03:00
Danil Alexeev
5b4403c9a5
GDScript: Add validation for `@export_node_path` annotation arguments
...
Co-authored-by: George Marques <george@gmarqu.es>
2023-07-26 20:36:47 +03:00
Juan Linietsky
5e512b705e
Support threads in the script debugger
...
* This implementation adds threads on the side of the client (script debugger).
* Some functions of the debugger are optimized.
* The profile is also now thread safe using atomics.
* The editor can switch between multiple threads when debugging.
This PR adds threaded support for the script language debugger. Every thread has its own thread local data and it will connect to the debugger using multiple thread IDs.
This means that, now, the editor can receive multiple threads entering debug mode at the same time.
2023-07-26 12:06:45 +02:00
Danil Alexeev
d53fc92b4c
GDScript: Fix bug with identifier shadowed below in current scope
2023-07-26 11:26:57 +03:00
Yuri Sizov
0e1c9531b5
Merge pull request #75620 from jpcerrone/fix_shadow_warnings_not_going_away_after_ignoring
...
Fix for not being able to ignore shadowing warnings on class scope
2023-07-25 21:25:45 +02:00
jpcerrone
13c73500ab
Fix for not being able to ignore shadowing warnings on class scope
2023-07-24 17:22:12 -03:00
Yuri Sizov
74d20fe17e
Merge pull request #75216 from rune-scape/rune-dependancy-errors
...
Script editor (GDScript): Show depended script errors
2023-07-24 19:32:20 +02:00
Yuri Sizov
2bd904e3db
Merge pull request #73196 from Vilcrow/fix-lookup-symbol
...
Fix jumping to function definition using `Ctrl+LMB` or the "Lookup Symbol" button
2023-07-24 19:32:12 +02:00
rune-scape
83b01708b2
Script editor: Show depended script errors
2023-07-24 15:49:39 +02:00
Yuri Sizov
de0f7935dd
Merge pull request #79524 from aaronfranke/gds-test-inst-placeholder
...
Change GDScript tests to use InstancePlaceholder as the example abstract class
2023-07-21 17:15:32 +02:00
Fredia Huya-Kouadio
d17811c814
Re-architect how Android plugins are packaged and handled at export time
...
The previous packaging format for Godot Android plugins consisted of the plugin's `gdap` config file accompanied by binaries defined in the `gdap` file.
This format is now deprecated (starting with Godot 4.2), and instead Godot Android plugins are now packaged as `EditorExportPlugin` plugins.
The `EditorExportPlugin` class has been updated with the following methods to provide the necessary set of functionality:
- `_supports_platform`: returns true if the plugin supports the given platform
- `_get_android_dependencies`: retrieve the set of android dependencies (e.g: `org.godot.example:my-plugin:0.0.0`) provided by the plugin
- `_get_android_dependencies_maven_repos`: retrieve the urls of the maven repos for the provided android dependencies
- `_get_android_libraries`: retrieve the local paths of the android libraries (AAR files) provided by the plugin
- `_get_android_manifest_activity_element_contents`: update the contents of the `<activity>` element in the generated Android manifest
- `_get_android_manifest_application_element_contents`: update the contents of the `<application>` element in the generated Android manifest
- `_get_android_manifest_element_contents`: update the contents of the `<manifest>` element in the generated Android manifest
2023-07-18 19:14:53 +02:00
Yuri Sizov
2c55214068
Merge pull request #79205 from anvilfolk/populate-class-members
...
GDScript: Solve `_populate_class_members()` cyclic dependency problem
2023-07-17 19:15:16 +02:00
Aaron Franke
6a8a9cd279
Change GDScript tests to use InstancePlaceholder as the example abstract
2023-07-15 18:28:08 -05:00
Yuri Sizov
d5a30f7af8
Merge pull request #79163 from anvilfolk/fullscripterror
...
GDScript: Add static analysis error reporting in GDScriptCache::get_full_script()
2023-07-14 18:49:32 +02:00
George Marques
80ba1e0614
GDScript: Load global classes when running debug tests
...
So when running compiler debug tests it works with dependencies within a
project.
2023-07-13 13:05:42 -03:00
S.V.I. Vilcrow
56e2fad319
Fixed the jumping to function definition using 'Ctrl+LMB' and the 'Lookup Symbol' button.
2023-07-12 21:30:35 +03:00
George Marques
cbfe2b61b6
GDScript: Properly track extents of constants and patterns
...
Even in the case of errors.
2023-07-12 10:57:11 -03:00
Rémi Verschelde
8a06ec979e
Change explicit 'Godot 4.0' references to 'Godot 4'
...
Fixes #79276 .
2023-07-10 13:08:11 +02:00
ocean (they/them)
7d29ac0bf2
GDScript: solve `_populate_class_members()` cyclic dependency problem
2023-07-08 15:34:20 -04:00
Danil Alexeev
c1b450566a
GDScript: Add `@deprecated` and `@experimental` doc comment tags
2023-07-08 18:13:19 +03:00
ocean (they/them)
955049670f
GDScript: Add static analysis error reporting in GDScriptCache::get_full_script()
2023-07-07 11:16:22 -04:00
Rémi Verschelde
69dbbcc313
Merge pull request #79092 from akien-mga/doctool-remove-version-attribute
...
Doctool: Remove version attribute from XML header
2023-07-07 08:34:55 +02:00
Rémi Verschelde
b3c2b52025
Merge pull request #78953 from anvilfolk/enum-desc
...
Fix regression with GDScript enum descriptions now showing up in documentation.
2023-07-07 08:31:44 +02:00
Rémi Verschelde
81064cc239
Doctool: Remove version attribute from XML header
...
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
2023-07-06 10:08:21 +02:00
Rémi Verschelde
346f1ab86b
Bump version to 4.2-dev
...
Keep on waitin'
2023-07-05 22:07:03 +02:00
ocean (they/them)
d48636c3bf
Fix regression with enum descriptions now showing up in documentation.
2023-07-02 11:29:52 -04:00
Gilles Roudière
538c4b62b7
Explain a bit more RPCs options
2023-06-27 11:25:15 +02:00
Rémi Verschelde
af16013905
Merge pull request #78571 from MewPurPur/include-extension-info
...
Document file extensions of GDScript, CSharpScript, and Shader
2023-06-22 18:32:25 +02:00
MewPurPur
8848c395b6
Add information about file extension to GDScript, CSharpScript, and Shader
2023-06-22 18:56:08 +02:00
Danil Alexeev
84c8946565
GDScript: Remove unnecessary name check in `_get_property_list()`
2023-06-22 12:41:44 +03:00
Rémi Verschelde
f2ce0b6741
Merge pull request #78521 from jpcerrone/fix_static_vars_refs
...
Fix errors destroying script with static variables
2023-06-21 21:52:15 +02:00
Rémi Verschelde
faf3faa8c8
Merge pull request #77744 from dalexeev/gds-reset-block-locals-on-exit
...
GDScript: Reset local variables on exit from block
2023-06-21 21:51:05 +02:00
ocean (they/them)
6c28b8edd3
GDScript: fix regression when checking for virtual function implementation.
...
Unfortunately it appears the virtual function checks in #77324 are not
trustworthy at runtime, because objects can have scripts attached, but
this information is not always available at compile-time. These checks
need to be removed.
The rest of the PR is still useful, making all method flags available to
the analyzer, so a full revert isn't necessary/desirable.
This reopens #76938 , which will need another solution.
2023-06-21 15:13:45 -04:00
jpcerrone
8ce8216d17
Fix errors destroying script with static variables
...
Fixes #78376
After #78138 'script_list' is now cleared in 'GDScriptLanguage::finish'
Because of that, we can safely remove the removal from that list that
happens on 'GDScript::~GDScript'.
2023-06-21 12:33:21 -03:00
今井きなみ
bf04c55175
Fix lambda parsing continuing on subsequent lines #73273
2023-06-21 12:56:57 +02:00
Yuri Sizov
f1e79e2581
Make container element type comparison safe
2023-06-20 17:04:57 +02:00
Rémi Verschelde
248e5245e4
Merge pull request #73540 from mashumafi/fix-typed-array-add
...
Fix: Typed arrays aren't working with +
2023-06-20 15:12:39 +02:00
Danil Alexeev
a0577eb23b
GDScript: Fix `_get_script_name()` function collision for SCU build
2023-06-20 12:03:54 +03:00
Danil Alexeev
5d3f5e8cf2
GDScript: Fix crash in disassembler
2023-06-19 23:50:33 +03:00
Rémi Verschelde
c211c22abc
Merge pull request #78389 from rune-scape/rune-match-stringnames
...
GDScript: Strings and StringNames match
2023-06-19 21:18:42 +02:00
Rémi Verschelde
ae00187b58
Merge pull request #77129 from dalexeev/gds-fix-static-var-bugs-part-1
...
GDScript: Fix some bugs with static variables and functions
2023-06-19 21:18:18 +02:00
Rémi Verschelde
5f9175f969
Merge pull request #76954 from Rindbee/return-null-on-fail-load-script
...
Returns null and does not cache when the source code of the script fails to load
2023-06-19 21:17:47 +02:00
Rémi Verschelde
cfae05094a
Merge pull request #72824 from dalexeev/gds-invalid-char-error
...
GDScript: Fix invalid character error message
2023-06-19 15:39:58 +02:00
Ben
0803467334
Fix "Go to definition" for GDScript type hints
...
Fixes #68475 .
2023-06-19 15:29:25 +02:00
Fabio Alessandrelli
116f783db7
Merge pull request #76207 from dalexeev/clarify-rpc-docs
...
Clarify `@rpc` annotation arguments docs
2023-06-18 21:34:34 +02:00
Rémi Verschelde
fcc39d498b
Merge pull request #75051 from AleryBerry/fix-error-message-lua-style
...
GDScript: Fix error message for LUA-style dictionary
2023-06-18 16:28:36 +02:00
Rémi Verschelde
1a62f1e4fc
Merge pull request #74741 from vnen/variant-not-for-everyone
...
Allow boolean operators for all Variant types
2023-06-18 16:28:10 +02:00
Rémi Verschelde
4db1d09bf5
Merge pull request #73657 from mashumafi/callable-ctor
...
Fix: Get constructor as Callable
2023-06-18 16:27:42 +02:00
Rémi Verschelde
1ce2425c0e
Merge pull request #73363 from dalexeev/gds-fix-min-int-not-representable
...
GDScript: Fix `MIN_INT` not representable as numeric literal
2023-06-18 16:27:16 +02:00
Rémi Verschelde
11ee6fcef0
Merge pull request #68311 from RobertMasek/fix-go-to-definition
...
Fix functionality of Go To Definition for properties set/get
2023-06-18 16:26:42 +02:00
Danil Alexeev
aebbbda080
GDScript: Fix some bugs with static variables and functions
2023-06-16 22:52:11 +03:00
Rémi Verschelde
49b774e009
Merge pull request #77324 from anvilfolk/oh-no-its-virtual
...
GDScript: add errors when calling unimplemented virtual functions
2023-06-15 15:26:18 +02:00
Rémi Verschelde
3b4504afea
Merge pull request #75944 from akien-mga/style-modules-includes
...
Style: Harmonize header includes in modules
2023-06-15 15:26:14 +02:00
Rémi Verschelde
12e8bc558d
Merge pull request #73203 from dalexeev/gds-fix-num-literal
...
GDScript: Fix repeated `_` are allowed after decimal point
2023-06-15 15:26:09 +02:00
Rindbee
cbce374f68
Returns null and does not cache when the source code of the script fails to load
...
This usually means that an `ERR_FILE*` error occurred.
Previously, using `GDScriptCache::get_full_script()` would ignore errors during loading.
Now, all errors are not ignored.
Judging in which period the error occurred, it can be judged based on the return value:
1. null + err : Error during script loading (load_source_code()).
2. script + err: Error during script parsing.
2023-06-15 21:06:10 +08:00
Rémi Verschelde
25b2f1780a
Style: Harmonize header includes in modules
...
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:
Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.
Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:
- Local includes
* Conditional local includes
- Core includes
* Conditional core includes
- Thirdparty includes
* Conditional thirdparty includes
2023-06-15 14:35:45 +02:00
ocean (they/them)
861743cd04
GDScript: add errors when calling unimplemented virtual functions
...
This PR does a small refactor of how method flags are handled in the GDScript analyzer.
This way, it adds support for the analyzer to use any of MethodInfo's flags, where previously
it could only use METHOD_FLAG_STATIC and METHOD_FLAG_VARARG.
As a side-effect, this also normalizes behavior between editor and release templates, which fixes #76938 .
The tests added also brought a different issue to light, where using `super()` appears to generate a
return variable discarded on calling super's _init(), which doesn't have a return value. This should be
tackled in a different PR, which will have to change the output of this PR's tests.
2023-06-15 07:16:31 -04:00
Rémi Verschelde
3a319daa99
Merge pull request #77351 from anvilfolk/super-discard
...
GDScript: do not RETURN_VALUE_DISCARDED for `super()` inside `_init()`
2023-06-15 10:39:59 +02:00
Danil Alexeev
bf8f996212
GDScript: Fix conflict between property and group names
2023-06-15 08:36:10 +03:00
rune-scape
fcdd926881
GDScript: Strings and StringNames match
2023-06-14 19:24:28 -07:00
Danil Alexeev
fba8cbe6db
GDScript: Fix repeated `_` are allowed after decimal point
2023-06-14 21:47:12 +03:00
Rémi Verschelde
72b8d397d0
GDScript: Further restrict test error output for C++ errors
...
MSVC and GCC/Clang also have different function names...
2023-06-14 13:28:52 +02:00
Rémi Verschelde
c40adf027d
GDScript: Only include script file path in test error output
...
Errors originating in C++ files cause unnecessary diffs whenever the engine is updated
(line number changes, etc.) and would cause CI failures due to different formatting
of the file path on Windows (backslashes, worked around here anyway) and when using
SCU builds (`../scu` insert).
2023-06-14 10:54:49 +02:00
Rémi Verschelde
5145098e6e
Merge pull request #78138 from KoBeWi/are_we_clear
...
Clear SelfList when destroying GDScriptLanguage
2023-06-14 09:25:34 +02:00
Rémi Verschelde
8b62c52d1c
Merge pull request #75419 from vonagam/fix-super-classes-in-array-literals
...
GDScript: Allow elements of a parent class in a typed array literal
2023-06-14 09:23:32 +02:00
Danil Alexeev
ddd9aa11b3
Clarify `@rpc` annotation arguments docs
2023-06-13 21:33:48 +03:00
Rémi Verschelde
eb86dabee0
Merge pull request #77151 from dalexeev/gds-fix-call-static-from-non-static
...
GDScript: Fix calling static func from non-static is allowed
2023-06-13 18:54:19 +02:00
kobewi
c646f7df70
Clear SelfList when destroying GDScriptLanguage
2023-06-12 16:04:26 +02:00
Rémi Verschelde
577ab3c565
Merge pull request #75746 from ajreckof/order_autocomplete
...
Sort code autocompletion with rules
2023-06-08 18:14:31 +02:00
Danil Alexeev
049a49cac0
GDScript: Fix doc comment parsing (newlines and spaces)
2023-06-05 16:00:46 +03:00
Danil Alexeev
f3bf75fbb4
GDScript: Reset local variables on exit from block
2023-06-02 13:20:19 +03:00
Ninni Pipping
5e3c625e24
Add more info on the nature of NAN
2023-05-30 15:38:10 +02:00
Yuri Sizov
490a76edc8
Merge pull request #76526 from MewPurPur/improve-docs-top-sections-CORE
...
Overhaul the top sections of the class reference (Core classes)
2023-05-29 17:08:40 +02:00
Haoyu Qiu
3e88c4cd5c
Fix extraction of chained tr() calls
2023-05-27 10:38:37 +08:00
ajreckof
006e899bb3
sort code completions with rules
...
Fixups
Add levenshtein distance for comparisons, remove kind sort order, try to improve as many different use cases as possible
Trying again to improve code completion
Sort code autocompletion options by similarity based on input
To make it really brief, uses a combination `String.similiary`, the category system introduced in a previous PR, and some filtering to yield more predictable results, instead of scattering every completion option at seemingly random.
It also gives much higher priority to strings that contain the base in full, closer to the beginning or are perfect matches.
Also moves CodeCompletionOptionCompare to code_edit.cpp
Co-Authored-By: Micky <66727710+Mickeon@users.noreply.github.com>
Co-Authored-By: Eric M <41730826+EricEzaM@users.noreply.github.com>
2023-05-23 05:12:34 +02:00
ocean (they/them)
25c90836fd
GDScript: do not warn of return value discarded for super() inside _init()
...
DO NOT BATCH MERGE WITH #77324 , WILL RESULT IN BROKEN CI
Currently, calling super() inside _init() throws a
RETURN_VALUE_DISCARDED warning. The analyzer identifies super() as being a
constructor, which therefore returns an object of the relevant class.
However, super() isn't really a constructor by itself: in this case, it
is _part_ of the constructor, and so doesn't "return" a value.
A test case for this is already in #77324 , which contains the warning. I
am duplicating it here, without the warning, and it should conflict with
the other PR.
2023-05-22 09:29:34 -04:00
Rémi Verschelde
06d337af80
Merge pull request #75943 from adamscott/fix-missing-script-type-nullptr-check
...
Add missing `script_type` `nullptr` check
2023-05-22 13:48:32 +02:00
VolTer
04562662d3
Overhaul the top sections of the class reference (Core classes)
2023-05-19 07:04:48 +02:00
Max Hilbrunner
ad21fb0f92
Docs: Point to @GDScript in GDscript (script impl)
2023-05-17 13:47:33 +02:00
Danil Alexeev
3bf72be625
GDScript: Fix calling static func from non-static is allowed
2023-05-17 10:25:03 +03:00
Danil Alexeev
7da3110e6b
GDScript: Fix `validate_call_arg()` for unresolved datatype
2023-05-15 12:13:52 +03:00
Danil Alexeev
c2fbb40e9a
GDScript: Fix warning ignoring for member variables
2023-05-12 17:43:58 +03:00
smix8
a6ac305f96
Rework Navigation Avoidance
...
Rework Navigation Avoidance.
2023-05-10 05:01:58 +02:00
Rémi Verschelde
1d87b36760
Merge pull request #76824 from Calinou/doc-export-pck-binary-resource-conversion
...
Document caveats related to exported project binary resource conversion
2023-05-09 19:28:46 +02:00
Rémi Verschelde
c2ba89d9d1
Merge pull request #76790 from achernik/master
...
LSP: don't send empty completion command
2023-05-09 19:28:42 +02:00
Rémi Verschelde
10ed1d87df
Merge pull request #76490 from dsnopek/dump-gdscript-docs
...
Dump API docs from inline GDScript comments using --doctool --gdscript-docs PATH
2023-05-09 19:28:30 +02:00
David Snopek
a64137d5dd
Dump API docs from inline GDScript comments using --doctool --gdscript-docs PATH
2023-05-08 11:00:29 -05:00
Hugo Locurcio
febc674f48
Document caveats related to exported project binary resource conversion
2023-05-08 07:02:00 +02:00
Александр Черник
5715d3eb59
LSP: don't send empty completion command
2023-05-06 20:56:15 +01:00
Max Hilbrunner
921d231ad6
Merge pull request #76664 from Xenoparrot/simple-typos
2023-05-06 15:41:55 +02:00
Clay John
610877e326
Merge pull request #72288 from MewPurPur/use-string-repeat
...
Use `String.repeat()` to optimize several String methods
2023-05-05 09:56:48 -07:00
Max Hilbrunner
ce75c46331
Merge pull request #76650 from Koyper/gdscript_range_docs
2023-05-05 17:09:56 +02:00
UltraBIF
8106d33d0f
Fixed various typos across the docs
2023-05-02 18:24:32 -04:00
Koyper
bcce315a9a
Update @GDScript.xml range docs to iterate backwards.
2023-05-01 11:03:48 -05:00
VolTer
6b84e258d2
Use String.repeat() in more places
2023-05-01 02:27:46 +02:00
Rémi Verschelde
f37fc4e708
Merge pull request #76412 from dalexeev/gds-reorganize-warnings
...
GDScript: Reorganize and unify warnings
2023-04-28 18:45:48 +02:00
Rémi Verschelde
0762f20410
Merge pull request #75732 from vonagam/fix-duplicate-condition
...
GDScript: Fix unnecessary duplication of pointed out lines
2023-04-28 18:45:25 +02:00
Rémi Verschelde
f374390fc1
Merge pull request #75014 from vonagam/assert-literal-false
...
GDScript: Allow usage of literal false in assert without a warning
2023-04-28 18:45:00 +02:00
Danil Alexeev
13310f3557
GDScript: Reorganize and unify warnings
2023-04-28 18:25:11 +03:00
Rémi Verschelde
7780926b25
GDScript: Fix template_debug compilation with TOOLS/DEBUG macro mismatch
2023-04-28 11:09:12 +02:00
George Marques
0ba6048ad3
Add support for static variables in GDScript
...
Which allows editable data associated with a particular class instead of
the instance. Scripts with static variables are kept in memory
indefinitely unless the `@static_unload` annotation is used or the
`static_unload()` method is called on the GDScript.
If the custom function `_static_init()` exists it will be called when
the class is loaded, after the static variables are set.
2023-04-27 09:51:44 -03:00
Rémi Verschelde
352ebe9725
Merge pull request #76483 from vnen/gdscript-dont-fail-returning-freed-object
...
GDScript: Don't fail when freed object is return
2023-04-27 08:47:04 +02:00
Rémi Verschelde
58439ac22c
Merge pull request #74053 from vnen/gdscript-fix-disassembler-lambda-crash
...
GDScript: Fix wrong increment for disassembly of lambda
2023-04-27 08:46:40 +02:00
Rémi Verschelde
35f6a1387c
Merge pull request #76488 from YuriSizov/docs-validate-code-params
...
Validate code tags in documentation for potential params
2023-04-27 08:20:42 +02:00
Rémi Verschelde
80568be36f
Merge pull request #76481 from vnen/gdscript-test-gen-default-path
...
GDScript: Use default path in test generator if not provided
2023-04-27 08:19:54 +02:00
Yuri Sizov
391eccca76
Validate code tags in documentation for potential params
...
Adds a check to make_rst to look for matches
between the text inside of the [code][/code] tag
and known param identifiers.
Fixes most of what was revealed.
2023-04-26 21:36:04 +02:00
Yuri Sizov
26fb911f79
Merge pull request #72095 from anvilfolk/gd-docs
...
Improve GDScript documentation generation & behavior
2023-04-26 16:54:25 +02:00
Ninni Pipping
f68beeb7fa
Improvements to GDScript identifier tokenization
2023-04-26 16:29:04 +02:00
George Marques
221deb1cc1
GDScript: Use default path in test generator if not provided
...
Since it's almost always used with the same path, assume it is running
from the Godot source root.
2023-04-26 11:12:47 -03:00
George Marques
abbdf80643
GDScript: Don't fail when freed object is return
...
This is check is a bit too eager. The user should be able to handle the
return value even if it's a freed object.
2023-04-26 10:57:22 -03:00
Rémi Verschelde
45cd5dcad3
Merge pull request #75885 from AThousandShips/compound_fix
...
[GDScript] Fix incorrect compound assignment
2023-04-25 16:17:02 +02:00
Rémi Verschelde
a98997bb45
Merge pull request #76404 from sodaJar/gdrep
...
Fix wrong file name on function call error
2023-04-25 10:00:19 +02:00
Rémi Verschelde
15d952147c
Merge pull request #74101 from RandomShaper/fix_gds_obj_temps
...
Fix edge cases of object lifetime when signals involved
2023-04-25 09:58:17 +02:00
Rémi Verschelde
d45c6fd591
Merge pull request #76095 from adamscott/fix-rename-lsp-variables
...
[LSP] Fix GDScript inner method variable rename
2023-04-24 16:44:44 +02:00
Rémi Verschelde
54b0e8123e
Merge pull request #75605 from anvilfolk/type-base
...
Make GDScript type not found errors more informative.
2023-04-24 16:43:32 +02:00
sodaJar
464a299d2e
Fix wrong file on function call error
2023-04-24 15:30:51 +02:00
Adam Scott
10fe6f14bb
Fix GDScript LSP variable rename
2023-04-22 14:35:34 -04:00
ocean (they/them)
6783ff69c0
Improve and fix GDScript documentation generation & behavior
...
Removes documentation generation (docgen) from the GDScript compiler to
its own file. Adds support for GDScript enums and signal parameters and
quite a few other assorted fixes and improvements.
2023-04-21 10:17:30 -04:00
Rémi Verschelde
bf62af334b
Merge pull request #76286 from MystMagus/gdscript-mixed-tabs-and-spaces-fix
...
Fix for mixed tabs and spaces in gdscript
2023-04-20 18:08:47 +02:00
MistMage
fecbc12d17
Fix for mixed tabs and spaces in gdscript
2023-04-20 12:08:23 +02:00
Danil Alexeev
dbc3c82043
GDScript: Add some checks for `@tool` and `@icon`
2023-04-20 07:44:10 +03:00
Yuri Sizov
f3033da97d
Merge pull request #76170 from HolonProduction/string-highlight
...
Fix multi-line string highlighting with single quotes.
2023-04-18 18:01:02 +02:00
Yuri Sizov
9882af4880
Merge pull request #76197 from dalexeev/fix-error-macro-misuses
...
Fix misuses of error macros
2023-04-18 16:11:37 +02:00
Yuri Sizov
e31d391d56
Merge pull request #76090 from adamscott/fix-typo-lsp-parse-func-parameters
...
[LSP] Fix typo in parse function parameters
2023-04-18 15:57:08 +02:00
RedMser
2330ffb5a1
Add GDScript template to RichTextEffect
2023-04-18 14:02:04 +02:00
Danil Alexeev
36bedd341a
Fix misuses of error macros
2023-04-18 10:20:48 +03:00
Yuri Sizov
6596a6c1b5
Merge pull request #72979 from dalexeev/gds-annotation-parsing
...
GDScript: Fix and improve annotation parsing
2023-04-17 17:14:58 +02:00
Yuri Sizov
d220680bd0
Merge pull request #62830 from ajreckof/access-identifier-keywords
...
fix access to identifiers that are reserved keywords
2023-04-17 17:12:10 +02:00
HolonProduction
bdb7045e2c
Fix multi-line string highlighting with single quotes.
2023-04-17 15:58:39 +02:00
Adam Scott
879791e305
Fix typo when parsing LSP function parameters
2023-04-15 09:05:53 -04:00
ajreckof
ab9f60dd1a
fix access to identifiers that are reserved keywords
2023-04-14 20:37:24 +02:00
Danil Alexeev
5038a336be
GDScript: Fix and improve annotation parsing
2023-04-14 21:28:46 +03:00
Yuri Sizov
a7276f1ce0
Merge pull request #75691 from dalexeev/gds-fix-signature-generation
...
GDScript: Misc fixes and improvements for signature generation
2023-04-14 20:01:27 +02:00
Yuri Sizov
afca0b8fdd
Merge pull request #75879 from dalexeev/gds-fix-extends-crash
...
GDScript: Add missing member type check when resolving `extends`
2023-04-14 13:21:54 +02:00
Ninni Pipping
e5365da03c
[GDScript] Fix incorrect compound assignment
...
Reverts in-place compound assignments
Added test to ensure correctness
2023-04-14 11:28:44 +02:00
Adam Scott
1236302388
Add missing `script_type` `nullptr` check
...
Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
2023-04-11 12:36:28 -04:00
Pedro J. Estébanez
2f4168daeb
Fix edge cases of object lifetime when signals involved
2023-04-11 17:27:39 +02:00
George Marques
59b8c70007
GDScript: Don't use pool for reference types
...
Since they need to be properly initialized and finalized to adjust the
reference counter.
2023-04-11 16:46:31 +02:00
Fabio Alessandrelli
4ab0b38940
Merge pull request #75850 from rsubtil/bugfix-lsp_dap_connection_poll
...
Poll LSP/DAP clients for connection status updates
2023-04-11 10:19:24 +02:00
Danil Alexeev
66279b98b6
GDScript: Add missing member type check when resolving `extends`
2023-04-10 17:16:07 +03:00
VolTer
f832eb92e4
Fix mistakes in documentation and GDScript errors
2023-04-10 10:00:09 +02:00
Ricardo Subtil
4be4eeea3a
Poll LSP/DAP clients for connection status updates
2023-04-09 12:36:01 +01:00
Danil Alexeev
9df96e97ea
GDScript: Misc fixes and improvements for signature generation
...
* Use type hints for `@GlobalScope` enums.
* Use plain `int` for `BitMask<T>`.
* Fix type hints for typed arrays.
* Use `Variant` and `void` type hints.
* Discard unnecessary class prefix.
2023-04-07 10:43:21 +03:00
Dmitrii Maganov
5dc717c5fd
GDScript: Fix unnecessary duplication of pointed out lines
2023-04-06 06:12:32 +03:00
ocean (they/them)
5d164df4e1
Make type not found errors more informative.
...
This PR removes a check for whether a datatype is a meta type when
generating a datatype's to_string() result. This means that error
messages that fail to find the type will now print their class names,
which is much more useful when trying to identify errors.
2023-04-02 18:30:30 -04:00
Araraura
e1c0df7048
Fix typo and slightly reword in @GDScript.xml
...
Fix "the every following property" to "then every following property" and change "is added" to "will be added".
2023-03-31 20:30:29 +00:00
Dmitrii Maganov
8655d979a1
GDScript: Allow elements of a parent class in a typed array literal
2023-03-28 13:47:24 +03:00
AleryBerry
0550f3682b
GDScript: Fix error message for Lua-style dictionary
2023-03-20 21:45:06 +00:00
Yuri Sizov
a008a06fcb
Merge pull request #72056 from resistor/master
...
[GDScript] Perform update-and-assign operations in place when possible.
2023-03-20 19:16:30 +01:00
Yuri Sizov
215893ebca
Merge pull request #74949 from dalexeev/gds-fix-await-warning
...
GDScript: Fix false positive `REDUNDANT_AWAIT` warning
2023-03-20 19:14:15 +01:00
Yuri Sizov
5461b9976c
Merge pull request #74844 from vonagam/change-class-extends-parsing
...
GDScript: Change parser representation of class extends
2023-03-20 19:13:23 +01:00
Yuri Sizov
a5f34744a2
Merge pull request #74842 from vonagam/fix-builtin-shadow
...
GDScript: Fix missing warning for shadowing of built-in types
2023-03-20 19:10:13 +01:00
Hugo Locurcio
4e4555bea5
Improve Color8 documentation
...
This documents in which situations Color8 is most suited and its
precision limitations.
2023-03-19 17:42:15 +01:00
Dmitrii Maganov
5d0b183822
GDScript: Allow usage of literal false in assert without a warning
2023-03-17 05:37:56 +02:00
Danil Alexeev
c0eeb32e38
GDScript: Fix false positive `REDUNDANT_AWAIT` warning
2023-03-16 14:04:14 +03:00
Dmitrii Maganov
4e34cf238a
GDScript: Change parser representation of class extends
2023-03-13 01:40:13 +02:00
Dmitrii Maganov
703274fd04
GDScript: Fix missing warning for shadowing of built-in types
2023-03-13 00:49:34 +02:00
George Marques
d76b3f2a4c
GDScript: Allow boolean operators between any types
...
To make consistent with previous behavior. Mostly to be used in
conditions for `if` and `while`.
2023-03-10 16:01:17 -03:00
Dmitrii Maganov
e289a4ab2c
GDScript: Fix autocomplete inside a block with a type test condition
2023-03-09 23:53:27 +02:00
Yuri Sizov
496bd94c21
Prevent cache corruption when saving resources in the editor
2023-03-08 19:46:55 +01:00
Rémi Verschelde
9eaaeef76d
Merge pull request #73410 from MewPurPur/Fixin-error-spam-2-Electric-Boogaloo
...
Fix error spam when naming a func at the end of the script
2023-03-08 08:54:57 +01:00
VolTer
07dd627728
Fix error spam when naming a func at the end of the script
2023-03-07 23:42:40 +01:00
Rémi Verschelde
2a5fc1fe6c
Merge pull request #74306 from dalexeev/gds-var-colon-style
...
Fix GDScript code style regarding colon
2023-03-06 10:49:11 +01:00
Danil Alexeev
ea5fd3d732
Fix GDScript code style regarding colon
2023-03-05 17:03:20 +03:00
Rémi Verschelde
a0134f7fbc
Merge pull request #74147 from vonagam/fix-call-await-check-in-compiler
...
GDScript: Fix checking if a call is awaited in compiler
2023-03-05 13:23:27 +01:00
Rémi Verschelde
326c0f324a
Merge pull request #74184 from MewPurPur/fix-number-highlighting-in-wrong-places
...
Make GDScript Number highlighting stricter
2023-03-03 11:07:04 +01:00
VolTer
952703d921
Make GDScript number highlighting stricter
2023-03-01 21:27:32 +01:00
Dmitrii Maganov
55a2ad25bf
GDScript: Fix checking if a call is awaited in compiler
2023-03-01 09:31:35 +02:00
Rémi Verschelde
1c1524a651
Bump version to 4.1-dev
...
Can't stop, won't stop, they said, huh?
2023-03-01 01:44:37 +01:00
Rémi Verschelde
491ded1898
Minor typo and docs URL fixes
2023-02-28 13:38:01 +01:00
George Marques
5b49382d38
GDScript: Fix wrong increment for disassembly of lambda
2023-02-27 11:19:22 -03:00
voidedWarranties
bd5ab9f9b4
Remove unused `ScriptLanguage` methods
2023-02-26 22:30:56 -08:00
Rémi Verschelde
c0f1ed57c4
Merge pull request #73915 from vonagam/fix-conversions-from-native-member
...
GDScript: Fix conversions from native members accessed by identifier
2023-02-26 19:02:27 +01:00
Rémi Verschelde
1bd0b296e1
Merge pull request #73964 from vonagam/fix-coroutine-compiler-type
...
GDScript: Fix address type for coroutine results
2023-02-26 16:00:17 +01:00
Rémi Verschelde
92d47f84fe
Merge pull request #73957 from vonagam/fix-binary-op-safety
...
GDScript: Fix wrong unsafety mark for binary operator
2023-02-26 15:59:54 +01:00
Rémi Verschelde
c118790eb9
Merge pull request #73899 from vnen/gdscript-init-defaults-beforehand
...
GDScript: Initialize all defaults beforehand in implicit constructor
2023-02-26 15:59:27 +01:00
Dmitrii Maganov
4efaf15605
GDScript: Fix address type for coroutine results
2023-02-26 08:30:46 +02:00