plotters-rs / plotters

A rust drawing library for high quality data plotting for both WASM and native, statically and realtimely 🦀 📈🚀
https://plotters-rs.github.io/home/
MIT License
3.89k stars 281 forks source link

[BUG] latest published versions contain bogus LICENSE files #649

Open decathorpe opened 1 month ago

decathorpe commented 1 month ago

Describe the bug

This is a followup for https://github.com/plotters-rs/plotters/issues/392 and https://github.com/plotters-rs/plotters/pull/477.

It looks like you cargo publish was run for v0.3.7 on a system that does not support symbolic links - the LICENSE files contain just the string ../LICENSE and not the actual license text.

If you are going to be publishing from Windows again, symbolic links will not be enough to include the license files, but actual copies of the files will be necessary to have cargo pick them up correctly.

To Reproduce

Download plotters-* crates from crates.io and inspect them. The LICENSE files contain just the string ../LICENSE instead of the license text.

Version Information

AaronErhardt commented 1 month ago

It looks like you cargo publish was run for v0.3.7 on a system that does not support symbolic links

Not sure if Fedora 40 counts as a system that does not support symbolic links. I rather think that Cargo does not resolve symbolic links in general.

decathorpe commented 1 month ago

No, cargo definitely does support this ... I tested running cargo package on Fedora 41, and the resulting .crate file contains the correct LICENSE file, and not just a file that contains the string ../LICENSE.

Looks like something went wrong when the crates for v0.3.7 were published - either the local checkout of the git repo was corrupted, or you used a buggy version of cargo.

AaronErhardt commented 1 month ago

Mhh, strange. Maybe you have to use cargo publish -p ... instead of cd ... && cargo publish because cargo does not load symlinks from outside of the current pwd?

decathorpe commented 1 month ago

I don't think so. I just tried both, and both worked :(

AaronErhardt commented 1 month ago

Then I'm out of ideas why it didn't work. I should have a regular Fedora setup with a recent Rust version via rustup and without notable configuration changes. I'll have a look at this tomorrow.

AaronErhardt commented 1 month ago

I just tried both cargo package variants and both didn't work for me. Not sure why honestly. As I said earlier, I just have a regular Fedora setup...

decathorpe commented 1 month ago

Did you try from a fresh git clone of this repo? Maybe your local checkout is corrupted somehow.

AaronErhardt commented 1 month ago

Thanks for the good idea! That actually worked. I guess the next release will fix the issue then automatically.

decathorpe commented 1 month ago

Good to know. Thanks for checking!