-
Notifications
You must be signed in to change notification settings - Fork 694
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
Fixes #2913 - remove Disposed views from Responder.instances when Debugging #2914
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Thank you.
The Responder fix was already in v2, but no the cleaning up of the dim/pos in View.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit tests fail tho. Can you fix?
* Ported to v2 * Fixed scneario - config * Lots of goodness * Lots of goodness * Code cleanup * Fixed mouse dragging * Removed Header and margin stuf * Removed Header and margin stuf * Removed Header and margin stuf * Fixed keyboard * upgraded xunit * Action -> EventHandler * Got Range working correctly * Added starter set of unit tests * Cleans up dim/pos objs in dispose. See #2914. * Fixed merge issues; renamed SliderOrientation and added changed event
I'll try, but the UnitTest that is failing seems to have no connection to the changes I made. I'll investigate |
On a fresh clone of the develop branch the Tests |
I have created a new Issue for this: #2923 |
None of this tests fail. Perhaps it's something missing on your development configuration. |
V1 miniedit fix 2913
The clipboard tests failed because I didn't have the ms store version of Powershell installed. The KeyBindings_Command Test fails because the actuall string is separated differently than the expected string ( I don't really have the necessary In-depth knowledge of the the inner workings of Terminal.Gui, but if I had to make an educated guess I'd say the separator is not hard-coded considering on my machine the test fails, but on yours it doesn't. Maybe It has to do something with the OS? Again, I don't have had a good enough look at the source code (mainly because it is so much) so I can't really say for sure |
Install it from here.
How you are running the tests? From command line, VS2022, VSCode, other? In what OS?
The tests are running with "en-US" encoder, no mater OS localization you have.
I don't think so. Mine is Portuguese, which separator and others formats are different from "En-US", but the tests run well.
But in this case there is no problem with the code and the unit tests must run without fail. PAY ATENTION you can't copy and paste anything on the computer while the unit tests are running because when the clipboard tests are writing to and reading from clipboard the values may differ. |
From VS2022 in Windows
Are you sure? I modified the build workflow to run on my branch, and all tests are passing now. Im closing #2923 for now, as this seems to be an issue with xUnit not being able to force the localization on some machines, and because the tests run perfectly fine now with your fix, |
Minor format change to trigger new Unittest execution
Why do you not try to run the modified workflow on your machine and if it all pass, commit and push to this PR. |
as I already said, the one test that actually is failing for me ( |
Did you maybe think that i modified the workflow to make all tests work? Because i did not. I only enabled a push to my branch to trigger the execution of this workflow, nothing else. I know a merge to the develop branch on my repo would've done the exact same thing, but I am afraid of breaking code that is not mine, especially if i dont understand it completely. |
@a-usr don't forget to merge my PR https://github.com/a-usr/Terminal.Gui-FORK/pull/4 first. Thanks. |
Fixes Pos/Dim static fields not being disposing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already review this but only @tig can activate the CI and merge. We need to wait.
I didnt know that. Tbh this is my first time doing collaborative work over GitHub |
@BDisp I'm worried about taking the removal of the Strictly speaking that change is:
I think there's a significant risk of regressions to v1 if we take https://github.com/a-usr/Terminal.Gui-FORK/pull/4 as part of the is PR. Do you really think we should? I'll defer to you, but it makes me nervous. |
@tig the fix really work perfectly without any unit tests failures on both versions and there isn't any breaking change. But a static field shouldn't store object instances that already was disposed. Don't you agree? |
I see now. I had it in my mind this removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Fixes #2913 - remove Disposed views from Responder.instances and remove Pos and Dim objects from View when disposing.
Pull Request checklist:
CTRL-K-D
to automatically reformat your files before committing.dotnet test
before commit///
style comments)Please take a look at the code before accepting / rejecting. Just please
Made to assist this solution