Closed wainwrightmark closed 3 years ago
Regarding the failure of the format
build step, you can use dotnet format
to automatically fix the highlighted errors.
dotnet tool install --global dotnet-format
to install it.dotnet format
to automatically fix formatting.Hi Mark,
apologies for the delay. I've left some comments inline, let me know what do you think. I am not trying to drag the PR for too long, I just want to make sure we get a sensible core design. Once we find an agreement on that (I'm happy to be convinced that the current solution is the good one), then I would be happy to merge it and eventually refine later.
Thank you, Alessio
No worries. I'm willing to take as long as is necessary to get it right.
Hi Mark,
I've decided to merge this as is, we can still refine it before release.
Thank you for the contribution! :)
This is my proposed fix for https://github.com/alefranz/MELT/issues/24
This uses an immutable stack on the TestSink to keep track of the current scopes.
I left the original scope infrastructure intact (but added an attribute in some places) for compatibility.
I've added tests to test the behaviour I was interested in. I've also handled the case of closing scopes in the wrong order, I decided to close all inner scopes and not throw an exception but we could make this behaviour configurable.
I hope this is okay.
Mark