Skip to content

feature netcore3 support#168

Merged
dgrunwald merged 43 commits intomasterfrom
feature/netcore3
Jun 9, 2019
Merged

feature netcore3 support#168
dgrunwald merged 43 commits intomasterfrom
feature/netcore3

Conversation

@jogibear9988
Copy link
Copy Markdown
Member

@jogibear9988 jogibear9988 commented Mar 24, 2019

todo:

  • documentation does not compile
  • nrefactoy in wpf build

@christophwille christophwille requested a review from dgrunwald May 5, 2019 10:05
@dgrunwald
Copy link
Copy Markdown
Member

dgrunwald commented May 5, 2019

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 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).

@jogibear9988
Copy link
Copy Markdown
Member Author

jogibear9988 commented May 5, 2019 via email

@dgrunwald
Copy link
Copy Markdown
Member

If it's a compiler optimization, it might depend on debug/release.
If it's a JIT optimization, it also might depend on whether a debugger is attached.
So that would indicate that it might be a problem with textView = null; getting optimized out.

Copy link
Copy Markdown
Member Author

@jogibear9988 jogibear9988 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

@dgrunwald dgrunwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 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

@dgrunwald
Copy link
Copy Markdown
Member

Note: the readme should be updated to explain what to install, so that AvalonEdit can be built.
In particular when opening the solution in VS requires unusual steps like installing a preview version of a .NET SDK...

@christophwille
Copy link
Copy Markdown
Member

@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.
@christophwille
Copy link
Copy Markdown
Member

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)

@dgrunwald dgrunwald merged commit 78ea8e1 into master Jun 9, 2019
@christophwille christophwille deleted the feature/netcore3 branch July 23, 2019 12:59
danwalmsley pushed a commit to AvaloniaUI/AvaloniaEdit that referenced this pull request Nov 20, 2020
icsharpcode/AvalonEdit#168 (partial) TextDocument changes will be updated separately.
ScriptSwoons added a commit to ScriptSwoons/lksmes that referenced this pull request Aug 23, 2025
icsharpcode/AvalonEdit#168 (partial) TextDocument changes will be updated separately.
MrGozX added a commit to MrGozX/cuddly that referenced this pull request Sep 26, 2025
icsharpcode/AvalonEdit#168 (partial) TextDocument changes will be updated separately.
JamesLopte added a commit to JamesLopte/interaction that referenced this pull request Sep 27, 2025
icsharpcode/AvalonEdit#168 (partial) TextDocument changes will be updated separately.
TDeTTECT added a commit to TDeTTECT/Cuckoo that referenced this pull request Nov 25, 2025
icsharpcode/AvalonEdit#168 (partial) TextDocument changes will be updated separately.
GeneralGae added a commit to GeneralGae/PyManager that referenced this pull request Dec 5, 2025
icsharpcode/AvalonEdit#168 (partial) TextDocument changes will be updated separately.
edrabhaee added a commit to edrabhaee/depend-ncias that referenced this pull request Jan 11, 2026
icsharpcode/AvalonEdit#168 (partial) TextDocument changes will be updated separately.
appsedvna added a commit to appsedvna/MetaStego that referenced this pull request Feb 10, 2026
icsharpcode/AvalonEdit#168 (partial) TextDocument changes will be updated separately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants