Opened 3 years ago

Closed 3 years ago

#7708 closed enhancement (fixed)

RFE: Normalize the git repository

Reported by: Zach Pearson Owned by: Zach Pearson
Priority: moderate Milestone:
Component: Build System Version:
Keywords: Cc: chimerax-programmers
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

I mentioned in the group meeting that I was investigating development environments for ChimeraX on Windows, and the Windows version of PyCharm is somewhat unhappy with our repository. On a worktree that shows clean in the cygwin shell, PyCharm thinks there are files with many differences. It comes down to permissions and line endings.

I propose adding a .gitattributes file with the following content:

* text=auto eol=lf

This normalizes the line endings of all new text files to LF in the worktree and LF in the repository for *nix platforms, while Windows checkouts have CRLF in the worktree and LF in the repository. If I remember correctly, Cygwin doesn't like CRLF, so it expects LF line endings anyway.

After correcting all the line endings and adding the .gitattributes file to my repo as a test, I then had a list of a couple dozen files that git wanted to change from 0755 permissions to 0644 permissions.

The last complaint that git had with our repository on the cygwin side is that it doesn't understand whatever Cygwin does to create symbolic links.

However, and sorry to bury the lede, one advantage is that with normalization it's possible to use MinGW64/MSYS2 instead of Cygwin, which is much closer to bare Windows. I experimented with setting up a MinGW64/MSYS2 build environment on my Windows machine at home and was successful building about half of ChimeraX -- prereqs, bundle builder, core, and a few other bundles, until I was stopped on an error finding a Gromacs library in md_crds.

Even then, I had enough to test loading a natively checked out ChimeraX repo into PyCharm. I was able to add the interpreter at C:\Users\zpear\git\ChimeraX\ChimeraX.app\bin\python.exe and use it for linting, code completion, and as a shell.

Visual Studio Community Edition also supports adding MinGW64 as a shell and the ChimeraX interpreter as the Python interpreter for the IDE.

Change History (2)

comment:1 by Zach Pearson, 3 years ago

Owner: set to Zach Pearson
Status: newassigned

comment:2 by Zach Pearson, 3 years ago

Resolution: fixed
Status: assignedclosed

Added .gitattributes

Note: See TracTickets for help on using tickets.