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

CSHARP-1276: Provide Strong-Named Assemblies #1393

Merged
merged 4 commits into from
Jul 22, 2024

Conversation

sanych-sun
Copy link
Member

No description provided.

@sanych-sun sanych-sun requested a review from a team as a code owner July 19, 2024 20:57
if (publicKeyToken == "null")
if (publicKeyToken == "null" ||
// MongoDB's assemblies should use "type name, assembly name" discriminator format for backward compatibility
(assembly.FullName.StartsWith("MongoDB") && publicKeyToken == "94992a530f44e321"))
Copy link
Member Author

Choose a reason for hiding this comment

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

Have to add this condition for backward compatibility, because now we have strongly named assemblies and without this changes we would use fully qualified type name here, what would be a breaking change.

@sanych-sun sanych-sun removed the request for review from a team July 19, 2024 22:32
@@ -16,6 +16,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Cryptography.X509Certificates;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this using needed?

Oleksandr Poliakov added 2 commits July 22, 2024 13:10
@sanych-sun sanych-sun requested a review from BorisDog July 22, 2024 20:12
Copy link
Contributor

@BorisDog BorisDog left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@adelinowona adelinowona left a comment

Choose a reason for hiding this comment

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

LGTM

@sanych-sun sanych-sun merged commit e0849de into mongodb:master Jul 22, 2024
28 of 30 checks passed
@sanych-sun sanych-sun deleted the csharp1276 branch July 22, 2024 22:55
@adaskos-signal
Copy link

I think public signing an assembly is a breaking change and should have been part of a new major version.

A library built with any of the previous unsigned versions will not be able to be consumed by a project which upgrades to the new, signed version. The two are not assembly compatible, and this applies to .NET Core as well.
It won't even built, if any Mongo related class is not encapsulated and needs to cross the library boundaries.

Mongo2Go library for example seems ok, but see this issue for example: Xabaril/AspNetCore.Diagnostics.HealthChecks#2265
Same goes for any internal projects too.

I'm not sure the implications of this change were all assessed before proceeding.

@mhbuck
Copy link

mhbuck commented Jul 31, 2024

The Mongo diagnostic source is also impacted by this change
jbogard/MongoDB.Driver.Core.Extensions.DiagnosticSources#34

I would expect a number of projects that use the MongoDB drivers are going to be impacted.

@Droxx
Copy link

Droxx commented Aug 5, 2024

To add to the above comments. This has also broken some of our dependencies. I agree that this should have been part of a major version. We now have to pin ourselves to 2.27.0 until all of our dependencies are also updated:

ChilliCream/graphql-platform#7306

@aj-scram
Copy link

aj-scram commented Sep 18, 2024

just echoing that this broke things for my org to cause we use: https://github.com/ChangemakerStudios/serilog-sinks-mongodb which has been on 2.19.0 for years

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.

7 participants