-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Externals imports possibly broken? #107
Comments
+1 I'm experiencing this same issue. |
Hi, I think the main problem come from Typescript breaking change on version 4.5 Base on what I found after I install @ovotech/[email protected]
With @[email protected] the code where it create import statement specifier is the following
Once I update the call to the following, the import statement specifier is create correctly
I think the solution is either force typescript version to be 4.1.2 or upgrade @[email protected] to version 0.20.0 which already fix API breaking change on typescript 4.5 (https://github.com/ovotech/laminar/blob/d197413e78625b710480de35e99e5d5d9d13a6cc/packages/ts-compose/src/node.ts#L205) |
Both are options for sure - if anybody wants to try a PR I would be eternally grateful, don't have much time to fix those issues lately. |
There is a workaround to temporary solve this issue while we wait for dependencies upgrade. Try to force correct version through resolutions in package.json:
|
Context
Using
@ovotech/[email protected]
and executingwhere both the schemas were copied from avro-ts/examples
Expected
Generated TypeScript files should contain no errors in their imports of external references
Actual
I got these generated output with errors in imports of external reference to
my.namespace.data.Address
create-user.avsc.json.ts
hasimport
which wasn't exported fromaddress.avsc.json.ts
; andimport
is missing alias identifier after theas
; andCreateUser.address
reference with an undefined namespace.address.avsc.json
looks ok and the namespace exported is actuallyMyNamespaceData
rather thanMyNamespaceDataAddress
which is imported by thecreate-user.avsc.json.ts
above.The text was updated successfully, but these errors were encountered: