Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The provenance of tracing-subscriber/src/fmt/time/datetime.rs appears to be troubled #1644

Closed
krasimirgg opened this issue Oct 18, 2021 · 7 comments
Labels
crate/subscriber Related to the `tracing-subscriber` crate

Comments

@krasimirgg
Copy link
Contributor

Bug Report

Version

Crate tracing-subscriber, AFAICT versions since 56b841d, including the current master branch.

Description

The provenance of the code in datetime.rs appears to be troubled: per comments on code etc, it appears to have started as musl code (MIT license), gone through c2rust and been given manual edits (those edits in the scope of an Apache-2.0 licensed project, so presumably those edits are Apache-2.0), and then been copied into this codebase as MIT. Could we replace that code with something that has a clearly MIT-licensed provenance, or switch this package to explicitly be MIT AND Apache-2.0 licensing?

/// This is directly copy-pasted from https://github.com/danburkert/kudu-rs/blob/c9660067e5f4c1a54143f169b5eeb49446f82e54/src/timestamp.rs#L5-L18

@hawkw hawkw added the crate/subscriber Related to the `tracing-subscriber` crate label Oct 18, 2021
@hawkw
Copy link
Member

hawkw commented Oct 19, 2021

Copying the code from kudu-rs (the Apache-2.0 project) was suggested by @danburkert, the maintainer of that project: #791 (comment)

Because it was Dan's suggestion, I didn't take the time to double-check that the two projects were compatibly licensed. My bad.

@danburkert
Copy link

My opinion (and I'm far from having a sophisticated understanding of copyright) is that datetime.rs is entirely derivative of musl's __secs_to_tm.c, and therefore I don't believe I hold copyright on it. If that's wrong and I do hold copyright on it, I release it under as ASL 2.0 or MIT.

@danburkert
Copy link

danburkert commented Nov 9, 2021

Thanks for fixing @krasimirgg. This has got me thinking, this code is now copied into tracing which itself is a dependency of rustc. It'd be really nice if it were upstreamed as impl Display for SystemTime. I personally have copied it to another closed-source codebase (in addition to kudu-rs), and I'm considering copying it into prost-types as well. I'd love if it were upstreamed instead, time willing I may start an internals thread to do so, but if anyone wants to take the torch then by all means.

@danburkert
Copy link

(I also cringe that the 'heart attack' comment has survived for like 5 years, and is on track to survive an indefinite amount of time longer)

@hawkw hawkw closed this as completed in c6055aa Nov 12, 2021
hawkw pushed a commit that referenced this issue Nov 20, 2021
Add comments to clarify the provenance of `fmt/time/datetime.rs`,
addressing #1644.

Fixes #1644
hawkw pushed a commit that referenced this issue Nov 20, 2021
Add comments to clarify the provenance of `fmt/time/datetime.rs`,
addressing #1644.

Fixes #1644
@krasimirgg
Copy link
Contributor Author

Thank you for updating the 0.3 version! Could you also cherry pick this into the 0.2.x version of the crate over at crates.io if possible? This will be handy since the 0.2.x version is still a dependency of some rustc components and of tracing-tree, which is itself a rustc dependency.

@davidbarsky
Copy link
Member

davidbarsky commented Nov 29, 2021

@krasimirgg i suspect that it's going to be somewhat painful for us to update 0.2. I can, however, spend some time on updating tracing-tree so that rustc can move to tracing-subscriber 0.3. Would that work for you?

@krasimirgg
Copy link
Contributor Author

@krasimirgg i suspect that it's going to be somewhat painful for us to update 0.2. I can, however, spend some time on updating tracing-tree so that rustc can move to tracing-subscriber 0.3. Would that work for you?

This sounds good! It would leave us with just the rustc_driver (and some additional rustc tools) that directly depend on tracing-subscriber 0.2, which I guess will be OK to bump to tracing-subscriber 0.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate/subscriber Related to the `tracing-subscriber` crate
Projects
None yet
Development

No branches or pull requests

4 participants