Skip to content

enable source link for csharp#4179

Merged
anandolee merged 1 commit intoprotocolbuffers:masterfrom
ctaggart:sourcelink
May 14, 2018
Merged

enable source link for csharp#4179
anandolee merged 1 commit intoprotocolbuffers:masterfrom
ctaggart:sourcelink

Conversation

@ctaggart
Copy link
Copy Markdown
Contributor

@ctaggart ctaggart commented Jan 17, 2018

@jskeet Thanks for adopting SourceLink.Create.CommandLine in the Google Cloud .NET tools. SourceLink 2.7 helps add the portable pdb files to the nupkg as well.

@grpc-kokoro
Copy link
Copy Markdown

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
Copy Markdown

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.

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

Any reason you've removed the global.json? It's there to pin to a specific version of the SDK. Change looks fine apart from that.

@ctaggart
Copy link
Copy Markdown
Contributor Author

Any reason you've removed the global.json? It's there to pin to a specific version of the SDK. Change looks fine apart from that.

Yes, AllowedOutputExtensionsInPackageBuildOutputFolder is used to include the pdb in the nupkg. It only works with SDK > 2.0.2 I believe.

@jskeet
Copy link
Copy Markdown
Contributor

jskeet commented Jan 18, 2018

Okay - if we need SDK 2.0.2, I expect we'll need to change a bit more. In particular, rather than removing global.json we should require the appropriate SDK... and then we'll need some changes to the CI configs to make sure we include both the right SDK for building and the right runtime for testing. I suggest we separate that work from the SourceLink part, in terms of PRs. (I can't get to anything this week as I'm at a conference, but I could potentially look next week.)

@jskeet jskeet closed this Jan 18, 2018
@jskeet jskeet reopened this Jan 18, 2018
@grpc-kokoro
Copy link
Copy Markdown

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
Copy Markdown

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.

@jskeet
Copy link
Copy Markdown
Contributor

jskeet commented Jan 18, 2018

(Sorry, closure was fumbling on my part.)

@ctaggart
Copy link
Copy Markdown
Contributor Author

@jskeet I put back the global.json as requested. You need to ship the source link enabled pdb files in the nupkg for this pull request to be meaningful. You can simply do that by building with a more recent SDK.

For example, I removed the global.json so that it used the default SDK 2.1.3 on AppVeyor from my pdb branch:
https://ci.appveyor.com/project/ctaggart/protobuf/build/8
https://www.myget.org/feed/Packages/sourcelink

@jskeet
Copy link
Copy Markdown
Contributor

jskeet commented Jan 18, 2018

@ctaggart: Right - I'll create a new PR to require a specific SDK that will work. I believe Travis would fail at the moment - and I don't want to rely on a default SDK version at all.

@ctaggart
Copy link
Copy Markdown
Contributor Author

@jskeet dotnet 2.1.3 may be a good choice for Travis. That is what I used for netmq:
https://github.com/zeromq/netmq/blob/master/.travis.yml

@jskeet jskeet mentioned this pull request Jan 22, 2018
jskeet added a commit to jskeet/protobuf that referenced this pull request Jan 24, 2018
This will allow SourceLink as per protocolbuffers#4179, and mean that we can use C#
7.0 language features in the library (but not in generated code).
This does not affect which platforms we're *targeting*, so end users
won't see any difference.

It would be nice to update to 2.1.4, but AppVeyor's "Visual Studio
2017" environment is only 2.0.3.
jskeet added a commit that referenced this pull request Jan 25, 2018
This will allow SourceLink as per #4179, and mean that we can use C#
7.0 language features in the library (but not in generated code).
This does not affect which platforms we're *targeting*, so end users
won't see any difference.

It would be nice to update to 2.1.4, but AppVeyor's "Visual Studio
2017" environment is only 2.0.3.
@jskeet
Copy link
Copy Markdown
Contributor

jskeet commented Jan 25, 2018

I've now merged the SDK change (2.0.3 in the end) so if you rebase your change, we can take another look.

@ctaggart
Copy link
Copy Markdown
Contributor Author

@jskeet The build failure on Travis was:

The command "sudo apt-get install -qq dotnet-sdk-2.0.3" failed and exited with 100 during .

@jskeet
Copy link
Copy Markdown
Contributor

jskeet commented Jan 26, 2018

Hmm... that's confusing, given that it worked on the PR itself. And that was all the detail you saw?

@ctaggart
Copy link
Copy Markdown
Contributor Author

You can click through to see the build failure details:
https://travis-ci.org/google/protobuf/jobs/333428487

I merged master in again, so let's see if it works this time.

@jskeet
Copy link
Copy Markdown
Contributor

jskeet commented Jan 26, 2018

Ah - this is the root cause:

W: Failed to fetch https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod/dists/trusty/InRelease Connection timed out after 10001 milliseconds

I suspect this will be a transient error.

@ctaggart
Copy link
Copy Markdown
Contributor Author

Oops. Yeah, I should have noticed that.

@ctaggart
Copy link
Copy Markdown
Contributor Author

@jskeet yes, they pass now. Ready to squash merge?

@jskeet
Copy link
Copy Markdown
Contributor

jskeet commented Jan 26, 2018

I'm happy, but we should double check with someone actively on the Protobuf team before merging.

@anandolee Are you comfortable with this change? Not that now we won't get a symbols NuGet package when we pack the release, deliberately.

@jskeet
Copy link
Copy Markdown
Contributor

jskeet commented Jan 26, 2018

(@ctaggart: The "can't rebase" is slightly worrying, mind you - could you rebase manually from master down to one commit and force push? That way we won't even need to squash...)

@ctaggart
Copy link
Copy Markdown
Contributor Author

Okay, I redid the same changes and force pushed. You should check that the nupkg has the pdb files in it. If you put it somewhere, I could run dotnet sourcelink test on the nupkg to verify that the source link info is all working.

@ctaggart
Copy link
Copy Markdown
Contributor Author

ctaggart commented Feb 1, 2018

ping @jskeet

@jskeet
Copy link
Copy Markdown
Contributor

jskeet commented Feb 1, 2018

It's fine by me, but I'm not on the team - @anandolee or @xfxyjwf should approve and merge.

@ctaggart
Copy link
Copy Markdown
Contributor Author

Ping @anandolee @xfxyjwf. Anything preventing this from being merged?

@xfxyjwf
Copy link
Copy Markdown
Contributor

xfxyjwf commented Feb 13, 2018

@anandolee Jie, can you review and merge this pull request if it seems good to you?

@ctaggart
Copy link
Copy Markdown
Contributor Author

ctaggart commented Mar 2, 2018

Ping @xfxyjwf @anandolee. Can you review or just merge it?

@anandolee anandolee merged commit 394866c into protocolbuffers:master May 14, 2018
@xfxyjwf xfxyjwf added the c# label Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants