desbma / gotify-desktop

Small Gotify daemon to send messages as desktop notifications
GNU General Public License v3.0
50 stars 1 forks source link

Missing license in Cargo.toml #17

Closed alcir closed 8 months ago

alcir commented 8 months ago

Cargo.toml should contain the license line, isn't it? https://github.com/desbma/gotify-desktop/blob/eeb85b8ba151dad2148234514858ea7030eb1e2b/Cargo.toml#L1

desbma commented 8 months ago

Why?

alcir commented 8 months ago

Well, the package isn't published there, but crates.io requires either license or license-file to be set. So, in any case, it is a nice to have imho. Why not?

desbma commented 8 months ago

It's not published on crates.io as you said yourself, so stuffing that information in Cargo.toml would currently be useless. The license is clearly advertised in the README and in this repository so I don't see a problem there. :man_shrugging:

decathorpe commented 3 months ago

so stuffing that information in Cargo.toml would currently be useless.

Not really. Even if this is not published on crates.io, there are tools that collect license information for Rust applications (like cargo-license or the tools we use in Fedora packaging to collect license information) that rely on the package.license key being set.

So if it's 100% clear what this project is GPL-3.0-only licensed, then I don't see a reason why this should not also be set in Cargo.toml.

desbma commented 3 months ago

cargo-license is a tool to get licenses for Rust dependencies, gotify-desktop is a binary for end users, not a dependency of any crate so I don't see the relevance here.

then I don't see a reason why this should not also be set in Cargo.toml.

First, any change has to justify itself, not the reverse. This is even more true for a hobby project.

The reason I have not added this or the many optional fields in Cargo.toml, is that I don't see Cargo.toml as an output of the project, rather an internal implementation detail. And I try to avoid duplicating stuff like that. Less code, less possible mistakes like license mismatch.
Of course that would change if gotify-desktop was uploaded on crates.io, but that is not the case yet.

I'm all for making your life easier if you want to package this, but if your tooling is so inflexible that you can't set a license manually, or extract it from elsewhere (even Github does this, and correctly identifies GPLv3), I think a one line patch does the job.