Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Godot 4.0 adaption #378

Merged
merged 57 commits into from
Aug 7, 2022
Merged

Godot 4.0 adaption #378

merged 57 commits into from
Aug 7, 2022

Conversation

bitbrain
Copy link
Contributor

@bitbrain bitbrain commented Jul 30, 2022

Once #379 is merged this PR should become more readable.

This branch is another attempt at porting this addon to Godot 4. For most of the files, I used the --convert-3to4 flag on the Godot 4 (alpha13) executable.

I used latest master for this, why it also contains more commits than just the Godot 4 changes.

The other files need to be migrated manually.

Output:

Godot Engine v4.0.alpha.custom_build.cca072aa8 - https://godotengine.org
 
Starting conversion.
Trying to convert       1/182 file - "BigFont.tres" with size - 0 KB
    File was not changed, checking took 10 ms.
Trying to convert       2/182 file - "BigFontTheme.tres" with size - 0 KB
    File was not changed, checking took 10 ms.
Trying to convert       3/182 file - "default_env.tres" with size - 0 KB
    File was not changed, checking took 12 ms.
Trying to convert       4/182 file - "project.godot" with size - 0 KB
    File was not changed, checking took 0 ms.
Trying to convert       5/182 file - "test/gut_test.gd" with size - 1 KB
    File was not changed, checking took 44 ms.
Trying to convert       6/182 file - "test/post_run_export_json.gd" with size - 0 KB
    File was not changed, checking took 18 ms.
Trying to convert       7/182 file - "test/unit/test_autofree.gd" with size - 1 KB
    File was changed, conversion took 45 ms.
Trying to convert       8/182 file - "test/unit/test_command_line_auto_load.gd" with size - 0 KB
    File was not changed, checking took 18 ms.
Trying to convert       9/182 file - "test/unit/test_comparator.gd" with size - 7 KB
    File was not changed, checking took 147 ms.
Trying to convert       10/182 file - "test/unit/test_compare_result.gd" with size - 0 KB
    File was not changed, checking took 23 ms.
Trying to convert       11/182 file - "test/unit/test_diff_formatter.gd" with size - 5 KB
    File was changed, conversion took 98 ms.
Trying to convert       12/182 file - "test/unit/test_diff_tool.gd" with size - 12 KB
    File was not changed, checking took 247 ms.
Trying to convert       13/182 file - "test/unit/test_doubler.gd" with size - 22 KB
    File was changed, conversion took 415 ms.
Trying to convert       14/182 file - "test/unit/test_gut.gd" with size - 24 KB
    File was changed, conversion took 433 ms.
Trying to convert       15/182 file - "test/unit/test_gut_directory.gd" with size - 5 KB
    File was changed, conversion took 114 ms.
Trying to convert       16/182 file - "test/unit/test_gut_yielding.gd" with size - 7 KB
    File was changed, conversion took 132 ms.
Trying to convert       17/182 file - "test/unit/test_i288_wait_times.gd" with size - 1 KB
    File was changed, conversion took 38 ms.
Trying to convert       18/182 file - "test/unit/test_input_factory.gd" with size - 5 KB
    File was changed, conversion took 106 ms.
Trying to convert       19/182 file - "test/unit/test_input_sender.gd" with size - 20 KB
    File was changed, conversion took 391 ms.
Trying to convert       20/182 file - "test/unit/test_junit_xml_export.gd" with size - 2 KB
    File was changed, conversion took 65 ms.
Trying to convert       21/182 file - "test/unit/test_logger.gd" with size - 2 KB
    File was not changed, checking took 53 ms.
Trying to convert       22/182 file - "test/unit/test_method_maker.gd" with size - 5 KB
    File was not changed, checking took 116 ms.
Trying to convert       23/182 file - "test/unit/test_one_to_many.gd" with size - 1 KB
    File was not changed, checking took 31 ms.
Trying to convert       24/182 file - "test/unit/test_orphan_counter.gd" with size - 1 KB
    File was not changed, checking took 37 ms.
Trying to convert       25/182 file - "test/unit/test_parameter_factory.gd" with size - 1 KB
    File was not changed, checking took 35 ms.
Trying to convert       26/182 file - "test/unit/test_parameter_handler.gd" with size - 1 KB
    File was not changed, checking took 36 ms.
Trying to convert       27/182 file - "test/unit/test_print.gd" with size - 4 KB
    File was changed, conversion took 82 ms.
Trying to convert       28/182 file - "test/unit/test_result_exporter.gd" with size - 7 KB
    File was not changed, checking took 138 ms.
Trying to convert       29/182 file - "test/unit/test_signal_watcher.gd" with size - 9 KB
    File was changed, conversion took 182 ms.
Trying to convert       30/182 file - "test/unit/test_spy.gd" with size - 5 KB
    File was not changed, checking took 98 ms.
Trying to convert       31/182 file - "test/unit/test_strutils.gd" with size - 5 KB
    File was changed, conversion took 112 ms.
Trying to convert       32/182 file - "test/unit/test_stubber.gd" with size - 9 KB
    File was changed, conversion took 192 ms.
Trying to convert       33/182 file - "test/unit/test_stub_params.gd" with size - 4 KB
    File was not changed, checking took 89 ms.
Trying to convert       34/182 file - "test/unit/test_summary.gd" with size - 4 KB
    File was not changed, checking took 99 ms.
Trying to convert       35/182 file - "test/unit/test_test.gd" with size - 66 KB
    File was changed, conversion took 1208 ms.
Trying to convert       36/182 file - "test/unit/test_test_collector.gd" with size - 7 KB
    File was changed, conversion took 167 ms.
Trying to convert       37/182 file - "test/unit/test_utils.gd" with size - 3 KB
    File was changed, conversion took 71 ms.
Trying to convert       38/182 file - "test/unit/verify_signal_watches_are_cleared.gd" with size - 0 KB
    File was not changed, checking took 26 ms.
Trying to convert       39/182 file - "test/unit/test_bugs/test_i368_WebSocketClient_double.gd" with size - 1 KB
    File was changed, conversion took 34 ms.
Trying to convert       40/182 file - "test/samples/test_before_after.gd" with size - 0 KB
    File was not changed, checking took 23 ms.
Trying to convert       41/182 file - "test/samples/test_output_demo.gd" with size - 0 KB
    File was not changed, checking took 22 ms.
Trying to convert       42/182 file - "test/samples/test_readme_examples.gd" with size - 25 KB
    File was changed, conversion took 428 ms.
Trying to convert       43/182 file - "test/samples/test_sample_all_passed.gd" with size - 0 KB
    File was not changed, checking took 16 ms.
Trying to convert       44/182 file - "test/samples/test_sample_one.gd" with size - 1 KB
    File was changed, conversion took 37 ms.
Trying to convert       45/182 file - "test/samples/test_sample_two.gd" with size - 0 KB
    File was not changed, checking took 14 ms.
Trying to convert       46/182 file - "test/samples/two_pass_pending_fail.gd" with size - 0 KB
    File was not changed, checking took 19 ms.
Trying to convert       47/182 file - "test/resources/ExtendsNativeScript.gd" with size - 0 KB
    File was not changed, checking took 13 ms.
Trying to convert       48/182 file - "test/resources/has_asserts_in_beforeall_and_afterall.gd" with size - 1 KB
    File was not changed, checking took 34 ms.
Trying to convert       49/182 file - "test/resources/non_hook_script.gd" with size - 0 KB
    File was not changed, checking took 11 ms.
Trying to convert       50/182 file - "test/resources/per_test_assert_tracking.gd" with size - 0 KB
    File was not changed, checking took 17 ms.
Trying to convert       51/182 file - "test/resources/post_run_script.gd" with size - 0 KB
    File was not changed, checking took 14 ms.
Trying to convert       52/182 file - "test/resources/pre_run_script.gd" with size - 0 KB
    File was not changed, checking took 14 ms.
Trying to convert       53/182 file - "test/resources/SceneNoScript.tscn" with size - 0 KB
    File was changed, conversion took 15 ms.
Trying to convert       54/182 file - "test/resources/state_check_tests.gd" with size - 1 KB
    File was not changed, checking took 46 ms.
Trying to convert       55/182 file - "test/resources/yield_in_before_after_methods.gd" with size - 1 KB
    File was changed, conversion took 31 ms.
Trying to convert       56/182 file - "test/resources/test_assert_setget_test_objects/TestScene.tscn" with size - 0 KB
    File was not changed, checking took 20 ms.
Trying to convert       57/182 file - "test/resources/test_assert_setget_test_objects/test_node.gd" with size - 1 KB
    File was changed, conversion took 36 ms.
Trying to convert       58/182 file - "test/resources/test_assert_setget_test_objects/test_scene.gd" with size - 0 KB
    File was changed, conversion took 18 ms.
Trying to convert       59/182 file - "test/resources/test_assert_setget_test_objects/readme_examples/health.gd" with size - 0 KB
    File was changed, conversion took 19 ms.
Trying to convert       60/182 file - "test/resources/test_assert_setget_test_objects/readme_examples/HealthBar.tscn" with size - 
0 KB
    File was changed, conversion took 22 ms.
Trying to convert       61/182 file - "test/resources/test_assert_setget_test_objects/readme_examples/health_bar.gd" with size - 0 KB
    File was changed, conversion took 19 ms.
Trying to convert       62/182 file - "test/resources/stub_test_objects/has_stub_metadata.gd" with size - 0 KB
    File was not changed, checking took 20 ms.
Trying to convert       63/182 file - "test/resources/stub_test_objects/init_parameters.gd" with size - 0 KB
    File was not changed, checking took 14 ms.
Trying to convert       64/182 file - "test/resources/stub_test_objects/to_stub.gd" with size - 0 KB
    File was not changed, checking took 18 ms.
Trying to convert       65/182 file - "test/resources/spy_test_objects/simple.gd" with size - 0 KB
    File was not changed, checking took 13 ms.
Trying to convert       66/182 file - "test/resources/replace_node_scenes/arena.gd" with size - 0 KB
    File was not changed, checking took 16 ms.
Trying to convert       67/182 file - "test/resources/replace_node_scenes/Arena.tscn" with size - 0 KB
    File was not changed, checking took 22 ms.
Trying to convert       68/182 file - "test/resources/parsing_and_loading_samples/bad_prefix.gd" with size - 0 KB
    File was not changed, checking took 15 ms.
Trying to convert       69/182 file - "test/resources/parsing_and_loading_samples/ConstObject.tscn" with size - 0 KB
    File was not changed, checking took 12 ms.
Trying to convert       70/182 file - "test/resources/parsing_and_loading_samples/const_object.gd" with size - 0 KB
    File was not changed, checking took 18 ms.
Trying to convert       71/182 file - "test/resources/parsing_and_loading_samples/extends_another_thing.gd" with size - 0 KB
    File was not changed, checking took 16 ms.
Trying to convert       72/182 file - "test/resources/parsing_and_loading_samples/has_inner_class.gd" with size - 0 KB
    File was not changed, checking took 23 ms.
Trying to convert       73/182 file - "test/resources/parsing_and_loading_samples/inner_classes_check_before_after.gd" with size - 0 KB
    File was not changed, checking took 26 ms.
Trying to convert       74/182 file - "test/resources/parsing_and_loading_samples/parse_samples.gd" with size - 0 KB
    File was not changed, checking took 15 ms.
Trying to convert       75/182 file - "test/resources/parsing_and_loading_samples/test_has_inner_class.gd" with size - 0 KB
    File was not changed, checking took 25 ms.
Trying to convert       76/182 file - "test/resources/parsing_and_loading_samples/test_only_inner_classes.gd" with size - 0 KB    
    File was not changed, checking took 18 ms.
Trying to convert       77/182 file - "test/resources/parsing_and_loading_samples/test_samples.gd" with size - 1 KB
    File was changed, conversion took 36 ms.
Trying to convert       78/182 file - "test/resources/parsing_and_loading_samples/test_samples2.gd" with size - 1 KB
    File was changed, conversion took 36 ms.
Trying to convert       79/182 file - "test/resources/parsing_and_loading_samples/test_samples3.gd" with size - 1 KB
    File was changed, conversion took 36 ms.
Trying to convert       80/182 file - "test/resources/parsing_and_loading_samples/test_with_parameters.gd" with size - 1 KB       
    File was changed, conversion took 36 ms.
Trying to convert       81/182 file - "test/resources/exporter_test_files/test_has_error_and_warning.gd" with size - 0 KB
    File was not changed, checking took 15 ms.
Trying to convert       82/182 file - "test/resources/exporter_test_files/test_simple.gd" with size - 0 KB
    File was not changed, checking took 19 ms.
Trying to convert       83/182 file - "test/resources/exporter_test_files/test_simple_2.gd" with size - 0 KB
    File was not changed, checking took 15 ms.
Trying to convert       84/182 file - "test/resources/exporter_test_files/test_with_inner_classes.gd" with size - 0 KB
    File was not changed, checking took 19 ms.
Trying to convert       85/182 file - "test/resources/doubler_test_objects/class_with_init_params.gd" with size - 0 KB
    File was not changed, checking took 13 ms.
Trying to convert       86/182 file - "test/resources/doubler_test_objects/double_default_parameters.gd" with size - 0 KB
    File was not changed, checking took 13 ms.
Trying to convert       87/182 file - "test/resources/doubler_test_objects/double_extends_node2d.gd" with size - 0 KB
    File was changed, conversion took 15 ms.
Trying to convert       88/182 file - "test/resources/doubler_test_objects/double_extends_window_dialog.gd" with size - 0 KB      
    File was changed, conversion took 14 ms.
Trying to convert       89/182 file - "test/resources/doubler_test_objects/double_me.gd" with size - 0 KB
    File was changed, conversion took 19 ms.
Trying to convert       90/182 file - "test/resources/doubler_test_objects/double_me_scene.gd" with size - 0 KB
    File was changed, conversion took 16 ms.
Trying to convert       91/182 file - "test/resources/doubler_test_objects/double_me_scene.tscn" with size - 0 KB
    File was changed, conversion took 20 ms.
Trying to convert       92/182 file - "test/resources/doubler_test_objects/has_static_method.gd" with size - 0 KB
    File was not changed, checking took 13 ms.
Trying to convert       93/182 file - "test/resources/doubler_test_objects/inner_classes.gd" with size - 0 KB
    File was not changed, checking took 21 ms.
Trying to convert       94/182 file - "test/panel_demo_scripts/test_all_passing.gd" with size - 0 KB
    File was not changed, checking took 23 ms.
Trying to convert       95/182 file - "test/panel_demo_scripts/test_inner_classes.gd" with size - 0 KB
    File was not changed, checking took 23 ms.
Trying to convert       96/182 file - "test/panel_demo_scripts/test_totals_testing.gd" with size - 1 KB
    File was not changed, checking took 33 ms.
Trying to convert       97/182 file - "test/panel_demo_scripts/test_with_parameters.gd" with size - 0 KB
    File was not changed, checking took 21 ms.
Trying to convert       98/182 file - "test/integration/test_doubler_and_spy.gd" with size - 2 KB
    File was not changed, checking took 58 ms.
Trying to convert       99/182 file - "test/integration/test_doubler_and_stubber.gd" with size - 6 KB
    File was changed, conversion took 122 ms.
Trying to convert       100/182 file - "test/integration/test_everything_together.gd" with size - 1 KB
    File was changed, conversion took 32 ms.
Trying to convert       101/182 file - "test/integration/test_gut_and_spy.gd" with size - 0 KB
    File was changed, conversion took 26 ms.
Trying to convert       102/182 file - "test/integration/test_gut_and_stubber.gd" with size - 1 KB
    File was changed, conversion took 59 ms.
Trying to convert       103/182 file - "test/integration/test_gut_import_export.gd" with size - 2 KB
    File was not changed, checking took 62 ms.
Trying to convert       104/182 file - "test/integration/test_gut_integration.gd" with size - 3 KB
    File was changed, conversion took 72 ms.
Trying to convert       105/182 file - "test/integration/test_sample_all_passed_integration.gd" with size - 0 KB
    File was not changed, checking took 17 ms.
Trying to convert       106/182 file - "test/integration/test_test_stubber_doubler.gd" with size - 15 KB
    File was changed, conversion took 286 ms.
Trying to convert       107/182 file - "test/integration/test_this_script_has_a_really_long_name_to_test_display.gd" with size - 0 KB
    File was not changed, checking took 13 ms.
Trying to convert       108/182 file - "templates/test_.gd" with size - 0 KB
    File was not changed, checking took 17 ms.
Trying to convert       109/182 file - "scripts/global.gd" with size - 0 KB
    File was not changed, checking took 18 ms.
Trying to convert       110/182 file - "scripts/main.gd" with size - 5 KB
    File was changed, conversion took 101 ms.
Trying to convert       111/182 file - "scratch/call_func_with_var_as_parameter.gd" with size - 2 KB
    File was not changed, checking took 48 ms.
Trying to convert       112/182 file - "scratch/children.gd" with size - 0 KB
    File was changed, conversion took 20 ms.
Trying to convert       113/182 file - "scratch/double_a_node_in_tree.gd" with size - 1 KB
    File was changed, conversion took 37 ms.
Trying to convert       114/182 file - "scratch/find_bad_methods.gd" with size - 3 KB
    File was changed, conversion took 65 ms.
Trying to convert       115/182 file - "scratch/get_info.gd" with size - 8 KB
    File was changed, conversion took 158 ms.
Trying to convert       116/182 file - "scratch/make_class_from_string.gd" with size - 2 KB
    File was changed, conversion took 45 ms.
Trying to convert       117/182 file - "scratch/overload_print.gd" with size - 0 KB
    File was changed, conversion took 20 ms.
Trying to convert       118/182 file - "scratch/super_funcref.gd" with size - 0 KB
    File was not changed, checking took 18 ms.
Trying to convert       119/182 file - "scenes/main.tscn" with size - 1 KB
    File was changed, conversion took 35 ms.
Trying to convert       120/182 file - "scenes/TestGutGui.gd" with size - 1 KB
    File was changed, conversion took 35 ms.
Trying to convert       121/182 file - "scenes/TestGutGui.tscn" with size - 1 KB
    File was changed, conversion took 36 ms.
Trying to convert       122/182 file - "scenes/TestPrint.gd" with size - 1 KB
    File was changed, conversion took 39 ms.
Trying to convert       123/182 file - "scenes/TestPrint.tscn" with size - 1 KB
    File was changed, conversion took 30 ms.
Trying to convert       124/182 file - "scenes/TestShortcuts.gd" with size - 0 KB
    File was not changed, checking took 20 ms.
Trying to convert       125/182 file - "scenes/TestShortcuts.tscn" with size - 0 KB
    File was changed, conversion took 29 ms.
Trying to convert       126/182 file - "addons/gut/autofree.gd" with size - 2 KB
    File was changed, conversion took 52 ms.
Trying to convert       127/182 file - "addons/gut/comparator.gd" with size - 3 KB
    File was not changed, checking took 74 ms.
Trying to convert       128/182 file - "addons/gut/compare_result.gd" with size - 0 KB
    File was changed, conversion took 29 ms.
Trying to convert       129/182 file - "addons/gut/diff_formatter.gd" with size - 1 KB
    File was not changed, checking took 39 ms.
Trying to convert       130/182 file - "addons/gut/diff_tool.gd" with size - 3 KB
    File was changed, conversion took 78 ms.
Trying to convert       131/182 file - "addons/gut/doubler.gd" with size - 20 KB
    File was changed, conversion took 346 ms.
Trying to convert       132/182 file - "addons/gut/get_native_script.gd" with size - 0 KB
    File was not changed, checking took 16 ms.
Trying to convert       133/182 file - "addons/gut/gut.gd" with size - 61 KB
    File was changed, conversion took 958 ms.
Trying to convert       134/182 file - "addons/gut/GutScene.gd" with size - 13 KB
    File was changed, conversion took 235 ms.
Trying to convert       135/182 file - "addons/gut/GutScene.tscn" with size - 17 KB
    File was changed, conversion took 275 ms.
Trying to convert       136/182 file - "addons/gut/gut_cmdln.gd" with size - 13 KB
    File was changed, conversion took 216 ms.
Trying to convert       137/182 file - "addons/gut/gut_config.gd" with size - 4 KB
    File was changed, conversion took 92 ms.
Trying to convert       138/182 file - "addons/gut/gut_plugin.gd" with size - 0 KB
    File was changed, conversion took 25 ms.
Trying to convert       139/182 file - "addons/gut/hook_script.gd" with size - 1 KB
    File was changed, conversion took 33 ms.
Trying to convert       140/182 file - "addons/gut/input_factory.gd" with size - 4 KB
    File was changed, conversion took 83 ms.
Trying to convert       141/182 file - "addons/gut/input_sender.gd" with size - 9 KB
    File was changed, conversion took 176 ms.
Trying to convert       142/182 file - "addons/gut/junit_xml_export.gd" with size - 2 KB
    File was not changed, checking took 55 ms.
Trying to convert       143/182 file - "addons/gut/logger.gd" with size - 9 KB
    File was not changed, checking took 161 ms.
Trying to convert       144/182 file - "addons/gut/method_maker.gd" with size - 10 KB
    File was changed, conversion took 201 ms.
Trying to convert       145/182 file - "addons/gut/one_to_many.gd" with size - 1 KB
    File was not changed, checking took 30 ms.
Trying to convert       146/182 file - "addons/gut/optparse.gd" with size - 8 KB
    File was changed, conversion took 145 ms.
Trying to convert       147/182 file - "addons/gut/orphan_counter.gd" with size - 2 KB
    File was not changed, checking took 54 ms.
Trying to convert       148/182 file - "addons/gut/parameter_factory.gd" with size - 3 KB
    File was not changed, checking took 61 ms.
Trying to convert       149/182 file - "addons/gut/parameter_handler.gd" with size - 0 KB
    File was not changed, checking took 25 ms.
Trying to convert       150/182 file - "addons/gut/plugin_control.gd" with size - 10 KB
    File was changed, conversion took 173 ms.
Trying to convert       151/182 file - "addons/gut/printers.gd" with size - 4 KB
    File was changed, conversion took 87 ms.
Trying to convert       152/182 file - "addons/gut/result_exporter.gd" with size - 2 KB
    File was not changed, checking took 56 ms.
Trying to convert       153/182 file - "addons/gut/signal_watcher.gd" with size - 5 KB
    File was changed, conversion took 106 ms.
Trying to convert       154/182 file - "addons/gut/spy.gd" with size - 2 KB
    File was changed, conversion took 57 ms.
Trying to convert       155/182 file - "addons/gut/strutils.gd" with size - 5 KB
    File was changed, conversion took 111 ms.
Trying to convert       156/182 file - "addons/gut/stubber.gd" with size - 6 KB
    File was changed, conversion took 107 ms.
Trying to convert       157/182 file - "addons/gut/stub_params.gd" with size - 2 KB
    File was changed, conversion took 66 ms.
Trying to convert       158/182 file - "addons/gut/summary.gd" with size - 7 KB
    File was changed, conversion took 128 ms.
Trying to convert       159/182 file - "addons/gut/test.gd" with size - 65 KB
    File was changed, conversion took 1075 ms.
Trying to convert       160/182 file - "addons/gut/test_collector.gd" with size - 8 KB
    File was changed, conversion took 145 ms.
Trying to convert       161/182 file - "addons/gut/thing_counter.gd" with size - 0 KB
    File was not changed, checking took 23 ms.
Trying to convert       162/182 file - "addons/gut/UserFileViewer.gd" with size - 1 KB
    File was changed, conversion took 30 ms.
Trying to convert       163/182 file - "addons/gut/UserFileViewer.tscn" with size - 4 KB
    File was changed, conversion took 89 ms.
Trying to convert       164/182 file - "addons/gut/utils.gd" with size - 13 KB
    File was changed, conversion took 237 ms.
Trying to convert       165/182 file - "addons/gut/gui/BottomPanelShortcuts.gd" with size - 2 KB
    File was changed, conversion took 55 ms.
Trying to convert       166/182 file - "addons/gut/gui/BottomPanelShortcuts.tscn" with size - 5 KB
    File was changed, conversion took 101 ms.
Trying to convert       167/182 file - "addons/gut/gui/GutBottomPanel.gd" with size - 11 KB
    File was changed, conversion took 197 ms.
Trying to convert       168/182 file - "addons/gut/gui/GutBottomPanel.tscn" with size - 12 KB
    File was changed, conversion took 199 ms.
Trying to convert       169/182 file - "addons/gut/gui/GutRunner.gd" with size - 2 KB
    File was changed, conversion took 50 ms.
Trying to convert       170/182 file - "addons/gut/gui/GutRunner.tscn" with size - 0 KB
    File was not changed, checking took 16 ms.
Trying to convert       171/182 file - "addons/gut/gui/GutSceneTheme.tres" with size - 0 KB
    File was changed, conversion took 11 ms.
Trying to convert       172/182 file - "addons/gut/gui/gut_config_gui.gd" with size - 12 KB
    File was changed, conversion took 205 ms.
Trying to convert       173/182 file - "addons/gut/gui/OutputText.gd" with size - 6 KB
    File was changed, conversion took 129 ms.
Trying to convert       174/182 file - "addons/gut/gui/OutputText.tscn" with size - 5 KB
    File was changed, conversion took 91 ms.
Trying to convert       175/182 file - "addons/gut/gui/RunAtCursor.gd" with size - 3 KB
    File was changed, conversion took 78 ms.
Trying to convert       176/182 file - "addons/gut/gui/RunAtCursor.tscn" with size - 2 KB
    File was changed, conversion took 44 ms.
Trying to convert       177/182 file - "addons/gut/gui/RunResults.gd" with size - 13 KB
    File was changed, conversion took 238 ms.
Trying to convert       178/182 file - "addons/gut/gui/RunResults.tscn" with size - 5 KB
    File was changed, conversion took 106 ms.
Trying to convert       179/182 file - "addons/gut/gui/script_text_editor_controls.gd" with size - 6 KB
    File was changed, conversion took 112 ms.
Trying to convert       180/182 file - "addons/gut/gui/Settings.tscn" with size - 0 KB
    File was changed, conversion took 14 ms.
Trying to convert       181/182 file - "addons/gut/gui/ShortcutButton.gd" with size - 3 KB
    File was changed, conversion took 73 ms.
Trying to convert       182/182 file - "addons/gut/gui/ShortcutButton.tscn" with size - 1 KB
    File was changed, conversion took 41 ms.
Conversion ended - all files(182), converted files(100), not converted files(82).

bitwes and others added 30 commits August 26, 2021 13:58
* base export created
* junit xml exporter started
* write_file methods for exporters
* options added to control, export file created at end of run
* add junit_xml_file and junit_xml_timestamp to command line
* changes.md
* Add Junit Exporter to hook script
* reorg yield tests
* yield frames created, seems to be working
* more test refactor, additional test, changes.md
* handle invalid frame counts
* added export post script, added time and orphans to base export
* Decided on 2 frames
* method_maker now supports changing method signature
* verified you can spy on overridden parameter lists
* integrated into test.gd and gut.gd
* CHANGES.md
* double_parameter_override now works with object, path, and optional subpath.  also comments.
* stub_params implemented
* stubber has functionality now
* poc working I think
* defaults work
* may have figured it out
* I think it all is working, time to rip stuff out
* gutted old new way out
* replicated and fixed issue
* refactor
* Conditionally load script to get a reference to NativeScript
* CHANGES and removed scratch script
* why would I have thought ! was right?
* more NativeScript tests
* CHANGES
… equality. (#240)

Added UT for comparing Vector2 y coords and Vector3 z
and y&z coords in test.assert_almost_eq and test.assert_almost_ne
* some basic functionality working
* working pretty darn good
* created control bar
* control bar integrated
* setting tweaks
* more tweaks
* refactor cmdline, show passing, failing, pending in editor
* KEYBOARD SHORTCUTS!!!!
* status light!
* a tool for getting the active editor and probably other things
* do not use open_editors and move on with actually releasing this version
* some comments and such
* mouse overs and handling bad config
* CHANGES
* input_factory and input_sender and related tests merged
* implemented "hold_for" which releases an event
* release_all works with keys and actions
* mouse button release
* clear
* change signal to idle and add is_idle
* tweak unrelated tests
* changes.md
* run at cursor control implemented
* update shortcuts, remove now unused controls
* changes.md
* cleanup and add properties for method prefix and inner class prefix
* don't use added properties because I forgot it wasn't configurable
* added warnings when a _down event is sent while already pressed
* fix issue with warnings after idle
* merge code, still need to merge tests
* fix a thing
* merge test_test.gd
* merge test_utils.gd
* merged in tests, still some issues
* fixed some bugs
* Update README.md
* all parameter override and partial double issues resolved
* use method instead of flag in to_s
* changes
* Bug fixed in test.gd: should pass a string to has_method.

* Avoid unused variable warnings by actually using them, or prefixing with underscore.
* hook settings, hide orphans, file and dir controls
* output panel font and font name.  Some tweaks
* background color and font color
* CHANGES.md, fix issue with directory/file ctrl.  add GutHookScript class name.  Add error to default `run` method of hook script
* conditionally show warnings, errors, orphans
* do not show orphans when orphans hidden
* log levels explained in mouse over
* disable colors setting
bitwes and others added 6 commits May 21, 2022 12:11
* simple control that can open a file to a line number and get json results
* incremental improvement of control
* tabs, looks pretty slick
* panel is super tough now.  it even searches for method names when it does not know the line number
* tree is better
* tree is a whole lot better
* can handle duplicate test names now
* collapse passing tests
* proper grouping of tests
* run result controls
* output toolbar
* toolbar icons!
* layout tweaks
* add some messages for unloaded images
* new icons, show/hide settings button
* more toggle buttons for tree and output panels
* CHANGES
#367)

* Optimize PNG images using oxipng
* Format files for POSIX compliance
* show output and settings on config error.  more buttons.  show editor when clicked
* show script editor button
* save/load various toggles
* added orphan counts to the tree
* orphan/orphans, added some sample tests
* search output, tree view searches output when clickedd
* risky tests and total display adjustments
* scroll lock buttons, dynamic sizing of col 1, col 1 bg color
* add some pass_test calls for missing assert tests
* orphan display tweaks
* refactor search, implement backwards search
* display tweaks
* word wrap button
* an annoying workaround for extra "pendings" being formatted in output
@bitbrain bitbrain changed the title [WIP] Godot 4 adaption [WIP] Godot 4.0 adaption Jul 30, 2022
@bitbrain
Copy link
Contributor Author

I accidentally removed min_rect_size but it looks it is now called custom_min_size

addons/gut/GutScene.gd Outdated Show resolved Hide resolved
@bitbrain
Copy link
Contributor Author

bitbrain commented Jul 30, 2022

No more errors but for some reason GUT starts and then stops again (silently without any errors) - if anybody could check out the branch with Godot 4 alpha13+ that would be great!

EDIT there are actually more errors but due to godotengine/godot#63714 I did not see them (I was hiding notifications)

Will attempt to fix those. Also, NativeScript is now gone and all that GDNative support is rather useless. We do not even need it any longer because GDExtension is basically "part of the engine itself"

@bitbrain bitbrain marked this pull request as ready for review July 30, 2022 20:26
@bitbrain bitbrain changed the title [WIP] Godot 4.0 adaption Godot 4.0 adaption Jul 30, 2022
@bitwes
Copy link
Owner

bitwes commented Aug 3, 2022

Can you get this into a single PR? I'm still holding off on checking anything until the Beta release (which appears to be soon).

@bitbrain
Copy link
Contributor Author

bitbrain commented Aug 3, 2022

@bitwes technically, this PR already contains #379 however, the diff is significantly larger as a result. If you are happy with that, I can close off #379 and we'll deal with a larger diff then.

@bitwes
Copy link
Owner

bitwes commented Aug 3, 2022

@bitbrain
Go ahead and delete the other one. I'll work off this one. I started messing around a little yesterday with 4.0. There is a TON that has changed. A lot might need to be rewritten. I started making issues as I found them. My goal was to get the command line to run and show the help, I wasn't able to get that to work yet.

Copy link
Owner

@bitwes bitwes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't review anything outside of root or addons/gut. I looked at the major stuff. The rest can be checked out later. This is going to be a mess for a while.

@@ -0,0 +1,17 @@
[main]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't get checked in. Mostly so everyone who develops for GUT doesn't end up fighting over the shortcuts. I thought this was in the .gitignore.


onready var rtl = $TextDisplay/RichTextLabel
var _has_opened_file = false
@onready var rtl = $TextDisplay/RichTextLabel
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this @ the new way to do onready?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah

@@ -65,8 +65,7 @@ func simple(v1, v2, missing_string=''):
extra = str('. ', _cannot_comapre_text(v1, v2))

cmp_str = get_compare_symbol(result.are_equal)
if(typeof(v1) != TYPE_ARRAY):
result.summary = str(format_value(v1), ' ', cmp_str, ' ', format_value(v2), extra)
result.summary = str(format_value(v1), ' ', cmp_str, ' ', format_value(v2), extra)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this change. If there was a change to typeof add in a 4.0 comment (starting with "# !4.0"). I don't want to lose the if without a specific commit explaining it since I have no idea why it is there right now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually do not know how this happened. The auto converter tool must have decided this. Quite strange! Will revert this

var summary = null setget set_summary, get_summary
var max_differences = 30 setget set_max_differences, get_max_differences
var differences = {} setget set_differences, get_differences
var are_equal_member = null :
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea why this name got changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must have come from some of the commits that came from latest master. How are they called on the master branch?

@@ -22,7 +22,7 @@ func has_two_params_one_default(one, two=null):
pass

func get_position():
return .get_position()
return get_position()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless this changed in 4.0, this will cause an infinite loop. We specifically want to call super on this so that we can stub it for tests (or something that I forgot).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should replace this with super.get_position()

@@ -63,7 +63,7 @@ func _add_watched_signal(obj, name):
_watched_signals[obj] = {name:[]}
else:
_watched_signals[obj][name] = []
obj.connect(name, self, '_on_watched_signal', [obj, name])
obj.connect(name,Callable(self,'_on_watched_signal'),[obj,name])
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this will work or not, but it is closer than it was. This could use a # !4.0 comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could even change it simply to: _on_watched_signal instead of this Callable wrapper stuff

@@ -151,7 +151,7 @@ func clear():
for obj in _watched_signals:
if(_utils.is_not_freed(obj)):
for signal_name in _watched_signals[obj]:
obj.disconnect(signal_name, self, '_on_watched_signal')
obj.disconnect(signal_name,Callable(self,'_on_watched_signal'))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this will work or not, but it is closer than it was. This could use a # !4.0 comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, no idea why the tool decided to use Callable here. We can reference the signal directly here

export(int) var _font_size = 20
export(Color) var _font_color = Color(.8, .8, .8, 1)
export(Color) var _background_color = Color(.15, .15, .15, 1)
@export var _font_name = 'AnonymousPro' # (String, 'AnonymousPro', 'CourierPrime', 'LobsterTwo', 'Default')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could use a # !4.0 comment. It appears that the value hints are either done differently or doo not exist. Adding a comment here and noting that there are others in here that were altered will be helpful.

@@ -168,7 +172,7 @@ func _setup_gut():

_lgr = _utils.get_logger()
_gut = load('res://addons/gut/gut.gd').new()
_gut.connect('tests_finished', self, '_on_tests_finished')
_gut.connect('tests_finished',Callable(self,'_on_tests_finished'))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could use a # !4.0 comment. Another example of connecting that might not work.

@bitbrain
Copy link
Contributor Author

bitbrain commented Aug 4, 2022

@bitwes did you find anything suspicious already that could suggest why it does not run properly? I am scratching my head right now to figure out why Gut starts and then instantly stops again.

@bitwes
Copy link
Owner

bitwes commented Aug 4, 2022

I was able to get it to run via the command line yesterday. Been toying with it more than I should, heh. I've also made a bunch of 4.0 issues describing what I've found as I went along.

I got the basic asserts running. A bunch of things are still not working (watching signals, doubles, partial doubles, stubbing, comparing dictionaries and arrays, input mocking, the controls/dialogs all look like garbage, and don't think the in-editor is working) but it is a start.

You can check out the changes in the branch below. It's all experimental and not fit for general consumption but has helped get a list of things that will need formal changes.

https://github.com/bitwes/Gut/tree/4_0_experiments

I cloned your branch and started toying around. All tests that kinda work are in the tests_4_0/ directory, so if you try it out change your gutconfig to only point to that directory.

@bitwes bitwes merged commit 06e14a3 into bitwes:4.0 Aug 7, 2022
@bitwes
Copy link
Owner

bitwes commented Aug 7, 2022

This is a great start, i'm just going to merge it. Some of the outstanding things I asked for had to do with me not knowing much about 4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants