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

cli: set LESS=FRX when running $PAGER #4834

Closed
wants to merge 1 commit into from
Closed

Conversation

ddevault
Copy link

@ddevault ddevault commented Nov 11, 2024

Fixes #3502

First time using jj to send a pull request, so some patience is appreciated.

I will not be signing the CLA, so do with this as you may. I certify the following in its stead:

Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Copy link

google-cla bot commented Nov 11, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

cli/src/ui.rs Outdated Show resolved Hide resolved
@supermarin
Copy link

👍

@martinvonz
Copy link
Member

I asked the Google lawyers how to deal with the lack of a signed CLA. They said we're not allowed to even look at the code changes (which is what I expected, so I didn't look before asking either). So I'm afraid we'll have to close this PR, and I suppose we're not technically allowed to accept a PR from @yuja or anyone else who has looked at the code either. I have my open PR #3657 to address the same problem. I just haven't found time to get back to it, and it sounds like the consensus was to do it in a simpler way than I had. I appreciate the effort, @ddevault. I'm sorry we can't accept it.

@martinvonz martinvonz closed this Nov 12, 2024
@thoughtpolice
Copy link
Collaborator

thoughtpolice commented Nov 12, 2024

FWIW, it's unclear the above fix even meets what would be known as the "threshold of originality" for copyright in the US, if it's just setting some launch variable; I strongly suspect it (and many other obvious 1-to-lets-say-10-line fixes) would fall under this threshold. There has been some precedent for this in other projects, like mold, which used this before its move to MIT. But I guess it's a matter of if OSPO thinks this is relevant or not in the mean time. (In the future assuming we can shed Google's CLA, I suspect we'd still require sign offs for all non-trivial changes, but this kind of change is one where we wouldn't really require it anyway, even if we were using some-other-thing-thats-basically-a-CLA.)

@martinvonz
Copy link
Member

and I suppose we're not technically allowed to accept a PR from @yuja or anyone else who has looked at the code either.

Let me reinforce that "I suppose" just in case: I am not a lawyer

@ddevault
Copy link
Author

I asked the Google lawyers how to deal with the lack of a signed CLA. They said we're not allowed to even look at the code changes (which is what I expected, so I didn't look before asking either). So I'm afraid we'll have to close this PR, and I suppose we're not technically allowed to accept a PR from @yuja or anyone else who has looked at the code either. I have my open PR #3657 to address the same problem. I just haven't found time to get back to it, and it sounds like the consensus was to do it in a simpler way than I had. I appreciate the effort, @ddevault. I'm sorry we can't accept it.

I have some follow-up questions. How do you deal with other Apache 2.0-licensed code you find in the wild? Are you allowed to read the code of your dependencies even if the authors haven't signed the Google CLA? Is running "cargo add" subject to the same scrutiny? Are you allowed to reuse or integrate code from sources that haven't signed the CLA on your own authority, like a StackOverflow answer (CC-BY-SA)?

@ilyagr
Copy link
Collaborator

ilyagr commented Nov 13, 2024

The official answers to (a version of) these questions are public, in https://opensource.google/documentation/reference/thirdparty#all_non-google_or_open_source_code_and_data_goes_into_third_party.

Outside Google, I would guess (but IANAL), they'd recommend that a project like jj also creates a third_party directory for any dependencies it would want to vendor that are used via their license as opposed as via the CLA. (Google's specific rules for this don't seem to be public, but perhaps somebody can find something similar, or make an educated guess)

Less relevantly, I think https://opensource.google/documentation/reference/patching is worth reading to see how corporations think of their employees contributing to open source. My IANAL understanding most corporations make people sign agreements that all of their work or ideas even vaguely related to the company's interests (so, for Google, any software work) is owned by the company.

There are companies that have stricter rules than Google. AFAIK, Apple refuses to license their employee's work to open-source projects with few exceptions (like contributing to Swift). So, Apple employees are essentially forbidden from contributing to open source, even in their free time. I am not sure whether they are even allowed to file a bug report.

@ilyagr
Copy link
Collaborator

ilyagr commented Nov 13, 2024

Perhaps a more relevant example: we use Sapling's code for graph drawing in a way that I believe (but I'm not sure) did not require them to sign the CLA. Instead, they licensed their code as Apache and published it on crates.io.

(Actually, that might not be the best example, but we use plenty of other crates by people who I don't believe had to sign the CLA

So, I think the specific example of cargo add for Apache or MIT-licensed projects is OK. Something similar might be possible for other encapsulated piece of code under a permissive license, even if the author did not publish it to crates.io, but it might require keeping it segregated in a third_party dir or following some other rules; it could get pretty bureaucratic pretty quickly. Again, I'm not sure and IANAL.

But publishing code as a package in an acknowledged packaging ecosystem certainly makes it easier.

@ddevault
Copy link
Author

The official answers to (a version of) these questions are public, in https://opensource.google/documentation/reference/thirdparty#all_non-google_or_open_source_code_and_data_goes_into_third_party.

This applies to Google's internal monorepo, not personal projects of Googlers.

@ddevault
Copy link
Author

So I'm afraid we'll have to close this PR, and I suppose we're not technically allowed to accept a PR from @yuja or anyone else who has looked at the code either

Seeing as @yuja is the second-most prolific contributor to jj after yourself it may be in the project's best interests for you to have a more two-sided conversation about policy with the lawyers rather than asking them to hand down an edict.

@ilyagr
Copy link
Collaborator

ilyagr commented Nov 13, 2024

The official answers to (a version of) these questions are public, in https://opensource.google/documentation/reference/thirdparty#all_non-google_or_open_source_code_and_data_goes_into_third_party.

This applies to Google's internal monorepo, not personal projects of Googlers.

Ah, perhaps I found a better link: https://opensource.google/documentation/reference/releasing/preparing#third-party_components and https://opensource.google/documentation/reference/releasing/preparing#third-party_components.

This applies to "first-party Google projects" like Chromium. I don't know and don't want to speculate on whether jj counts as that, and whether all of those rules are necessary for it, but they'd probably be sufficient for a Google employee asking themselves most of your questions from #4834 (comment). I interpret the third-party_components link as saying "cargo add is fine".

https://opensource.google/documentation/reference/releasing/contributions is relevant as well.

I still recommend https://opensource.google/documentation/reference/patching as follow-up reading for what kind of procedures Google likes.

@ilyagr
Copy link
Collaborator

ilyagr commented Nov 13, 2024

I understand that this is basically the opposite of your point: you are actually interested in whether we could get away with doing less or negotiate better terms. Still, my point is that the questions in #4834 (comment) have answers, usually written by lawyers. Lawyers often like to describe some rules to follow, some things that are definitely not OK, and then they say "ask us if that's not good enough for you for some good reason".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting PAGER=less in the environment causes ANSI escape sequences to appear by default
6 participants