BenChung / KRPC.jl

A kRPC client for Julia
MIT License
3 stars 4 forks source link

generate_stubs creates structs with parameter "module" #7

Closed Rhahi closed 2 years ago

Rhahi commented 2 years ago

Hello, awesome repository!

Julia version: 1.8.0 (2022-08-17)

When generating code with generate_stubs, resulting generated.jl includes some structs that look like following:

struct RoboticController_AddAxis <: Request{:SpaceCenter, :RoboticController_AddAxis, Bool}
    RoboticController_AddAxis(this::RemoteTypes.RoboticController, module::RemoteTypes.Module, fieldName::String) = begin
            new(this, module, fieldName)
        end
    this::RemoteTypes.RoboticController
    module::RemoteTypes.Module
    fieldName::String
end

However, since module is an existing Julia keyword, it will not compile.

Workaround

After code generation, manually edit all parameters with module into something else, like _module. (I also had to remove the conditional include in KRPC.jl after generation to make the include work. Not sure why.)

BenChung commented 2 years ago

Fixed, thanks for bringing it to my attention.