Commit Graph

357 Commits

Author SHA1 Message Date
37d1dfef9d Merge pull request #78000 from RandomShaper/let_users_mess_up
Let user scripts disable thread safety checks
2023-06-10 12:12:13 +02:00
2b001db76e Let user scripts disable thread safety checks 2023-06-09 18:24:01 +02:00
577ab3c565 Merge pull request #75746 from ajreckof/order_autocomplete
Sort code autocompletion with rules
2023-06-08 18:14:31 +02:00
aa5dfff3f0 Merge pull request #77410 from dsnopek/object-pointer-pointer-encoding
Standardize Object ptrcall encoding on `Object **`
2023-06-07 13:31:49 +02:00
97a6b40e4e Merge pull request #70386 from sfrembling/70141
Add Human Readable Error Message for Object::set_meta
2023-05-29 17:24:25 +02:00
77733faede Attempt to standardize Object ptrcall encoding on Object ** 2023-05-25 21:46:22 -05:00
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
80bf8fd186 Merge pull request #73511 from dsnopek/gdextension-object-name
Add GDExtension function to get Object class name
2023-05-22 14:02:59 +02:00
c6b0d4aae3 Add GDExtension function to get Object class name 2023-05-22 06:58:59 -05:00
9ad9820f5d Merge pull request #77229 from RandomShaper/fix_mt_issues
Fix message queue issues
2023-05-19 14:30:10 +02:00
c450260e3e Fix message queue issues
- Missing flush in resource loading.
- Wrong checks about message queue instance.
2023-05-19 13:11:34 +02:00
9c9fd9ffbf Improve error message when disconnecting callable from signal it was not connected to 2023-05-18 00:46:27 +02:00
26f96aec9d Merge pull request #77143 from RandomShaper/fix_wtp_deadlocks
Avoid multiple possibilites of deadlock in resource loading
2023-05-17 15:59:18 +02:00
56fc6316b7 Merge pull request #64789 from derammo/derammo_const_ref
Change Ref<T> to allow non const access to ptr
2023-05-17 11:25:13 +02:00
a6e43f71b6 Avoid multiple possibilites of deadlock in resource loading 2023-05-17 01:52:39 +02:00
8cfa19a078 Merge pull request #77000 from reduz/make-more-base-nodes-thread-safe
Make more base nodes thread safe
2023-05-16 00:31:56 +02:00
0d6487073f update error from Object::set_meta to be more human readable
update error from Object::set_meta to be more human readable

Add metadata to error message

Add metadata to identifier
2023-05-15 15:14:45 -05:00
0a9f72d5a8 Make more base nodes thread safe
Ongoing work to make more of the base nodes thread safe.
2023-05-15 16:54:10 +02:00
5c653c27cd Merge pull request #77093 from RandomShaper/fix_mq_copy
Fix transfer of messages between queues
2023-05-15 13:47:18 +02:00
70dcfdab1f Merge pull request #76446 from reduz/add-gdextension-api-compatibility
Add a backwards-compatibility system for GDExtension
2023-05-15 13:43:46 +02:00
d8078d3f4c Add a backwards-compatibility system for GDExtension method
This adds a way to ensure that methods that were modified in the Godot API will continue working in older builds of GDExtension even if the new signature is different.

```C++
// New version (changed)
ClassDB::bind_method(D_METHOD("add_sphere","radius","position"),&MyShapes::add_sphere);
// Compatibility version (still available to extensions).
ClassDB::bind_compatibility_method(D_METHOD("add_sphere","radius"),&MyShapes::_compat_add_sphere);
```

**Q**: If I add an extra argument and provide a default value (hence can still be called the same), do I still have to provide the compatibility version?
**A**: Yes, you must still provide a compatibility method. Most language bindings use the raw method pointer to do the call and process the default parameters in the binding language, hence if the actual method signature changes it will no longer work.

**Q**: If I removed a method, can I still bind a compatibility version even though the main method no longer exists?
**A**: Yes, for methods that were removed or renamed, compatibility versions can still be provided.

**Q**: Would it be possible to automate checking that methods were removed by mistake?
**A**: Yes, as part of a future PR, the idea is to add a a command line option to Godot that can be run like : `$ godot --test-api-compatibility older_api_dump.json`, which will also be integrated to the CI runs.
2023-05-15 12:05:40 +02:00
93de52942a Fix transfer of messages between queues 2023-05-15 11:51:58 +02:00
20ed51a912 Merge pull request #72704 from myaaaaaaaaa/single-main-thread
Partial fixes for `threading/worker_pool/max_threads` = 0
2023-05-12 15:09:50 +02:00
123ba9d464 WorkerThreadPool: Handle exit signal in the tentative scheduling done during waits 2023-05-12 13:31:04 +02:00
fcd8ce52e9 Partial fixes for threading/worker_pool/max_threads = 0 2023-05-12 07:27:35 -04:00
8f17f26233 Merge pull request #76978 from raulsntos/property-hint-compat
Reorder `PropertyHint` enum to avoid breaking compat
2023-05-12 10:06:32 +02:00
a34207b812 Reorder PropertyHint enum to avoid breaking compat
Also syncs the Core enum with the C# enum for the source generators.
2023-05-12 01:48:07 +02:00
9077bb9232 Fix multiple issues in WorkerThreadPool
- Fix project settings being ignored.
- Made usages of `native_thread_allocator` thread-safe.
- Remove redundant thread-safety from `low_priority_threads_used`, `exit_threads`.
- Fix deadlock due to unintended extra lock of `task_mutex`.
2023-05-11 16:10:09 +02:00
5a4613f551 Avoid sync issues in resources with deferred updates 2023-05-10 18:53:41 +02:00
74e5ad5c60 Merge pull request #76165 from and-rad/safe-credentials
Store sensitive export options in dedicated credentials file
2023-05-10 12:47:07 +02:00
5271186f2f Merge pull request #75901 from reduz/refactor-node-processing
Refactor Node Processing to allow Scene Multithreading
2023-05-10 12:46:44 +02:00
fab160ce70 Store sensitive export options in dedicated credentials file 2023-05-10 11:40:17 +02:00
a6ac305f96 Rework Navigation Avoidance
Rework Navigation Avoidance.
2023-05-10 05:01:58 +02:00
98c655ec8d Refactor Node Processing
* Node processing works on the concept of process groups.
* A node group can be inherited, run on main thread, or a sub-thread.
* Groups can be ordered.
* Process priority is now present for physics.

This is the first steps towards implementing https://github.com/godotengine/godot-proposals/issues/6424.
No threading or thread guards exist yet in most of the scene code other than Node. That will have to be added later.
2023-05-09 19:17:51 +02:00
ee931e2be5 Merge pull request #76814 from KoBeWi/underdata
Don't refresh inspector when changing internal meta
2023-05-09 17:44:49 +02:00
3e6a731904 Merge pull request #76418 from reduz/method-bind-validated-call
Add ValidatedCall to MethodBind
2023-05-08 13:52:42 +02:00
353efd774f Merge pull request #76754 from RandomShaper/mq_less_lock
Avoid redundant locking in CallQueue
2023-05-08 12:20:53 +02:00
0daa634f24 Merge pull request #76747 from RandomShaper/fix_mq_redundant
Mend some checks in CallQueue
2023-05-08 12:20:45 +02:00
5e3a985c91 Don't refresh inspector when changing internal meta 2023-05-07 22:12:22 +02:00
5a0c186bc0 Avoid redundant locking in CallQueue 2023-05-05 19:39:11 +02:00
8654e90759 Mend some checks in CallQueue 2023-05-05 17:37:44 +02:00
1a4eccf7e7 Prevent infinite loop when signal disconnection fails during object deletion. 2023-05-05 13:34:25 +02:00
1c93606e47 Add ValidatedCall to MethodBind
* This should optimize GDScript function calling _enormously_.
* It also should simplify the GDScript VM considerably.

NOTE: GDExtension calling performance has most likely been affected until going via ptrcall is fixed.
2023-04-30 20:01:26 +02:00
a79e71ad58 Add peace-of-mind checks to API hash caching 2023-04-26 10:44:52 +02:00
e0e93ce094 Merge pull request #72421 from myaaaaaaaaa/signal-hashmap
Store Object signals in a HashMap rather than a VMap
2023-04-25 19:26:35 +02:00
aa622dae53 Merge pull request #76431 from RandomShaper/fix_doc_help_cache
Improve reliability of editor docs cache
2023-04-25 14:44:17 +02:00
e1ce0340b7 Improve reliability of editor docs cache 2023-04-25 11:40:56 +02:00
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
33f674d0f7 Complete support of callables of static methods 2023-04-12 18:12:19 +02:00
6055e4424a Redo of Message Queue
* Functionality moved to a base class CallQueue, which will be used for inter-thread communication within the scene.
* MessageQueue now uses growing pages, starts from a single 4k page.
* Limit still exists, but because its not allocated by default, it can be much higher.
2023-04-12 16:31:23 +02:00