Skip to content

Move the tests/dependencies Linguist rule into the root .gitattributes - #8697

Merged
cknitt merged 5 commits into
masterfrom
cristianoc/remove-externally-read-files
Oct 4, 2026
Merged

cknitt merged 5 commits into
masterfrom
cristianoc/remove-externally-read-files

Conversation

@cristianoc

@cristianoc cristianoc commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #8712.

Summary

  • Move the tests/dependencies Linguist rule into the root .gitattributes. tests/dependencies/** linguist-vendored replaces tests/dependencies/.gitattributes, so the vendored test dependencies stay out of GitHub's language statistics and all attributes live in one file.
  • Describe .gitattributes in CONTRIBUTING.md, under "Cloning the Git Repo": LF line endings and the vendored paths.

git check-attr linguist-vendored reports set for files under tests/dependencies/.

Test plan

  • make test
  • make checkformat
  • git check-attr linguist-vendored -- tests/dependencies/rescript-react/src/React.res

🤖 Generated with Claude Code

cristianoc and others added 2 commits October 2, 2026 07:36
context7.json configures the external Context7 documentation indexer
(added on purpose in #8417). Nothing in this repository reads it. Deleting it may stop or change
Context7's indexing of this repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>
The file marks the vendored @rescript/react copy as linguist-vendored.
Only GitHub's language statistics read it; nothing in this repository
does. Without it, GitHub may count the vendored ReScript sources in the
repository's language breakdown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>
@cristianoc
cristianoc requested a review from cknitt October 2, 2026 06:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-02T06:32:46.827582Z 883bf2c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cristianoc cristianoc mentioned this pull request Oct 2, 2026
21 of 22 tasks

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 883bf2c937

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread context7.json
@@ -1,49 +0,0 @@
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the Context7 indexing contract

For Context7 consumers, removing this file discards the repository configuration that associates the index with /rescript-lang/rescript, restricts indexed input to the documentation/runtime/tools, and redirects broader language questions to llms.txt. A subsequent external re-index can therefore ingest unrelated compiler and test internals or stop using the intended project configuration, degrading generated answers in a way no repository test detects; retain the file unless the Context7 integration has been explicitly decommissioned.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. The deletion is reverted in 4039c80, so context7.json and its indexing configuration stay.

Comment thread context7.json
@@ -1,49 +0,0 @@
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add a changelog entry for the indexing change

If removing the Context7 configuration is intentional, it is a user-facing documentation change because it alters how ReScript material is indexed and served to Context7 users, but this diff contains no entry in the current (Unreleased) section. Add the required changelog entry with the PR link so downstream users can discover the change.

AGENTS.md reference: AGENTS.md:L93-L95

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer applies: context7.json is kept (4039c80), and removing tests/dependencies/.gitattributes only affects GitHub's language statistics, so there is no user-facing change to record.

@pkg-pr-new

pkg-pr-new Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@8697

@rescript/belt

npm i https://pkg.pr.new/@rescript/belt@8697

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@8697

@rescript/darwin-x64

npm i https://pkg.pr.new/@rescript/darwin-x64@8697

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@8697

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@8697

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@8697

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@8697

commit: fa2f884

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

@cknitt

cknitt commented Oct 2, 2026

Copy link
Copy Markdown
Member

Not a Context7 user myself, not sure if that is ok to remove.

@jderochervlk added it at the time.

The Context7 indexer still reads it to scope and configure the project's
index, so the file stays until that integration is retired.

This reverts commit fa762dc.

Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cristianoc cristianoc changed the title Remove context7.json and tests/dependencies/.gitattributes Remove tests/dependencies/.gitattributes Oct 2, 2026
@cristianoc

Copy link
Copy Markdown
Collaborator Author

Thanks, agreed: since the Context7 indexer still reads context7.json and we can't confirm the integration is retired, I've reverted that deletion (4039c80). This PR now only removes tests/dependencies/.gitattributes. @jderochervlk, if Context7 is no longer used, it can go in a separate PR.

@codecov

codecov Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.86%. Comparing base (ece8b14) to head (fa2f884).
⚠️ Report is 19 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8697      +/-   ##
==========================================
+ Coverage   78.67%   79.86%   +1.19%     
==========================================
  Files         476      470       -6     
  Lines       64402    63443     -959     
==========================================
+ Hits        50670    50671       +1     
+ Misses      13732    12772     -960     

see 160 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

cknitt commented Oct 4, 2026

Copy link
Copy Markdown
Member

I'd keep this. The fact that nothing in the repository reads it doesn't make it unused—GitHub Linguist is its intended consumer.

The rule correctly marks the copied test dependencies as vendored code, excluding them from the repository's language statistics. It doesn't hide their diffs or affect builds, and maintaining this one line costs very little.

If the goal is to consolidate configuration, we could move the equivalent rule into the root .gitattributes:

tests/dependencies/** linguist-vendored

Otherwise, I don't see a practical benefit to removing it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>
@cristianoc cristianoc changed the title Remove tests/dependencies/.gitattributes Move the tests/dependencies Linguist rule into the root .gitattributes Oct 4, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>
@cristianoc

Copy link
Copy Markdown
Collaborator Author

Agreed, thanks. I moved the rule into the root .gitattributes as tests/dependencies/** linguist-vendored (git check-attr reports it set for those files) and described .gitattributes in CONTRIBUTING.md.

@cknitt
cknitt enabled auto-merge (squash) October 4, 2026 07:22
@cknitt
cknitt merged commit 6b52b9b into master Oct 4, 2026
24 checks passed
@cknitt
cknitt deleted the cristianoc/remove-externally-read-files branch October 4, 2026 07:38
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.

2 participants