Nested namespaces not handled correctly by GIR Writer
Submitted by Chris Daley
Link to original bug (#767718)
Description
Created attachment 329893 Fixes nested namespace generation
When generating a GIR file for a Vala project, Classes in nested namespaces are handled correctly. I.e.
namespace Valadate.Framework {
public abstract class TestCase : Object {
}
}
Is rendered in the GIR file as:
When this class is used by another project that then generates its own GIR file, these types are rendered incorrectly. i.e.
This causes the g-ir-compiler to cause an error.
This bug appears to be caused by the method gi_type_name only returning the actual Class name as defined in the vapi file and the root namespace. The attached patch fixes this bug and allows classes in nested namespaces to be used in other Typelibs.
Patch 329893, "Fixes nested namespace generation":
codewriter.patch