Skip to content
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

generating invalid TypeScript import path with using Cargo workspace #111

Closed
h-michael opened this issue Jul 25, 2022 · 1 comment · Fixed by #221
Closed

generating invalid TypeScript import path with using Cargo workspace #111

h-michael opened this issue Jul 25, 2022 · 1 comment · Fixed by #221
Labels
bug Something isn't working difficulty: medium P-HIGH This will be treated with high priority

Comments

@h-michael
Copy link

Hi, thanks for your excellent work. I love ts-rs.

I use ts-rs with the project which uses Carog workspace. I found the following issue.
If that project has crates on both the grandchildren directory and child directory, it may generate an invalid TypeScript import path.
I created example project.
This struct uses another crate's struct that crates on the grandchildren directory.
In this case, invalid import paths are generated.
That should be as follows.

import type { A } from "./A";
import type { B } from "./B";

I know this is a corner case. I can avoid this by using a flattened directory architecture. But actually, I use ts-rs with a bigger mono repository than the above example. So I want to use nested directories to categorize crates.

If you can give me some guidelines to fix this problem, I can create PR to fix it. Thanks.

@NyxCode NyxCode added bug Something isn't working difficulty: medium P-HIGH This will be treated with high priority labels Jul 28, 2022
@NyxCode NyxCode linked a pull request Feb 1, 2024 that will close this issue
@escritorio-gustavo
Copy link
Contributor

Fixed by #221 and #218

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working difficulty: medium P-HIGH This will be treated with high priority
Projects
None yet
3 participants