When generating an Anchor IDL that exports conflicting types, it will use the fully qualified name — e.g. some::crate::MyType — instead of the type name alone — e.g. MyType.
Since Codama only support camel-cased names, this is not compatible with the standard. The side-effect is that we have JavaScript generated imports that look like import { some::crate::MyType } from '../types'.
Two possible solutions:
Option A. We adjust the camelCase function so that it knows how to handle special characters like :: and concatenate the segments properly — e.g. some::crate::MyType becomes SomeCrateMyType.
Option B. We try and identify :: characters in the nodes-from-anchor package since this pattern should only ever happen on an IDL coming from Anchor such that it has conflicting types.
When generating an Anchor IDL that exports conflicting types, it will use the fully qualified name — e.g.
some::crate::MyType
— instead of the type name alone — e.g.MyType
.Since Codama only support camel-cased names, this is not compatible with the standard. The side-effect is that we have JavaScript generated imports that look like
import { some::crate::MyType } from '../types'
.Two possible solutions:
camelCase
function so that it knows how to handle special characters like::
and concatenate the segments properly — e.g.some::crate::MyType
becomesSomeCrateMyType
.::
characters in thenodes-from-anchor
package since this pattern should only ever happen on an IDL coming from Anchor such that it has conflicting types.