Skip to content

Commit

Permalink
cpp: Fix include order in the cpp api.h for generated files (ray-proj…
Browse files Browse the repository at this point in the history
  • Loading branch information
Barak Michener authored Aug 18, 2020
1 parent 8cedcdf commit 13f62b7
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions cpp/include/ray/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
// 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>
#include <ray/api/generated/exec_funcs.generated.h>
// #4
#include <ray/api/generated/call_actors_impl.generated.h>

} // namespace api
} // namespace ray

0 comments on commit 13f62b7

Please sign in to comment.