-
Notifications
You must be signed in to change notification settings - Fork 62
Add Yew output compatibility #44
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
base: master
Are you sure you want to change the base?
Conversation
That's very cool - making this work with Yew was actually my original motivation for building typed-html, before I got sidetracked. The absent event types are probably just due to my not immediately finding the corresponding stdweb types for them, there's no good technical reason they're excluded. If Yew supports them, it's entirely safe to put them back in. It needs an example of some kind, though, just a hello world so we can verify that the output compiles at a minimum. |
Thanks for getting to this! I've been using it since, and I like how it works when everything compiles. Unfortunately, I seem to sometimes be hitting the recursion limit on errors instead of getting nice error messages. I can try to get an example of that behaviour, if you'd like to look into it. I'm honestly a little stumped. I can also get a hello world example for you, by the weekend or so. |
Hey @SafariMonkey it would be great to move this forward! Are you still stuck? Happy to help if I can! |
Oh shoot, I keep meaning to do this. Work's been busy. Sorry! I'll put something together ASAP to demo what it's like both when it works and when it doesn't. I wanted to resolve the issues before pushing something out, but I haven't managed that, hence this getting stuck in the pipeline. Because the error is a compiler recursion limit error, I've found it difficult to diagnose. I appreciate the reminder, @jstarry. If you do figure out the compiler issues I'll be very grateful. |
If the issues you're having are just about running into the recursion limit, imo it's perfectly acceptable to increase it, as the compiler should suggest you do when you hit it. It's pretty normal for generated code at |
Unfortunately, that was indeed the case. I had some cases which required 10000 to complete, and many that exceeded even that. I looked into it at the time, but couldn't find any resolution. When everything is fine it compiles pretty well with a more reasonable limit (IIRC I had it set to 1024, but I think 256 was fine.) I'm gonna look into this again today. I'll also post an example of when it works and fails so someone else can also look into it if they want. To be honest, after spending many hours fighting with that issue, I've been half avoiding it. I really want to resolve it, though, so I'll look into it again. |
Here is a minimally redacted version of our code. It compiles fine, but some compiler errors turn into recursion limit errors. For example, change I'm not sure which recursion limit is being respected here (IIRC I determined that it was the I'm sorry about not passing this info on sooner. If someone could take a look I'd be very grateful. |
Has anyone had the opportunity to look into this? I'd love to see this feature moved forward, but I don't have the experience to debug the issues mentioned above. |
Given that Yew has apparently had a native implementation of proc-macro HTML for a while now (in fact, starting not long after this PR was opened: yewstack/yew#500), is there any reason to leave this open? @jstarry since you posted in here before, and you appear to be the largest contributor to Yew recently, would you mind sharing your thoughts on whether I made a go at adding the integration, but had weird issues at the time that I didn't (and maybe still don't) have the experience to debug. If there's still a need for this, I can give it another go (or someone else could), but if it's been superceded, I'm also happy to close it. |
This PR implements
Yew
as anOutputType
, meaningtyped-html
can be used to buildyew
-based applications. (Specifically,Yew<T>
whereT
is ayew
model.) This may enable yewstack/yew#438.No examples or documentation yet, as I have been testing on my own prototype (proprietary)
yew
application, but it seems to work. Would porting a couple ofyew
examples and covering differences in syntax be sufficient?I also noticed that
typed-html
doesn't include pointer events, whileyew
does. I've commented them out for now, but it seems like they could be added fairly easily.Feedback would be welcome.