Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node: $Format:%H$
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

To document this here: I asked Cursor(GPT-5.3 Codex Extra High):

Do you know if we can add comments at the top of the file? Without, there is no immediately obvious connection to setuptools-scm.

The response:

  Short answer: not as normal comment lines.
  • setuptools-scm parses .git_archival.txt as RFC822-style headers (key: value), not as a general text file.
  • A top line like # this is for setuptools-scm is a non-header line, which stops header parsing, so node, node-date, etc. may not be read.
  • Safe alternative inside the file: add an extra header field, e.g. x-setuptools-scm: git archive metadata (unknown keys are ignored).
  • Best place for human-readable explanation is usually .gitattributes, e.g. a comment above .git_archival.txt export-subst.

I saw Cursor writing code to actually try it out locally, so I believe this is a reliable/conclusive finding.

node-date: $Format:%cI$
ref-names: $Format:%D$
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cuda/_version.py export-subst
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a file that hasn't existed in the repo for a long time. Just removing it for cleanup -- not strictly necessary.


* text eol=lf
*.cmd text eol=crlf

Expand All @@ -16,3 +14,5 @@ cuda_core/cuda/core/_cpp/*.hpp -binary text diff
*.svg binary
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true

.git_archival.txt export-subst
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There is no immediately obvious connection from .git_archival.txt to setuptools-scm. If you know it, good, if you don't you have to go through a couple hoops to discover what this is for. Easy idea to help at least a little bit:

# See PR #1609
.git_archival.txt export-subst

Maybe there is a better way to make the connection more discoverable?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've added a comment here.

2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repos:
language: python
additional_dependencies:
- https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl
exclude: '.*pixi\.lock'
exclude: '(.*pixi\.lock)|(\.git_archival\.txt)'
Copy link
Copy Markdown
Contributor Author

@mdboom mdboom Feb 12, 2026

Choose a reason for hiding this comment

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

We can't put any "extra" content in this file, including a copyright header, so we need to have the SPDX precommit ignore it.

args: ["--fix"]

- id: no-markdown-in-docs-source
Expand Down
1 change: 1 addition & 0 deletions cuda_bindings/.git_archival.txt
1 change: 1 addition & 0 deletions cuda_core/.git_archival.txt
1 change: 1 addition & 0 deletions cuda_pathfinder/.git_archival.txt
1 change: 1 addition & 0 deletions cuda_python_test_helpers/.git_archival.txt