decompme / decomp.me

Collaborative decompilation and reverse engineering website
https://decomp.me
MIT License
380 stars 118 forks source link

Do not try to compile code that clangd thinks has syntax errors #779

Open mkst opened 1 year ago

mkst commented 1 year ago

It is not great UX to submit a compile request as the user is in the middle of typing/editing code only to submit another one when they've finished typing. Whilst we try to mitigate this by buffering up changes, this doesn't work perfectly.

A potential option would be to leverage clangd (once merged) and only try to compile code that is free from syntax errors.

This should be an optional setting (default to on?) and should be possible to override (e.g. 'ctrl+') to force a request.

Not sure how nicely this would play with the callbacks, but if it's not a complete pig to implement, I think it would make a decent improvement to the experience of working on decomp.me.

ethteck commented 1 year ago

I keep meaning to comment here - I think before we consider doing this, we'll need to improve the language server integration. I've seen multiple occasions where clang thinks something is an issue, but it compiles fine