@@ -12,6 +12,67 @@ If you're interested in contributing, we have a list of some suggested tickets t
1212to get started on
1313[ here] ( https://jira.mongodb.org/issues/?jql=project%20%3D%20TOOLS%20AND%20labels%20%3D%20community%20and%20status%20%3D%20open )
1414
15+ ## Dev Tools (mise)
16+
17+ We use [ ` mise ` ] ( https://mise.jdx.dev/ ) to manage dev tools (Go, Node, Python, linters, formatters,
18+ etc.), ensuring every developer and CI run uses the same versions.
19+
20+ ### Installing mise
21+
22+ To install mise, run this command:
23+
24+ ```
25+ MISE_VERSION=$( cat ./scripts/mise-version.txt ) sh scripts/mise.run.sh
26+ ```
27+
28+ Then run:
29+
30+ ```
31+ # Enable the Go backend
32+ mise settings experimental=true
33+ # Trust the config in this repo
34+ mise trust
35+ # Install all dev tools (Go, Node, Python, linters, etc.)
36+ mise install
37+ # Install Node packages needed by eslint, prettier, etc.
38+ npm install
39+ ```
40+
41+ After ` mise install ` , all tools (including ` go ` ) are available directly in your shell when you're in
42+ this repo's directory. See [ the mise docs] ( https://mise.jdx.dev/ ) for details on shell integration.
43+
44+ ### Adding a new tool
45+
46+ Run ` mise use github:some-org/some-tool@1.2.3 ` . We use the ` github ` backend for tools that provide
47+ binary releases. For Go tools without binary releases, use ` go:some/package@vX.Y.Z ` .
48+
49+ ## Using Mise
50+
51+ You can integrate ` mise ` with your shell so that dev tools are automatically added to your ` PATH `
52+ when your working directory is in the Mongosync repo. See [ the ` mise ` docs] ( https://mise.jdx.dev/ )
53+ for more details on this.
54+
55+ If you _ don't_ want to use that integration, you can instead use
56+ ` mise exec <list of tools> -- some-tool ` to run the tools managed by ` mise ` , so something like
57+ ` mise exec go -- go version ` . It's important to list the tools that ` mise exec ` needs. Without that
58+ list, it will attempt to install _ all_ the tools in our ` mise.toml ` when you run ` mise exec ` . This
59+ is generally fine locally, but can cause problems in CI, where many of the tools we use cannot be
60+ installed on some of the platforms we use.
61+
62+ ### In CI
63+
64+ We do not set up the shell integration when installing ` mise ` in CI. That means that anything in CI
65+ which needs to run Go or another dev tool should use ` mise exec go -- go ... ` or a similar
66+ invocation.
67+
68+ ### Writing Code that Runs Dev Tools
69+
70+ You may want to write code that uses these tools, either as a script for use in CI or some other
71+ case.
72+
73+ All programmatic tool invocations should use ` mise exec <tool> ` . This will work in CI as well as
74+ locally.
75+
1576## Getting Started
1677
17781 . Create a [ MongoDB JIRA account] ( https://jira.mongodb.org/secure/Signup!default.jspa ) .
0 commit comments