Skip to content

Support for external records when generating C wrapper #139

@gibutm

Description

@gibutm

If the C wrapper generation is enabled when trying to consume a record defined in another module the generator will run into an exception

Exception in thread "main" scala.NotImplementedError: an implementation is missing
	at djinni.CWrapperMarshal.references(CWrapperMarshal.scala:91)
	at djinni.CWrapperGenerator$CRefs.collect(CWrapperGenerator.scala:1097)
	at djinni.CWrapperGenerator$CRefs.collect(CWrapperGenerator.scala:1070)
	at djinni.CWrapperGenerator$CRefs.collect(CWrapperGenerator.scala:1066)
	at djinni.CWrapperGenerator.$anonfun$generateInterface$3(CWrapperGenerator.scala:2121)
	at djinni.CWrapperGenerator.$anonfun$generateInterface$3$adapted(CWrapperGenerator.scala:2121)
	at scala.Option.foreach(Option.scala:437)
	at djinni.CWrapperGenerator.$anonfun$generateInterface$1(CWrapperGenerator.scala:2121)
	at djinni.CWrapperGenerator.$anonfun$generateInterface$1$adapted(CWrapperGenerator.scala:2119)
	at scala.collection.immutable.List.map(List.scala:250)
	at scala.collection.immutable.List.map(List.scala:79)
	at djinni.CWrapperGenerator.generateInterface(CWrapperGenerator.scala:2119)
	at djinni.Generator.$anonfun$generate$2(generator.scala:630)
	at djinni.Generator.$anonfun$generate$2$adapted(generator.scala:623)
	at scala.collection.immutable.List.foreach(List.scala:333)
	at djinni.Generator.generate(generator.scala:623)
	at djinni.generatorTools.package$.generate(generator.scala:396)
	at djinni.Main$.main(Main.scala:947)
	at djinni.Main.main(Main.scala)

Looking into the source for CWrapperMarshal.scala it looks like this feature is not implemented.
Looking at the doc Modularization and Library Support it clearly states that it is not supported for Python yet, though it was not obvious just from the docs that this meant it was not supported in the C Wrapper as well.

When can we expect this to be implemented? Are there challenges or obstacles preventing this from being implemented?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions