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

Fixes to make Google.Protobuf.dll compatible with .NET 3.5 #2715

Merged
merged 3 commits into from
Feb 23, 2017

Conversation

JohnHBrock
Copy link
Contributor

@JohnHBrock JohnHBrock commented Feb 14, 2017

I changed the DOTNET35 conditional compilation symbols to NET35 because the NET35 seems to be defined in .NET Core projects by default, whereas DOTNET35 requires a custom definition.

I also explicitly added net35 to the project.json frameworks for Google.Protobuf and Google.Protobuf.Test, and updated the csharp README with detailed testing information.

Not sure if you guys are doing continuous integration with the C# stuff, but if so, you may need to make modifications after merging this to account for dotnet-test-nunit's lack of .NET 3.5 support. EDIT: Looks like I was able to make the appropriate modifications needed to keep Travis and AppVeyor happy.

@grpc-kokoro
Copy link

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

1 similar comment
@grpc-kokoro
Copy link

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

@bazel-io
Copy link

Can one of the admins verify this patch?

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@JohnHBrock
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@JohnHBrock JohnHBrock changed the title Fixes for .NET 3.5 compatibility Fixes to make Google.Protobuf.dll compatible with .NET 3.5 Feb 21, 2017
@JohnHBrock
Copy link
Contributor Author

@jskeet I was told by @detlevschwabe that I should ask you to review this PR.

@jskeet
Copy link
Contributor

jskeet commented Feb 22, 2017

We have deliberately not been including .NET 3.5 in the project.json file - it's not a fully supported platform for us, and in particular we know there are ways in which it fails on Unity, e.g. due to the use of expression trees.

Basically, I'm fine with making changes so that the code does compile with .NET 3.5 again, but I don't want that as part of the regular build.

In terms of code that actually needs changing, I'm aware of Stream.CopyTo, and I'm happy to accept a PR that just has that. The test that uses GetTypeInfo() may be fixable without conditionally removing that part of the test itself, but I guess it's not a significant removal.

@JohnHBrock
Copy link
Contributor Author

Sure, I'll add a section to the README explaining the status of .NET 3.5 support and remove my modifications to the project.json and appveyor files.

FWIW, here's my argument for officially supporting .NET 3.5:

Microsoft has ended .NET 4.5.1 support, but they haven't ended .NET 3.5 SP1 support: .NET 3.5 SP1 support is tied to the various Windows OS support lifecycles, including Windows 10; some of these OS support lifecycles last through at least 2020.

.NET 3.5 is also the highest version that can still run on Windows XP. Standard Windows XP isn't supported by Microsoft anymore, but embedded versions -- especially for point-of-sale systems like cash registers -- I believe are still officially supported by Microsoft. It's hard to find firm numbers, but there are likely millions of point-of-sale systems out there running Windows XP (this is actually why I'm interested in protobuf support for .NET 3.5).

* Changing DOTNET35 framework symbols in preprocessor directives to the default built-in value of NET35.
* Adding extension method StreamExtension.CopyTo for .NET 3.5 because it didn’t exist until .NET 4, and adding associated unit tests.
NUnit 3.4.0 —> 3.6.0
dotnet-test-nunit 3.4.0-alpha-2 —> 3.4.0-beta-3
- Adding more detail on running tests
- Adding info about the status of .NET 3.5 support and how to enable .NET 3.5
@JohnHBrock
Copy link
Contributor Author

I removed net35 from the project.json files and rewrote the README to include information on the status of .NET 3.5 support.

Copy link
Contributor

@jskeet jskeet left a comment

Choose a reason for hiding this comment

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

Will merge when I've done a little coordination internally around the change from DOTNET35 to NET35.

@jskeet
Copy link
Contributor

jskeet commented Feb 22, 2017

Have confirmation - will merge when Travis has gone green.

@jskeet jskeet merged commit 17174b5 into protocolbuffers:master Feb 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants