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

Added source link #93

Closed
wants to merge 27 commits into from
Closed

Added source link #93

wants to merge 27 commits into from

Conversation

pictos
Copy link
Member

@pictos pictos commented Jul 25, 2022

Description of Change

This PR will add the Source Link to our package.

Before (1.0.1 on nuget.org):
image

After (This PR):
image

As you can see the Source Link is green, and we have the Repository information now.

Linked Issues

PR Checklist

Additional information

@pictos pictos added the ♻ housekeeping Related to internal changes not affecting the published libraries label Jul 25, 2022
@pictos pictos requested a review from TheCodeTraveler July 25, 2022 23:07
@pictos pictos self-assigned this Jul 25, 2022
@TheCodeTraveler
Copy link
Collaborator

TheCodeTraveler commented Aug 5, 2022

Hey @pictos! Could you follow up on the CI build errors?

It's happening on both Windows + macOS. I'm also able to reproduce it locally.

error NU5017: Cannot create a package that has no dependencies nor content. [/Users/bramin/GitHub/CommunityToolkit.Maui.Markup/src/CommunityToolkit.Maui.Markup/CommunityToolkit.Maui.Markup.csproj]

@pictos
Copy link
Member Author

pictos commented Aug 5, 2022

@brminnick what's the command that you're using? I tried on my end and everything works on both VS 2022 preview 6 and terminal

image

@pictos
Copy link
Member Author

pictos commented Aug 5, 2022

Also, from the logs

 Successfully created package '/Users/runner/work/1/a/nuget/CommunityToolkit.Maui.Markup.1.0.0-preview1348.nupkg'.
/Users/runner/hostedtoolcache/dotnet/sdk/6.0.302/Sdks/NuGet.Build.Tasks.Pack/build/NuGet.Build.Tasks.Pack.targets(221,5): error NU5017: Cannot create a package that has no dependencies nor content. [/Users/runner/work/1/s/src/CommunityToolkit.Maui.Markup/CommunityToolkit.Maui.Markup.csproj]

looks like the package was created and then an error happens.

@TheCodeTraveler
Copy link
Collaborator

TheCodeTraveler commented Aug 5, 2022

I'm able to reproduce it using the same command in the CI Pipeline:

script: 'dotnet pack -c Release $(PathToCommunityToolkitCsproj) -p:PackageVersion=$(NugetPackageVersion) --output $(Build.ArtifactStagingDirectory)/nuget -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg'

@pictos pictos force-pushed the pj/add-source-link branch from 801b0d2 to c7a990e Compare August 6, 2022 00:49
@pictos
Copy link
Member Author

pictos commented Aug 12, 2022

@brminnick I took the time to investigate this issue, and I would say it's something to do with NuGet or the package...
And has to do with the version number parameter, like on our YAML on MCT we don't specify the output path, as you can see here

script: 'dotnet pack $(PathToCommunityToolkitCoreCsproj) -c Release -p:PackageVersion=$(NugetPackageVersion)'

Locally on my mac, I tried this command and it works.

dotnet pack -c Release -p:PackageVersion=1.2.3.4 --output obj/nuget -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg

Do think that makes sense to use the same pattern as we use for MCT?
Looking in the www I found this StackOverflow post that could have something to do with it. It says this error is caused by a folder that starts with . (not sure if it's our case)

@TheCodeTraveler
Copy link
Collaborator

Thanks Pedro! Let's double-check with @VladislavAntonyuk and @jfversluis who are more familiar with the NuGet part of this CI/CD process.

Vlad/Gerald - what do you think? Can we edit this dotnet pack step?

@VladislavAntonyuk
Copy link
Contributor

We need to remove it from macOS build and move to Windows build.
The output path which is currently specified is used by NuGet publish task. This task exists only in Windows job.

@jfversluis
Copy link
Member

jfversluis commented Aug 17, 2022

Interesting. It seems to create the nupkg but not the snupkg package. The only thing I can think of is that the pdb files are not created in the pipeline and therefore not picked up when creating the snupkg file resulting in an empty package?

But I also can't reproduce this locally. Maybe some bugged .NET version we're using in the pipeline but not locally?

Edit: on the MCT repo we use version 6.0.300 to build and pack while here we use 6.0.x, so that seems to support my theory on the difference in .NET versions.

@TheCodeTraveler

This comment was marked as outdated.

TheCodeTraveler
TheCodeTraveler previously approved these changes Sep 1, 2022
azure-pipelines.yml Outdated Show resolved Hide resolved
azure-pipelines.yml Outdated Show resolved Hide resolved
azure-pipelines.yml Outdated Show resolved Hide resolved
@TheCodeTraveler

This comment was marked as outdated.

@ghost ghost added stale The author has not responded in over 30 days help wanted This proposal has been approved and is ready to be implemented labels Dec 15, 2022
@TheCodeTraveler
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted This proposal has been approved and is ready to be implemented ♻ housekeeping Related to internal changes not affecting the published libraries stale The author has not responded in over 30 days
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants