Description
Updates
2022-03-12: #70 (comment) This will be released as v1.1 instead, because the breaking change might not affect anyone now (TL;DR there's only a regression for people still using GOPATH). Also renamed this issue to make the purpose clearer.
2021-1-11: #70 (comment) I sent out a bunch of PRs for merging changes back to go-licenses repo. The final PRs I'm sending now try to change as minimal as possible. There are no substantial command/arg changes and there are no significant behavior changes. The only major theme is using go modules information to get license URLs more stably than the v1 go-licenses tool.
Original Proposal
Hi everyone, I'm building a rewrite of go-licenses that I propose to be go-licenses/v2.
Latest version on my dev branch: https://github.com/Bobgy/go-licenses/blob/main/v2. No longer latest.
Built binary releases: https://github.com/Bobgy/go-licenses/releases.
I initially built it as a new tool, but after chatting with @wlynch, we agreed that it would better be v2 of this tool rather than a new brand.
The major changes are:
- only supports go modules, it can get license URL for modules without a need for you to vendor your dependencies.
do not assume each package has a single license, v2 will scan all the files for each module to find licenses.Deferred for future considerations.
For more details, refer to the README.
The new tool already addresses many open issues:
- traverse vanity urls for repository location for license url #32 vanity urls are curled and extracted to find the repo
- Repository url paths should be versioned #33 urls are now versioned according to go modules info
- Libraries are ignored when goroot and gopath share the same prefix #38 now we use modules info, no custom parsing
- Go modules support? #53 proper go modules support
- bug: Odd lack of dependency licenses for moby/buildkit #64 is a subproblem of proper go modules support
Deprioritized features
- go-licenses doesn't find license in UNLICENSE files in repos #39 we scan all files for licenses, so we can find UNLICENSE files too
and might help the following (but needs confirmation):
Roadmap
- chore: add Makefile and a precommit check #101
- CSV command
- Get modules/packages list
- feat!(v2): use go modules info #94
- feat!(v2): csv - validate license URL and guess more if invalid #110
- Config file customization & overrides
- Documentation
- Smaller Issues
- P1 Replace glog comment