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

Update PublishRepositoryUrl in README #1270

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MattKotsenas
Copy link
Member

Fixes #1203.

  • Update the README to make it clear that <PublishRepositoryUrl> is still an opt-in setting, even in .NET SDK 8+
  • Clarify that <EmbedUntrackedSources> is true by default in .NET SDK 8+
  • Use GitHub [!TIP] and [!NOTE] to better highlight caveats about referencing Source Link

@MattKotsenas
Copy link
Member Author

@tmat, would you mind taking a look when you get a chance? If you have any questions or concerns, please let me know. Thanks!

README.md Outdated
If your project uses .NET SDK 8+ and is hosted by the above providers it does not need to reference any Source Link packages or set any build properties.

**Otherwise**, you can enable Source Link experience in your project by setting a few properties and adding a PackageReference to a Source Link package specific to the provider:
You can enable the Source Link experience in your project by opt-ing in to publish repository information:
Copy link
Member

Choose a reason for hiding this comment

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

I think the previous wording was better. PublishRepositoryUrl is not necessary to enable Source Link experience. It's only needed to publish URL to nupkg.

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we need to separate the properties from the PackageReferences in the project snippet.

Copy link
Member Author

@MattKotsenas MattKotsenas Aug 28, 2024

Choose a reason for hiding this comment

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

I think the previous wording was better. PublishRepositoryUrl is not necessary to enable Source Link experience. It's only needed to publish URL to nupkg.

#1203 is evidence that users are confused by the current wording. Maybe the next step would be to clarify what Source Link experience users get without setting PublishRepositoryUrl, as it isn't clear to me either.

Perhaps we need to separate the properties from the PackageReferences in the project snippet.

That was my intention with this change. Can you clarify what changes you'd like to see here, and I'll be happy to make them. Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

@tmat, I thought about this more and I think I came up with a better framing. I made a small addition to the opening section to capture that what we (I?) think of as "Source Link" is three components:

  1. Embedding source information into the PDB
  2. Adding source information into the .nuspec
  3. Distributing PDBs

1 and 2 coupled in the current version of the docs, which is what lead to confusion in the linked bug. Currently, the docs make it look to some readers that in .NET 8+, 1 and 2 happen automatically, but only 1 happens automatically. The previous version of this PR made it sound like 1 and 2 are both controlled by <PublishRepositoryUrl>, which isn't true either.

Now I think it's clearer that:

  • 1 is controlled by including the package (or using a new SDK)
    • I also moved the <EmbedUntrackedSources> suggestion to this part as well, since it's coupled to the SDK decision and independent of the NuGet part
  • .nuspec information is controlled by <PublishRepositoryUrl>

@tmat let me know what you think. Very happy to hear and include your feedback. Thanks!

@MattKotsenas MattKotsenas force-pushed the bugfix/docs-publish-repo-url branch from 15dc2bb to 60a09b5 Compare August 29, 2024 16:31
@MattKotsenas MattKotsenas requested a review from tmat August 29, 2024 16:32
@MattKotsenas
Copy link
Member Author

@tmat would you mind taking another look here? Thanks!

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.

PublishRepositoryUrl is not automatically set by .NET SDK 8
3 participants