sstadick / cargo-bundle-licenses

Generate a THIRDPARTY file with all licenses in a cargo project.
Apache License 2.0
86 stars 6 forks source link

Add repository field to license #30

Closed troppmann closed 6 months ago

troppmann commented 8 months ago

Hey, i realy like this tool. I also wanted to show the URL of the repository of each license. The output includes now the URL as string of the repository.

sstadick commented 8 months ago

Thanks for the PR! I think I like the change, I just need to think about about how it might break existing installs / THIRDPARTY files and I haven't looked at the code in a bit.

If you had thoughts on that I'd be interested! I suppose a majore version bump could cover it.

troppmann commented 8 months ago

There are 2 possible solutions i thought of. First is to add the #[serde(default)] to the repository field this will parse old THIRDPARTY files without problems. Second is to make the repository field an Optional<String>. The first solution is more simple. The second solution should be used when an additional command flag is added to enable/disable the repository field. I added #[serde(default)] for now, now it can parse the THIRDPARTY.yml file.

sstadick commented 6 months ago

I'm bumping the major version right now anyways, so I'm pulling this in.