Conversation
…rst instead of NuGet)" This reverts commit ed8c9ba.
|
I have no idea why the weak reference tests started failing. |
|
Inside of Visual Studio the test works. (on my system).
Von meinem iPhone gesendet
… Am 05.05.2019 um 12:30 schrieb Daniel Grunwald ***@***.***>:
I have no idea why the weak reference tests started failing.
Either something in WPF changed and introduced a memory leak; or something in .NET changed regarding the GC, and we can no longer test that an object gets collected as expected.
Oh, and just now I remembered: it's also possible that the test itself is keeping stuff alive. I remember having problems like that with DocumentDoesNotHoldReferenceToLineMargin, e.g. because use object initializers involve an extra temporary that maintains a reference. Maybe the problem is just that the textView = null; started getting optimized out? Possibly by Roslyn, or possibly by updates to the .NET JIT.
I guess a clean test would have to use the approach from DocumentDoesNotHoldReferenceToLineMargin and reference the object-to-be-collected only inside a separate method (which probably should be marked [MethodImpl(MethodImplOptions.NoInlining)] for extra safety).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
If it's a compiler optimization, it might depend on debug/release. |
…ntax isn't working as it were)
…he side in the packages folder)
…et/msbuild#1333) - therefore removed net35 target (to be discussed if ok)
jogibear9988
left a comment
There was a problem hiding this comment.
i think with a new major it‘s okay to drop 3.5 support.
if we encounter a critical bug we could backport a fix if needed
…B/releases) Re-create project file via File/New/SHFB and copying relevant config from old->new
…server/dotnet pack)
dgrunwald
left a comment
There was a problem hiding this comment.
- I don't know enough about the .NET core stuff to usefully review the build system changes.
- WeakReferenceTests: I can try changing these tests to be less susceptible to the GC keeping stuff alive for longer than necessary, by moving stuff into separate methods.
- Removing
[Obsolete]stuff: OK, we can do that in a new major version; though ideally only for stuff that was already marked obsolete in the 5.0 release. - Removing .NET 3.5: OK
- Removing the WithNRefactory build: OK
|
Note: the readme should be updated to explain what to install, so that AvalonEdit can be built. |
|
@dgrunwald I have amended readme.md with a short section on How to build. WeakReferenceTests: would be great if you could try to fix those - having full unit test coverage back would be very reassuring. |
…ng references Previously we had the problem of the compiler/JIT optimizing out the "redundant" `textView = null;` assignment, thus extending the lifetime of the strong reference and causing the test to fail.
|
I have added a separate issue for removing old code (#if NREFACTORY see #174) - with that, anything missing for merging this? Tests run again thanks to Daniel, SHFB doc generation works again, all artefacts are produced (nupkg, snupkg, source code links) |
icsharpcode/AvalonEdit#168 (partial) TextDocument changes will be updated separately.
icsharpcode/AvalonEdit#168 (partial) TextDocument changes will be updated separately.
icsharpcode/AvalonEdit#168 (partial) TextDocument changes will be updated separately.
icsharpcode/AvalonEdit#168 (partial) TextDocument changes will be updated separately.
icsharpcode/AvalonEdit#168 (partial) TextDocument changes will be updated separately.
icsharpcode/AvalonEdit#168 (partial) TextDocument changes will be updated separately.
icsharpcode/AvalonEdit#168 (partial) TextDocument changes will be updated separately.
icsharpcode/AvalonEdit#168 (partial) TextDocument changes will be updated separately.
todo: