Skip to content

Improve support of using jj to manage rust-lang/rust as a collocated git repo #128708

Closed

Description

@yaahc

Right now using jj to manage the rust-lang/rust repo locally causes x tidy to fail: #128706

This is a result of jj not yet having support for .gitattributes which is responsible for adding the crlf character to the failing test.

While I would love to get that support added to jj upstream I'm assuming it is non-trivial and I'd like a better solution in the short term so I can continue to use jj while contributing to the compiler.

@jyn514 suggested I use --exclude tests/rustdoc-ui/intra-doc/warning-crlf.rs in the meantime which I'm fine with but I'd like a way to set this in my config.toml or some equivalent mechanism doesn't require manually adding this set of arguments to every invocation of x test I make.

Activity

  1. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Aug 5, 2024
  2. changed the title [-]Improve support using `jj` to manage `rust-lang/rust` as a collocated git repo[/-] [+]Improve support of using `jj` to manage `rust-lang/rust` as a collocated git repo[/+] on Aug 5, 2024
  3. jyn514 commented on Aug 5, 2024

    @jyn514
    Member

    note this is essentially the same as #35678

    i actually would like an even more general solution, where the flags and configs are completely interchangable and you can specify either in either place, but a solution just for exclude seems ok too.

    @rustbot label T-bootstrap A-contributor-roadblock

  4. added
    A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to Rust
    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
    on Aug 5, 2024
  5. yaahc commented on Aug 5, 2024

    @yaahc
    MemberAuthor

    So it turns out that x test --exclude tests/rustdoc-ui/intra-doc/warning-crlf.rs won't work as a short term fix even because --exclude does not work with tidy atm.

    For now I'm going with git rm tests/rustdoc-ui/intra-doc/warning-crlf.rs && git checkout HEAD !$ but I expect this to break frequently and be a source of annoyance so I'll be looking towards fixing this soon if it does in fact end up being a problem.

  6. sunshowers commented on Aug 6, 2024

    @sunshowers
    Contributor

    re crlf, as a source control expert I'd recommend never using any kind of autoconversion -- it is a bit of a nightmare to work with in too many cases.

    Rather, I'd consider checking in the file with CRLFs, and disabling autoconversion so files are always checked out as-is.

    (Another option is to effectively treat the file as binary content, e.g. use some other means of encoding the file, such as base64 or putting it in a tarball. But I don't know how practical that is)

  7. added
    C-enhancementCategory: An issue proposing an enhancement or a PR with one.
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Aug 6, 2024
  8. added a commit that references this issue on Aug 7, 2024
  9. added a commit that references this issue on Aug 7, 2024
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

    A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions