obus icon indicating copy to clipboard operation
obus copied to clipboard

Invalid identifiers with auto-generated code

Open darioteixeira opened this issue 8 years ago • 1 comments

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:

  1. It produced a function named class (reserved word in OCaml).
  2. 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.

darioteixeira avatar Dec 19 '16 15:12 darioteixeira

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

ghost avatar Dec 19 '16 16:12 ghost