rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
96.96k stars 12.53k forks source link

validate rust-analyzer licenses #74269

Open ehuss opened 4 years ago

ehuss commented 4 years ago

License validation (https://github.com/rust-lang/rust/blob/master/src/tools/tidy/src/deps.rs) for rust-analyzer is currently not being done. I think it would probably be good to include it in the license checks, just to double-check that something inappropriate doesn't slip in.

I manually checked them, and they seem ok at this point. It would be helpful if the ra crates themselves included a license field in their Cargo.toml for automatic validation.

cc @matklad

matklad commented 4 years ago

I've added light-weight license checking to rust-analyzer itself s well:

https://github.com/rust-analyzer/rust-analyzer/pull/5376/files#diff-7e4576ca6f0e41b02d412c4745763e64R55-R73

matklad commented 4 years ago

I think I won't be working on this directly myself in the nearest future:

  1. we do check licenses in rust-analyzer repo
  2. rust-analyzer is somewhat provisional at the moment
  3. rust-analyzer is a separate workspace, so adding to license check means some "interesting" build system work

That is, it seems relatively low-priority, and with a high chance that something will be changed in the future.

I will, however, try to reduce the set of licenses used by rust-analyzer to, preferably, { "MIT OR Apache-2.0" }.

ehuss commented 4 years ago

No worries, I don't think there is a rush.

Assuming some point in the future, if rust analyzer is added to the workspace and shares Cargo.lock, it will automatically get the license checks. I'm not sure if sharing the lock is feasible, but it would cut down on some compile times to share common dependencies.