Cartographer
Quickly find non-determinism bugs caused by loops over maps
Install / Use
/learn @pwaller/CartographerREADME
Cartographer points you at the maps
In particular, cartographer lists all source locations in a package which are loops over maps. If you're not careful, these may cause your program to be non-deterministic.
Example of use
go get -u github.com/pwaller/cartographer
$ cartographer github.com/pwaller/cartographer/example
/home/pwaller/.local/src/github.com/pwaller/cartographer/example/main.go:7:2
/home/pwaller/.local/src/github.com/pwaller/cartographer/example/main.go:10:2
/home/pwaller/.local/src/github.com/pwaller/cartographer/example/main.go:14:2
/home/pwaller/.local/src/github.com/pwaller/cartographer/example/main.go:17:2
/home/pwaller/.local/src/github.com/pwaller/cartographer/example/main.go:20:2
License
3-clause BSD-style license.
Trophies
(Please submit more if you have any! :)
-
A >7,000 line code base was emitting things in an arbitrary order, which made diffing the output difficult.
Thanks
To @JohannesEbke for hacking on the earliest prototype together.
Related Skills
node-connect
352.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
