This encapsulates logic for how to report particular error messages.
So far only used for reporting an actor not containing a wait statement,
as this warning should be suppressed in certain contexts.
We could change other error messages to use this class, but since they
don't have any logic I don't think the extra indirection is appropriate.
After this change I am able to load foundationdb.sln with vscode and get
features like jump to definition and autocomplete.
IntermediateOutputPath will now use a default value.
There is a bug in the code that when an ACTOR forward
declaration is static, the static keyword doesn't get
generated in the forward declaration. This commit fixes
that.
If an actor is forward declared it is kind of
awkward as the signatures don't fit. For example:
Future<Void> foo(int const& bar);
is the correct forward declaration for this actor:
ACTOR Future<Void> foo(int bar);
This also means that a lot of tooling (like rtags/cquery etc)
doesn't work correctly. It will show errors that the function
calls are ambiguous and "find references"-features typically
don't work.
Allowing to do this in the actor compiler is the first step. The
next will be to refactor all forward declarations.
There's never any reason to save the value of a Void return, and it's
the easiest source of redefined variable bugs that will creep back in
over time. So just `wait(...)`, it's cleaner that way.