Closed www-chique closed 1 year ago
Hey @www-chique! Thanks for submitting. I'll need a bit of time to dig into this since its a bit of an uncommon use case and the code has gotten pretty messy lately 😅 will update when I have more info.
First, I want to acknowledge the fact that you've always been there whenever an issue appears. I very much appreciate you maintaining this project, and I can't imagine how hard it is to do it consistently over time.
Okay, back to the actual problem, it's not urgent at all. I found out a way to avoid this problem by structuring the schema in a different way.
I just thought I'll share the info, so it'll help the project in the future, if something similar happens in a different scenario. I don't have much knowledge, but I think this is similar to #28 and #63
@www-chique I appreciate the appraisal 🙏
Great to hear you found a work around, I took a crack at it last weekend but it seems that resolving this will need a bit of a refactor of the code. I have pretty limited time in the next month so I likely won't be able to get to it for a bit.
As a side note, the Maximum call stack size exceeded
error occurs when the generator comes across a schema structure that it is not built to handle. I've been meaning to use a more clear error message, so will try to add this too as part of the refactor.
Hi First of all, thanks for this package, really useful
Sadly i encounter the same kind bug here with something like
UserSchema { right: RightSchema { feature: string access: AccessSchema { ... } }
Do you still work on this ?
Hi @xDelph, yes I still work on this. If you could provide a simple repro for your issue I would be happy to look into it. If your problem does not involve using a Map, can you open a new issue since its unrelated to this one.
I will open a new issue, as it's not a map, but should be more a number of child dependance problem Thanks
This is still a problem for me
This should be resolved by https://github.com/francescov1/mongoose-tsgen/pull/115, but some of the more unusual use cases (multiple levels of schema & map nesting) should be validated. Release just went out (v9.1.1), so feel free to re-open this if there are still any associated issues!
Hey! Back again after a while with something. I'm using the latest version of the module (9.0.5).
The desired structure Before I show the Schema, I think it's easier to explain by taking a look at the Object structure itself:
The schema
This throws "Maximum call stack size exceeded" error when you run "mtgen".
Any help would be appreciated, as life without mtgen is horrible.