fix(repo): make a clean clone pass its own checks on Windows - #134
fix(repo): make a clean clone pass its own checks on Windows#134kmuzammil101 wants to merge 2 commits into
Conversation
|
@kmuzammil101 is attempting to deploy a commit to the Comp AI - PoC Team on Vercel. A member of the Team first needs to authorize it. |
|
@cubic-dev-ai verify this for me rq |
@ripgrim Verified both changes—they're sound and match the PR's claims.
One thing I can't fully confirm from the snippet: the actual failure mode you hit with The separate Tip: get faster answers by chatting with cubic’s review copilot in the review UI |
I found two small Windows-related issues after cloning the project today and following the quick start:
bun installfails on Windows.The prepare script uses two redirects (
>/dev/null 2>&1), which Bun's shell can't parse on Windows. The dependencies still install, but the command exits with an error at the end. Because of this,core.hooksPathisn't configured, so the pre-push hook isn't installed. The CONTRIBUTING guide saysbun installsets this up, but that's not true on Windows. I had to use--no-verifyto push.bun run lintfails because of Windows line endings.Git for Windows uses CRLF by default, while Biome expects LF. Since the repo doesn't have a
.gitattributesfile, Windows checkouts get CRLF and linting fails across@crm/db,@crm/ui, and@crm/env. Adding* text=auto eol=lfto.gitattributesfixes this.git add --renormalize .produced no changes, so this shouldn't affect existing files or macOS users—it only makes Git use LF when checking out on Windows.I also checked the tests.
bun run testfails on an unmodifiedmainas well, so it doesn't seem related to these changes. Thebulk.spec.tstest times out after around 5 seconds and then the test process hangs.Separately,
bun run db:testalso fails on a clean clone becausepgis used intest-db.tsbut isn't listed in any package.json. Also,test-db.tsexpectsTEST_DATABASE_URLfromprocess.env, but when running through thepackages/dbfilter, Bun doesn't load the root.env. The existingrequire-local-db.tsalready handles this correctly.Happy to send a separate fix for the database test issues.
Summary by cubic
Fix Windows setup: make the
preparescript work with Bun’s shell and enforce LF checkouts so lint passes on Windows. After this, a clean clone on Windows installs Git hooks andbun run lintsucceeds.prepareto setcore.hooksPathwithout double redirects (git config core.hooksPath .githooks 2>/dev/null || true) sobun installdoesn’t error on Windows..gitattributeswith* text=auto eol=lfto ensure LF line endings on Windows and avoid Biome CRLF lint failures.Written for commit 6f200fd. Summary will update on new commits.