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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## main (unreleased)

### Changes

- [#22](https://github.com/nrepl/proof/pull/22): The bundled profiles have short names, with versions from their `version` snippets, so the servers in the compatibility matrix get columns of the same width.

## 0.2.0 (2026-11-03)

### Features
Expand Down
4 changes: 2 additions & 2 deletions cmd/proof/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ func run(args []string) int {
results := check.Run(env, selected, checks.WireRules())
outcome := check.Apply(results, p.ExpectedFailures, opts.only == "")

r := report.Run{Proof: proofVersion(), Server: p.Name, ServerVersion: ver, Address: addr, Started: started,
Results: results}
r := report.Run{Proof: proofVersion(), Server: p.Name, ServerVersion: ver, Homepage: p.Homepage,
Address: addr, Started: started, Results: results}
report.Text(os.Stdout, r, opts.verbose)
for _, id := range outcome.Stale {
fmt.Printf("%s is listed in expected-failures but didn't fail; remove it from the profile\n", id)
Expand Down
4 changes: 2 additions & 2 deletions doc/profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ code = "fizz.core/version"

| Option | Required | Description |
|---|---|---|
| `name` | yes | The name of the server in reports and in the compatibility matrix. If the profile always starts the same version of the server, it's a good idea to include it here (otherwise see the `version` snippet). |
| `homepage` | no | The homepage of the server. |
| `name` | yes | The name of the server in reports and in the compatibility matrix, where it heads a column, so keep it short. The `version` snippet takes care of the version. |
| `homepage` | no | The homepage of the server, which the name links to in the compatibility matrix. |
| `address` | no | The `host:port` of a server that's already running. When it's set proof connects to the server instead of starting it, and `[launch]` is ignored. The `-address` command-line option does the same. |
| `timeout` | no | How long proof waits for each request to finish (i.e. for its `done`). It's a duration like `"10s"` (which is also the default). |

Expand Down
2 changes: 1 addition & 1 deletion doc/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ recording every message on the way:

```shell
$ proof proxy -listen 127.0.0.1:7888 clojure
Starting Clojure (nrepl/nrepl 1.8.0)...
Starting nREPL...
Forwarding 127.0.0.1:7888 to localhost:53613. Connect your client to 127.0.0.1:7888 and press Ctrl-C when it's done.
```

Expand Down
6 changes: 5 additions & 1 deletion internal/report/matrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ func HTML(w io.Writer, reports []Report) error {
var b strings.Builder
b.WriteString("<thead>\n<tr><th>Check</th>")
for _, r := range reports {
fmt.Fprintf(&b, "<th>%s", esc(r.Server))
name := esc(r.Server)
if r.Homepage != "" {
name = fmt.Sprintf(`<a href="%s">%s</a>`, esc(r.Homepage), name)
}
fmt.Fprintf(&b, "<th>%s", name)
if r.ServerVersion != "" {
fmt.Fprintf(&b, `<span class="version">%s</span>`, esc(r.ServerVersion))
}
Expand Down
9 changes: 6 additions & 3 deletions internal/report/matrix.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,15 @@
position: sticky;
top: 0;
background: var(--head);
vertical-align: bottom;
min-width: 6rem;
vertical-align: top;
z-index: 1;
}
thead th:first-child { left: 0; z-index: 2; }
thead th + th { text-align: center; }
/* Every server gets a column of the same width, and a long name or
version wraps rather than widening its column. */
thead th + th { width: 7rem; min-width: 7rem; text-align: center; overflow-wrap: anywhere; }
thead a { text-decoration: none; }
thead a:hover { text-decoration: underline; }
.version { display: block; color: var(--muted); font-weight: normal; font-size: 0.85em; }
tbody th, tfoot th {
position: sticky;
Expand Down
1 change: 1 addition & 0 deletions internal/report/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type Run struct {
// ServerVersion is what the version snippet of the server's profile
// evaluated to, if it has one.
ServerVersion string `json:"server-version,omitempty"`
Homepage string `json:"homepage,omitempty"`
Address string `json:"address"`
Started time.Time `json:"started"`
Results []check.Result `json:"-"`
Expand Down
4 changes: 3 additions & 1 deletion internal/report/report_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func sampleReports(t *testing.T) []Report {
t.Helper()
beta := sampleRun("Beta | Two", check.Pass, check.Failed, check.Skipped)
beta.ServerVersion = "2.0"
beta.Homepage = "https://example.com/beta?a&b"
beta.Started = time.Date(2026, 11, 3, 5, 0, 0, 0, time.UTC)
beta.Results[1].Details = []string{"gave no value"}
dir := t.TempDir()
Expand Down Expand Up @@ -74,7 +75,8 @@ func TestMatrixAsAPage(t *testing.T) {
}
got := buf.String()
for _, want := range []string{
`<th>Beta | Two<span class="version">2.0</span></th>`,
`<th>Alpha</th>`,
`<th><a href="https://example.com/beta?a&amp;b">Beta | Two</a><span class="version">2.0</span></th>`,
`<tr class="group"><th colspan="3">eval</th></tr>`,
`<th scope="row" title="why eval.value"><code>eval.value</code><span class="title">title eval.value</span></th>`,
`<td class="pass">pass</td><td class="fail" title="gave no value">fail</td>`,
Expand Down
5 changes: 2 additions & 3 deletions internal/serve/matrix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,8 @@ func TestPresetsMatchTheScenarios(t *testing.T) {
t.Errorf("%s isn't the name of a profile: %v", p.Name, err)
continue
}
// e.g. "ClojureCLR (clr.tools.nrepl 0.1.2-alpha2)" says ClojureCLR,
// but the profile of nREPL itself is named after Clojure.
server, _, _ := strings.Cut(prof.Name, " (")
// nREPL's scenarios say which version does them.
server := prof.Name
if p.Name == "clojure" {
server = "nREPL 1.8.0"
}
Expand Down
8 changes: 7 additions & 1 deletion profiles/clojure-clr.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# With .NET from Homebrew, also export
# DOTNET_ROOT=/opt/homebrew/opt/dotnet/libexec or cljr can't find the runtime.
name = "ClojureCLR (clr.tools.nrepl 0.1.2-alpha2)"
name = "ClojureCLR"
homepage = "https://github.com/clojure/clr.tools.nrepl"

[launch]
Expand Down Expand Up @@ -64,3 +64,9 @@ value = "println"
# A function to look up.
[snippets.lookup]
code = "println"

# The version of ClojureCLR, for the report. clr.tools.nrepl doesn't know
# its own (describe says 0.1.0-alpha1), and it's the tag in the command
# anyway.
[snippets.version]
code = "(clojure-version)"
6 changes: 5 additions & 1 deletion profiles/clojure.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The reference implementation, nrepl/nrepl, on the Clojure CLI.
name = "Clojure (nrepl/nrepl 1.8.0)"
name = "nREPL"
homepage = "https://github.com/nrepl/nrepl"

[launch]
Expand Down Expand Up @@ -61,3 +61,7 @@ value = "println"
# A function to look up.
[snippets.lookup]
code = "println"

# The version of nREPL, for the report.
[snippets.version]
code = "(:version-string nrepl.core/version)"
2 changes: 1 addition & 1 deletion profiles/dialtone.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# dialtone, the Erlang nREPL server from nrepl/nrepl-beam. Expects the
# dialtone launcher (dialtone/bin/dialtone) on PATH.
name = "dialtone (Erlang)"
name = "dialtone"
homepage = "https://github.com/nrepl/nrepl-beam"

[launch]
Expand Down
4 changes: 4 additions & 0 deletions profiles/jank.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,7 @@ value = "println"
# A function to look up.
[snippets.lookup]
code = "println"

# The version of jank, for the report. clojure-version says jank-0.1-alpha.
[snippets.version]
code = '(clojure.string/replace (clojure-version) "jank-" "")'
2 changes: 1 addition & 1 deletion profiles/repartee.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# repartee, the Elixir nREPL server from nrepl/nrepl-beam. Expects the
# repartee launcher (repartee/bin/repartee) on PATH.
name = "repartee (Elixir)"
name = "repartee"
homepage = "https://github.com/nrepl/nrepl-beam"

[launch]
Expand Down
Loading