godotengine / godotengine/godot-cpp

[3.4] Default api.json file shipped in the branch breakes binding_generator.py execution

Abierto
#653 5 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
C++
Estrellas
2.7k
Forks
809
Merge medio
1 d 3 h
PR fusionados (30 d)
8

Descripción

Hi there,
I've just switched to 3.4 and wanted to update my godot-cpp build.
I'm running `scons SConstruct platform=linux generate_bindings=yes use_custom_api_file=yes custom_api_file=godot-headers/extension_api.json bits=64 use_llvm=yes -j8`, with `extension_api.json` being the default json provided along with the 3.4 branch.

I get the following python error :
```
TypeError: string indices must be integers:
File "/path/to/godot-cpp/SConstruct", line 467:
binding_generator.generate_bindings(json_api_file, env['generate_template_get_node'])
File "/path/to/godot-cpp/binding_generator.py", line 69:
used_classes = get_used_classes(c)
File "/path/to/godot-cpp/binding_generator.py", line 807:
for method in c["methods"]:
```

Here is the code pointed out by the error (iterating a dictionary indeed gives the key, which is a string, so not supposed to be accessed by index, am I wrong ?):
https://github.com/godotengine/godot-cpp/blob/68ce78179f90be9bec8cc88106dba0c244bdc4f6/binding_generator.py#L67-L69

Is it reproduced by you guys ?
Any idea to workaround is welcomed ! Alternatively please tell me if I've missed something !

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.