cpp: Fix include order in the cpp api.h for generated files (#10161)

This commit is contained in:
Barak Michener 2020-08-17 22:02:57 -07:00 committed by GitHub
parent 8cedcdf2df
commit 13f62b74f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -233,10 +233,21 @@ inline ActorTaskCaller<ReturnType> Ray::CallActorInternal(FuncType &actor_func,
return ActorTaskCaller<ReturnType>(runtime_, actor.ID(), ptr, buffer);
}
#include <ray/api/generated/call_actors_impl.generated.h>
#include <ray/api/generated/call_funcs_impl.generated.h>
#include <ray/api/generated/create_actors_impl.generated.h>
// TODO(barakmich): These includes are generated files that do not contain their
// relevant headers. Since they're only used here, they must appear in this
// particular order, which is a code smell and breaks lint.
//
// The generated files, and their generator, should be fixed. Until then, we can
// force the order by way of comments
//
// #1
#include <ray/api/generated/exec_funcs.generated.h>
// #2
#include <ray/api/generated/call_funcs_impl.generated.h>
// #3
#include <ray/api/generated/create_actors_impl.generated.h>
// #4
#include <ray/api/generated/call_actors_impl.generated.h>
} // namespace api
} // namespace ray