obus
obus copied to clipboard
Invalid identifiers with auto-generated code
I came across this problem after invoking obus-introspect -system -rec org.bluez /org/bluez
and then obus-gen-client
. The generated code required some manual tweaking for two different reasons:
- It produced a function named
class
(reserved word in OCaml). - It produced a value named
UUID
(yep, uppercase).
Nothing major. Nevertheless, it would be nice if the auto-generated code would be free from such issues.
Indeed, it would be better to produce valid OCaml code. I'll try to have a look at some point, i haven't touched this code in a very long time... Alternatively do you think you could submit a PR? The code to update is in tools/obus_gen_{client,server}.ml