Root Cause:
The gel-go client and GEL CLI calculate different SHA1 hashes for the same project path on Windows:
1. GEL CLI creates stash at: $LOCALAPPDATA/EdgeDB/config/projects/server-e2e0b37462f9ec0199f908c8257247f970288a66
- Hashes the path as: C:\Code\project-name\server
2. gel-go client looks for stash at: $LOCALAPPDATA/EdgeDB/config/projects/server-f83cec2984c976035cc7e5ce45040da60951ec86
- Hashes the path with Windows long path prefix: \?\C:\Code\project-name\server
Code Location:
- File: github.com/geldata/gel-go@v1.4.3/internal/client/connutils.go
- Function: stashPath() at line 1519
- Issue at lines 1525-1527:
if runtime.GOOS == "windows" && !strings.HasPrefix(p, \\) {
p = \\?\ + p // This prefix is added before hashing
}
Impact:
- Project linking doesn't work on Windows
- Developers must use EDGEDB_INSTANCE= environment variable as a workaround
- Error message: "Found gel.toml but the project is not initialized. Run gel project init."
Workaround:
Set EDGEDB_INSTANCE=server environment variable or programmatically set it in the application code.
Fix Recommendation:
Either:
- The GEL CLI should also use the \?\ prefix when creating the stash directory hash on Windows
- Or the gel-go client should not add the \?\ prefix before hashing the path
Root Cause:
The gel-go client and GEL CLI calculate different SHA1 hashes for the same project path on Windows:
1. GEL CLI creates stash at: $LOCALAPPDATA/EdgeDB/config/projects/server-e2e0b37462f9ec0199f908c8257247f970288a66
- Hashes the path as: C:\Code\project-name\server
2. gel-go client looks for stash at: $LOCALAPPDATA/EdgeDB/config/projects/server-f83cec2984c976035cc7e5ce45040da60951ec86
- Hashes the path with Windows long path prefix: \?\C:\Code\project-name\server
Code Location:
if runtime.GOOS == "windows" && !strings.HasPrefix(p,
\\) {p =
\\?\+ p // This prefix is added before hashing}
Impact:
Workaround:
Set EDGEDB_INSTANCE=server environment variable or programmatically set it in the application code.
Fix Recommendation:
Either: