Skip to content

Document what to do with copy-pasted code #4

Open

Description

@m-ou-se

It happens sometimes that code gets submitted for inclusion in the standard library which was taken (almost) literally from e.g. itertools or another library. We should document what to do with these w.r.t. copyright and crediting the original author(s).

Activity

  1. KodrAus commented on Feb 1, 2021

    @KodrAus
    Contributor

    Some of our modules have headings like this in them:

    // Original implementation taken from rust-memchr.
    // Copyright 2015 Andrew Gallant, bluss and Nicolas Koch
    
  2. m-ou-se commented on Feb 3, 2021

    @m-ou-se
    MemberAuthor

    Yeah, it'd be good to clarify if that happened with permission, and/or what the license of the original code was. Also, it would be nice to set the git author (or the Co-authored-by field) to the original author(s) when adding copied code, so they get some credit for it too.

    For example, the files stat start with that snippet you just mentioned, were originally added in a commit with someone else as the git committer and author.

  3. KodrAus commented on Feb 4, 2021

    @KodrAus
    Contributor

    We could, say, expect at least the notice in the source itself and recommend the co-authored-by field along with a link back to the original source in the commit?

    For contributors who aren't really familiar with git we might want a bit of a "how to use git in the Rust codebase" to help with rebases, squashing, co-authored-by, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions