pleonex / thirdlicense Goto Github PK
View Code? Open in Web Editor NEW.NET tool to generate third-party notice license files from the transitive project dependencies
License: MIT License
.NET tool to generate third-party notice license files from the transitive project dependencies
License: MIT License
The MSI installers requires an RTF file to show the license. The tool should be able to generate the format so the file can be automatically included.
Open Source tools can be installed into the special file .config/dotnet-tools.json
.
Would be nice if the tool could also scan this file and provide attribution.
Hi there.
Firstly, I wanted to say this is a really useful library. I didn't see a bug template for this repository, so I just tried to include as much detail as possible.
Steps
NuGet.config
to repositorypackageSources
, e.g. <packageSources><add key="AzureDevOps" value="https://pkgs.dev.azure.com/.../nuget/v3/index.json" /></packageSources>
csproj
thirdlicense --project {project}
Observed
There is an unhandled exception with HTTP Status Code of 401 (Unauthorized).
Expectation
I believe Third License should either:
--ignore-failed-sources
in dotnet restore)I have no experience with the NuGet SDK so I don't think I can do option 1, but I am more than happy to contribute a PR for option 2. If that would be okay?
Stack Trace
Unhandled exception: NuGet.Protocol.Core.Types.FatalProtocolException: Unable to load the service index for source https://pkgs.dev.azure.com/{redacted}/_packaging/{redacted}/nuget/v3/index.json.
---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at NuGet.Protocol.HttpSource.<>c__DisplayClass15_0`1.<<GetAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at NuGet.Common.ConcurrencyUtilities.ExecuteWithFileLockedAsync[T](String filePath, Func`2 action, CancellationToken token)
at NuGet.Common.ConcurrencyUtilities.ExecuteWithFileLockedAsync[T](String filePath, Func`2 action, CancellationToken token)
at NuGet.Protocol.HttpSource.GetAsync[T](HttpSourceCachedRequest request, Func`2 processAsync, ILogger log, CancellationToken token)
at NuGet.Protocol.ServiceIndexResourceV3Provider.GetServiceIndexResourceV3(SourceRepository source, DateTime utcNow, ILogger log, CancellationToken token)
--- End of inner exception stack trace ---
at NuGet.Protocol.ServiceIndexResourceV3Provider.GetServiceIndexResourceV3(SourceRepository source, DateTime utcNow, ILogger log, CancellationToken token)
at NuGet.Protocol.ServiceIndexResourceV3Provider.TryCreate(SourceRepository source, CancellationToken token)
at NuGet.Protocol.Core.Types.SourceRepository.GetResourceAsync[T](CancellationToken token)
at NuGet.Protocol.Core.Types.SourceRepository.GetResourceAsync[T]()
at NuGet.Protocol.HttpFileSystemBasedFindPackageByIdResourceProvider.TryCreate(SourceRepository sourceRepository, CancellationToken token)
at NuGet.Protocol.Core.Types.SourceRepository.GetResourceAsync[T](CancellationToken token)
at NuGet.Protocol.Core.Types.SourceRepository.GetResourceAsync[T]()
at ThirdLicense.NuGetProtocolInspector.AddRepositoryAsync(PackageSource source) in /home/runner/work/ThirdLicense/ThirdLicense/src/ThirdLicense/NuGetProtocolInspector.cs:line 130
at ThirdLicense.NuGetProtocolInspector.AddDefaultEndpointsAsync() in /home/runner/work/ThirdLicense/ThirdLicense/src/ThirdLicense/NuGetProtocolInspector.cs:line 88
at ThirdLicense.Program.Generate(String project, String endpoint, FileInfo output) in /home/runner/work/ThirdLicense/ThirdLicense/src/ThirdLicense/Program.cs:line 96
at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext()
I think we can omit duplicated lines for these packages.
Some programs use dependencies that are not specified as NuGet dependencies. In some cases, the developer must provide manually its licenses. This tool could accept as a parameter a file with that description. Potential options:
Feature Request: Allow pointing the tool at a solution and then scan all projects in that solution to generate license list.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.