Repository navigation
Read the diff:match result without the IHtmlCollection indexer - #62
Open
michaelthyregod wants to merge 2 commits into
Open
michaelthyregod wants to merge 2 commits into
michaelthyregod wants to merge 2 commits into
Conversation
From AngleSharp 1.3.1 the .NET 8 build of IHtmlCollection<T> takes its indexer from IReadOnlyList<T>, so the netstandard2.0 build of this library threw MissingMethodException for diff:match on .NET 8 and later.
The library keeps its minimum; the tests run on a version whose .NET 8 build differs from the netstandard2.0 one, which catches the diff:match break.
Author
|
The cause is also being fixed in AngleSharp itself: AngleSharp/AngleSharp#1410 declares the indexers on every target again. This PR is still needed for AngleSharp 1.3.1 through 1.10.x, which are already released. |
Author
|
Update: AngleSharp/AngleSharp#1410 was declined (no breaking changes in core), so this PR is the fix for diff:match. I checked the rest of the library for integer indexers on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Types of Changes
Prerequisites
Contribution Type
Description
diff:matchthrows on .NET 8 and later when AngleSharp 1.3.1 or newer is used:Since 1.3.1 (AngleSharp#1226) the .NET 8 build of
IHtmlCollection<T>takes its indexer fromIReadOnlyList<T>, so the call compiled into this netstandard2.0 library no longer exists at runtime.CssSelectorElementMatcherreads its single match withFirst()instead of the indexer, which works on every AngleSharp version. The minimum stays at 1.1.2.CssSelectorElementMatcherTesttests cover it: without the fix 3 of them fail there. 557/557 pass on 1.10.0 and on 1.1.2.Suggested CHANGELOG line, for whichever heading you open:
diff:matchto work with AngleSharp 1.3.1 and later on .NET 8+ (#PR) @michaelthyregod🤖 Generated with Claude Code