Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
29 changes: 29 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,35 @@

See README.md for project overview and consumer API.

## Cloning on Windows

The snapshot file names under `tests/Generator.Tests/Snapshots` run to 199
characters, which carries a checkout past the 260 character Windows path limit
unless the clone root is unusually shallow. Git reports `Filename too long` for
each one, then `fatal: unable to checkout working tree`, and leaves a
repository with most of its files missing rather than an obvious failure.

```sh
git clone -c core.longpaths=true https://github.com/zompinc/sync-method-generator.git
```

`-c` applies the setting to this clone alone. Setting it globally is worth
doing on any Windows machine which builds .NET repositories, snapshot testing
being common enough that this is not the last repository to hit it:

```sh
git config --global core.longpaths true
```

The length is mostly intrinsic rather than careless. The generator caps its own
generated file names at 100 characters, and Verify prefixes each snapshot with
the test class and method names, which puts the floor near 155 before any
particular test is named. Renaming tests buys tens of characters; it does not
remove the limit.

Consumers installing the Claude Code plugin are unaffected, the documented
install command using a sparse checkout which never touches the snapshots.

## Build & Test

```bash
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,12 @@ The plugin ships a single skill covering setup, the attribute options, the trans

## Development

Clone with `core.longpaths` enabled on Windows - the snapshot file names are long enough that a checkout otherwise fails partway through:

```sh
git clone -c core.longpaths=true https://github.com/zompinc/sync-method-generator.git
```

### Related projects

- [SyncToAsyncExtension](https://marketplace.visualstudio.com/items?itemName=lsoft.SyncToAsyncExtension) - Allows switching between sync and async versions of a method. Very useful in development of this library.
Expand Down
Loading