Skip to content
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

Resolve SigComparer regression introduced in 4.0 #525

Merged
merged 2 commits into from
Sep 2, 2023

Conversation

ElektroKill
Copy link
Contributor

@ElektroKill ElektroKill commented Sep 1, 2023

Due to the urgency of this issue and the need for a quick fix, I have opened another pull request as opposed to #524 to demonstrate an alternative fix.

Advantages of this PR over #524:

  • Makes the SigComparer in the next release backward compatible with the previous 3.6 one.
  • Fixed the issue by making reference comparisons opt-in.
  • Has clearly defined behavior in the flags and does not make SigComparer flags depend on other flags which has the benefits of clearer behavior and less chance of potentially introducing bugs later down the line.
  • Adds convenience properties for reference comparing member definitions.

If this PR is merged, we can close #524 and quickly release a hotfix version for 4.0.

@wtfsck @CreateAndInject

@wtfsck
Copy link
Contributor

wtfsck commented Sep 1, 2023

@CreateAndInject Let me know if this fixes your issue.

@CreateAndInject
Copy link
Contributor

Of course, CompareReferenceOnly isn't enbaled at all in this PR by default.
The only difference is my PR is radical, other program can use CompareReferenceOnly without any changes.
This PR is conservative, people must edit their code to use it explicitly.
E.g. Used By in dnSpy :
https://github.com/dnSpyEx/dnSpy/blob/e08de1db25d57766aa81ee452811ebf9d99c7d6a/Extensions/dnSpy.Analyzer/TreeNodes/Helpers.cs#L88-L89

@ElektroKill
Copy link
Contributor Author

Of course, CompareReferenceOnly isn't enbaled at all in this PR by default. The only difference is my PR is radical, other program can use CompareReferenceOnly without any changes. This PR is conservative, people must edit their code to use it explicitly. E.g. Used By in dnSpy : dnSpyEx/dnSpy@e08de1d/Extensions/dnSpy.Analyzer/TreeNodes/Helpers.cs#L88-L89

Yes, the changes are designed to be conservative and require user to opt-in to this new behavior manually as to minimize issues when updating to the new version :p

@wtfsck wtfsck merged commit a5cce92 into 0xd4d:master Sep 2, 2023
2 checks passed
@wtfsck
Copy link
Contributor

wtfsck commented Sep 2, 2023

Since it fixed the issue, I'm merging this one.

@ElektroKill
Copy link
Contributor Author

When can we expect the hotfix version to be published to NuGet?

@wtfsck
Copy link
Contributor

wtfsck commented Sep 2, 2023

I just bumped the version, should take a few minutes for GitHub Actions to build and publish it.

@ElektroKill
Copy link
Contributor Author

I just bumped the version, should take a few minutes for GitHub Actions to build and publish it.

It seems that for some reason the action did not execute the NuGet publish task 🤔
image

https://github.com/0xd4d/dnlib/actions/runs/6057961552/job/16439643254

@wtfsck
Copy link
Contributor

wtfsck commented Sep 2, 2023

Yeah I saw that, seems like a GitHub bug... On the main page, 4.1 is the latest release, when I go to releases, 4.0 is the latest release.

@ElektroKill
Copy link
Contributor Author

Yeah I saw that, seems like a GitHub bug... On the main page, 4.1 is the latest release, when I go to releases, 4.0 is the latest release.

Indeed, this is quite strange behavior on GiHub's end!

@wtfsck
Copy link
Contributor

wtfsck commented Sep 2, 2023

Should work now. Maybe the bug was caused by the fact that I first selected the v4.0.0 tag and then changed it to v4.1.0.

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.

3 participants