Nullable parameter annotation missing in generated VAPI
0 reputation · 16 Sept 2023, 04:57 UTC
Goal: Identify the conditions under which the Vala compiler retains the nullable annotation (?), when generating a VAPI file via valac --vapi for a method parameter.
Constraint: The Vala documentation does not specify a deterministic rule, and observed output differs depending on whether GObject Introspection data is available during compilation, leading to inconsistent nullability checks in consumer code.
Questions: Under what circumstances does valac keep the nullable annotation in the generated VAPI? Does the presence or absence of GIRepository introspection data directly control this behavior? Is there a source‑level annotation or compiler flag that can force preservation of nullable information regardless of introspection?