-
Notifications
You must be signed in to change notification settings - Fork 7
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
Un-commented Debugger.Launch()
call in the generator leads to VS 2022 wanting to start its JIT-compiler
#15
Comments
@bemayr Thank you so much, that really means a lot!
That is indeed a huge mistake, and one that has been bothering me too 😆 I wondered why I had started seeing that happen a lot more... I develop primarily on macOS with Visual Studio Code. It does not prompt to hook into a debugger, even with that code. I would switch to my Windows PC to debug the source generator if I got stuck while working on it. Hence why that statement slipped through haha. Unrelated, but since you are the right audience: As you can tell, the logic blocks generator was very much an "experimental" project — I needed this for my game project, after all, and didn't want to spend forever creating a more robust generator (I spent many months on another generator project and I was a little burnt out by the time I got around to finishing this). That being said, if you have ideas on making the generator more sound, I'm totally open to them. There will always be cases where you can return next states that it can't detect the exact types of, but there could probably be a number of improvements made so that situations like that would be far less common. In all fairness, the generator needs a complete overhaul. So if you ever feel like you want to redo it, by all means please do ;) |
Fixed in #16 |
Thanks so much for already publishing a fixed version! I'm gonna update today and enjoy the awesomeness of visualizable code 😍 I am seriously impressed that you manage to develop a source generator while having to switch to a different PC for debugging, it feels like I am spending so much time in the debugger trying to find all the nasty edge cases...
I am so glad you ask, because it is not too easy to find the right audience for source generators/analyzers!
What a pity to hear this, but I can fully relate to that, for me it is this kind of wave-form oscillating between loving developing them and completely being sick of it, because of how they have to be developed. Re: Generator RewriteThanks for the explanation regarding where the necessity for the Generator comes from and why you approached it that way! So I am still figuring out a proper (non-burning-out and sustainable) way to approach source generators, once I get along with this, I will definitely look at the LogicBlocks generator again! 💯 I will keep you updated! (prob. via Discord, because of this not being an issue anymore 😊) |
@bemayr by all means, feel free to reach out on Discord! I love talking about state management. StateML looks great — as a bonus, if you all can figure out how to solve the "my code changed and now my source-of-truth spec is out of date" problem (the old two way synchronization problem!) you will have done something great for the world. Although that might be just a little out of scope, but one can dream 😆 Codeprober also looks really fascinating, thank you for sharing! |
First of All 🥳
LogicBlocks is such a nice HFSM implementation! I've been in the space of Statecharts and C# and your class-based syntax as well as the way to handle bindings are really neat! And the documentation is superb!
Bug 🐞 (a really small one)
Now to the one thing I recently discovered, I am currently in the process of using LogicBlocks to manage Websocket connections. I'm using VS 2022 and discovered that it wants to launch a JIT compiler at startup as well as on a full rebuild. It took me a bit of time to figure out that the problem arises from the LogicBlocks.Generator plug-in, because Visual Studio is incapable of debugging itself in this aspect. Dismissing the dialog lets one easily continue working on the project, but it gets a bit tedious that the dialog appears every time the source generator is run.
Potential Solution 👀
I then started to dig into the Generator a bit (I've also been developing generators over the last couple of months quite a bit and you got some really useful ideas/solutions regarding generator/analyzer debugging in there 💯).
Might the following code be a small release mistake? In the sense that you simply forgot to remove the newline between the comment and the
Debugger.Launch()
call, so that the debugger gets launched everytime? I wonder why and if this works using a VSCode or Rider setup, or whether it is some other misconfiguration on my side...LogicBlocks/Chickensoft.LogicBlocks.Generator/src/LogicBlocksGenerator.cs
Lines 29 to 34 in 2ba212b
The text was updated successfully, but these errors were encountered: