Skip to content

Commit da01e1f

Browse files
fix: publish the active runner environment through a guarded accessor (#27) (#28)
* fix: publish the active runner environment through the guarded accessor (#27) Code, Tooling and the REPL read pythonservice.Service.ActiveEnv on their own gRPC goroutines while this agent published it from Init and cleared it from Stop. runnerMu ordered the writers against each other but bought nothing on the read side, and the field lives in another module, so the fix had to land there first: service-python v0.0.60 unexports it behind ActiveEnv/SetActiveEnv under an RWMutex. Both call sites now go through the setter, which is what gives a reader arriving after teardown the clean nil fallback instead of an environment whose docker client is already closed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: release with the cgo the binary needs, and name the accessors so stale reads fail (#27) Review findings on the first cut of this branch. The dependency bump pulls Core's tree-sitter grammars, which are cgo, but .goreleaser.yaml built with CGO_ENABLED=0 — so every tagged release would have failed at compile with "build constraints exclude all Go files", and nothing would have said so: ci.yml builds with the runner default and the release workflow only runs on a tag. Both builds now enable cgo with the per-target compilers, and the release runs through goreleaser-cross, which is where those compilers come from. The shared core release workflow runs goreleaser on a bare runner and cannot supply them. service-python v0.0.61 renames the accessors to ActiveEnvironment / SetActiveEnvironment. The v0.0.60 getter reused the removed field's name, so a method value satisfied every stale read: `== nil` compiled as dead code and require.Nil passed vacuously — which is exactly how the assertion in init_test.go went quiet. No pre-v0.0.60 spelling compiles now. TestReleaseCanCompileTheCgoTheBinaryNeeds is the guard the release path never had. activeEnvRuntime is gone in favour of initTestRuntime, which already stood up the same runtime, and the churn test is named for what it pins rather than what it suggests. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 5df1548 commit da01e1f

8 files changed

Lines changed: 286 additions & 18 deletions

File tree

‎.github/workflows/releaser.yml‎

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,43 @@ on:
66
- 'v*'
77

88
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-go@v5
14+
with:
15+
go-version-file: go.mod
16+
# go.mod pins a `toolchain` newer than the `go` line, so setup-go
17+
# installs the older Go and GOTOOLCHAIN downloads the toolchain
18+
# module into the cache. setup-go's cache tar then collides on those
19+
# read-only toolchain files, failing every release.
20+
cache: false
21+
- name: Setup
22+
run: |
23+
curl -LsSf https://astral.sh/uv/install.sh | sh
24+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
25+
- name: Test
26+
run: go test -v ./...
27+
928
release:
10-
uses: codefly-dev/core/.github/workflows/go-service-release.yml@main
11-
secrets: inherit
29+
needs: test
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0
35+
# ARCHITECTURE: the shared core release workflow runs goreleaser-action
36+
# on a bare runner, which has no macOS or cross-linux compilers. The
37+
# binary links Core's tree-sitter grammars (CGO), so releasing it needs
38+
# the toolchain this maintained image supplies — see .goreleaser.yaml.
39+
- name: Run CGO-capable GoReleaser
40+
run: >-
41+
docker run --rm
42+
-e GITHUB_TOKEN
43+
-v "$GITHUB_WORKSPACE:/workspace"
44+
-w /workspace
45+
ghcr.io/goreleaser/goreleaser-cross:v1.26.4
46+
release --clean
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GH_PAT }}

‎.goreleaser.yaml‎

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,35 @@
11
version: 1
22

33
builds:
4-
- id: darwin
4+
# ARCHITECTURE: Core's authoritative source inspection uses real
5+
# tree-sitter grammars, which are CGO. Agent releases therefore require
6+
# CGO and the platform compilers supplied by goreleaser/goreleaser-cross;
7+
# disabling CGO does not degrade the parser, it fails the build outright
8+
# (`build constraints exclude all Go files`). The compilers differ per
9+
# target, so each target is its own build id.
10+
- id: darwin-amd64
511
env:
6-
- CGO_ENABLED=0
12+
- CGO_ENABLED=1
13+
- CC=o64-clang
14+
- CXX=o64-clang++
715
goos:
816
- darwin
917
goarch:
1018
- amd64
19+
- id: darwin-arm64
20+
env:
21+
- CGO_ENABLED=1
22+
- CC=oa64-clang
23+
- CXX=oa64-clang++
24+
goos:
25+
- darwin
26+
goarch:
1127
- arm64
12-
- id: linux
28+
- id: linux-amd64
1329
env:
14-
- CGO_ENABLED=0
30+
- CGO_ENABLED=1
31+
- CC=x86_64-linux-gnu-gcc
32+
- CXX=x86_64-linux-gnu-g++
1533
goos:
1634
- linux
1735
goarch:

‎active_env_test.go‎

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
package main
2+
3+
import (
4+
"context"
5+
"os/exec"
6+
"sync"
7+
"testing"
8+
9+
runtimev0 "github.com/codefly-dev/core/generated/go/codefly/services/runtime/v0"
10+
pythoncode "github.com/codefly-dev/service-python/pkg/code"
11+
"github.com/stretchr/testify/require"
12+
)
13+
14+
// TestActiveEnvironmentFollowsTheRunnerLifecycle pins the contract this agent
15+
// owes the generic layer: what it builds is what Code, Tooling and the REPL
16+
// resolve, and a teardown hands them nil rather than an environment whose
17+
// docker client is already closed.
18+
func TestActiveEnvironmentFollowsTheRunnerLifecycle(t *testing.T) {
19+
isolateWorkingDir(t)
20+
ctx := context.Background()
21+
runtime, _ := initTestRuntime(t)
22+
23+
require.Nil(t, runtime.FastAPI.Service.ActiveEnvironment(),
24+
"nothing may be published before a runner environment exists")
25+
26+
env, _, err := runtime.CreateRunnerEnvironment(ctx)
27+
require.NoError(t, err)
28+
require.Same(t, env, runtime.FastAPI.Service.ActiveEnvironment(),
29+
"Code must resolve the environment this agent actually runs in")
30+
31+
_, err = runtime.Stop(ctx, &runtimev0.StopRequest{})
32+
require.NoError(t, err)
33+
require.Nil(t, runtime.FastAPI.Service.ActiveEnvironment(),
34+
"a shut-down environment must not stay reachable from Code")
35+
}
36+
37+
// TestCodeKeepsAnsweringWhileTheRunnerLifecycleChurns runs the generic Code
38+
// handler — the same instance main.go wires up — against a runtime publishing
39+
// and clearing its environment underneath it. Code and the lifecycle RPCs are
40+
// concurrent gRPC handlers, and the field they meet on lives in another
41+
// module, so this is the only side that can drive both at once.
42+
//
43+
// Named for what it actually pins: no data race and no failed request,
44+
// whichever side wins. It deliberately does not assert that a read observed
45+
// the published environment — that is timing-dependent and would flake on a
46+
// loaded runner. TestActiveEnvironmentFollowsTheRunnerLifecycle pins the
47+
// publish deterministically instead.
48+
func TestCodeKeepsAnsweringWhileTheRunnerLifecycleChurns(t *testing.T) {
49+
if _, err := exec.LookPath("python3"); err != nil {
50+
t.Skip("python3 not on PATH")
51+
}
52+
isolateWorkingDir(t)
53+
ctx := context.Background()
54+
runtime, _ := initTestRuntime(t)
55+
source := runtime.Service.SourceLocation
56+
code := pythoncode.New(runtime.FastAPI.Service)
57+
58+
done := make(chan struct{})
59+
var lifecycle sync.WaitGroup
60+
var lifecycleErr error
61+
lifecycle.Add(1)
62+
go func() {
63+
defer lifecycle.Done()
64+
for {
65+
select {
66+
case <-done:
67+
return
68+
default:
69+
}
70+
_, _, err := runtime.CreateRunnerEnvironment(ctx)
71+
if err == nil {
72+
_, err = runtime.Stop(ctx, &runtimev0.StopRequest{})
73+
}
74+
if err != nil {
75+
lifecycleErr = err
76+
return
77+
}
78+
}
79+
}()
80+
81+
for i := 0; i < 10; i++ {
82+
graph := code.ComputePythonCallGraph(ctx, source)
83+
require.Empty(t, graph.Error, "call graph %d must answer whatever the lifecycle is doing", i)
84+
}
85+
close(done)
86+
lifecycle.Wait()
87+
require.NoError(t, lifecycleErr, "the runner lifecycle must keep working under a concurrent reader")
88+
}

‎conformance_test.go‎

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ package main
33
import (
44
"io/fs"
55
"os"
6+
"os/exec"
67
"path/filepath"
78
"regexp"
89
"strconv"
910
"strings"
1011
"testing"
12+
13+
"gopkg.in/yaml.v3"
1114
)
1215

1316
// transportOwnershipPatterns are the delivery/reconciliation ownership
@@ -216,3 +219,78 @@ func TestRuntimeGoFilesRecursesAndFilters(t *testing.T) {
216219
}
217220
}
218221
}
222+
223+
// releaseConfig is the subset of .goreleaser.yaml this repo asserts on: the
224+
// per-target build environments.
225+
type releaseConfig struct {
226+
Builds []struct {
227+
ID string `yaml:"id"`
228+
Env []string `yaml:"env"`
229+
} `yaml:"builds"`
230+
}
231+
232+
// binaryNeedsCgo reports whether the agent binary can still be built with CGO
233+
// disabled. Core's source inspection links real tree-sitter grammars, whose
234+
// bindings carry `//go:build cgo`; with CGO off they contribute no files and
235+
// the build fails at load time rather than degrading. Loading is enough to
236+
// find that out, so this costs a fraction of a second.
237+
func binaryNeedsCgo(t *testing.T) bool {
238+
t.Helper()
239+
cmd := exec.Command("go", "build", "-o", os.DevNull, ".")
240+
cmd.Env = append(os.Environ(), "CGO_ENABLED=0")
241+
out, err := cmd.CombinedOutput()
242+
if err != nil && !strings.Contains(string(out), "build constraints exclude all Go files") {
243+
t.Fatalf("cgo-free build failed for an unexpected reason: %v\n%s", err, out)
244+
}
245+
return err != nil
246+
}
247+
248+
// TestReleaseCanCompileTheCgoTheBinaryNeeds is the guard the release path had
249+
// no way to fail on: `ci.yml` builds with the runner's default (CGO on) and
250+
// the release workflow only runs on a tag, so a dependency bump that pulls in
251+
// tree-sitter turns every release red and nothing says so until a tag is cut.
252+
//
253+
// Two halves, and both are load-bearing. `CGO_ENABLED=0` in the build config
254+
// fails the compile outright. `CGO_ENABLED=1` on a bare runner fails too, just
255+
// later and differently — an ubuntu runner has no macOS compiler — which is
256+
// why the release has to go through the cross toolchain image.
257+
func TestReleaseCanCompileTheCgoTheBinaryNeeds(t *testing.T) {
258+
if !binaryNeedsCgo(t) {
259+
t.Skip("the binary builds without cgo, so the release toolchain is unconstrained")
260+
}
261+
262+
raw, err := os.ReadFile(".goreleaser.yaml")
263+
if err != nil {
264+
t.Fatalf("read .goreleaser.yaml: %v", err)
265+
}
266+
var config releaseConfig
267+
if err := yaml.Unmarshal(raw, &config); err != nil {
268+
t.Fatalf("parse .goreleaser.yaml: %v", err)
269+
}
270+
if len(config.Builds) == 0 {
271+
t.Fatal(".goreleaser.yaml declares no builds")
272+
}
273+
for _, build := range config.Builds {
274+
var enabled bool
275+
for _, env := range build.Env {
276+
if env == "CGO_ENABLED=1" {
277+
enabled = true
278+
}
279+
if env == "CGO_ENABLED=0" {
280+
t.Errorf("build %q disables cgo; the binary links tree-sitter and will not compile", build.ID)
281+
}
282+
}
283+
if !enabled {
284+
t.Errorf("build %q does not set CGO_ENABLED=1; goreleaser-cross defaults are not guaranteed", build.ID)
285+
}
286+
}
287+
288+
workflow, err := os.ReadFile(filepath.Join(".github", "workflows", "releaser.yml"))
289+
if err != nil {
290+
t.Fatalf("read releaser.yml: %v", err)
291+
}
292+
if !strings.Contains(string(workflow), "goreleaser-cross") {
293+
t.Error("the release workflow does not run goreleaser through the cross toolchain image, " +
294+
"so CGO_ENABLED=1 has no macOS or cross-linux compiler to use")
295+
}
296+
}

‎go.mod‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ module github.com/codefly-dev/service-python-fastapi
33
go 1.27.0
44

55
require (
6-
github.com/codefly-dev/core v0.3.8
7-
github.com/codefly-dev/service-python v0.0.52
6+
github.com/codefly-dev/core v0.3.11
7+
github.com/codefly-dev/service-python v0.0.61
88
github.com/stretchr/testify v1.11.1
99
google.golang.org/grpc v1.83.0
1010
gopkg.in/yaml.v3 v3.0.1
@@ -33,6 +33,7 @@ require (
3333
github.com/containerd/errdefs/pkg v0.3.0 // indirect
3434
github.com/cyphar/filepath-securejoin v0.7.0 // indirect
3535
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
36+
github.com/dekobon/tree-sitter-groovy v0.2.2 // indirect
3637
github.com/distribution/reference v0.6.0 // indirect
3738
github.com/docker/docker v28.5.2+incompatible // indirect
3839
github.com/docker/go-connections v0.8.1 // indirect
@@ -83,6 +84,7 @@ require (
8384
github.com/lufia/plan9stats v0.0.0-20260802145828-341c2f0c90b5 // indirect
8485
github.com/mattn/go-colorable v0.1.15 // indirect
8586
github.com/mattn/go-isatty v0.0.24 // indirect
87+
github.com/mattn/go-pointer v0.0.1 // indirect
8688
github.com/mattn/go-runewidth v0.0.28 // indirect
8789
github.com/mitchellh/mapstructure v1.5.0 // indirect
8890
github.com/moby/docker-image-spec v1.3.1 // indirect
@@ -103,6 +105,15 @@ require (
103105
github.com/skeema/knownhosts v1.3.2 // indirect
104106
github.com/tklauser/go-sysconf v0.4.0 // indirect
105107
github.com/tklauser/numcpus v0.12.0 // indirect
108+
github.com/tree-sitter-grammars/tree-sitter-kotlin v1.1.0 // indirect
109+
github.com/tree-sitter/go-tree-sitter v0.25.0 // indirect
110+
github.com/tree-sitter/tree-sitter-c-sharp v0.23.5 // indirect
111+
github.com/tree-sitter/tree-sitter-go v0.25.0 // indirect
112+
github.com/tree-sitter/tree-sitter-java v0.23.5 // indirect
113+
github.com/tree-sitter/tree-sitter-javascript v0.25.0 // indirect
114+
github.com/tree-sitter/tree-sitter-python v0.25.0 // indirect
115+
github.com/tree-sitter/tree-sitter-rust v0.24.2 // indirect
116+
github.com/tree-sitter/tree-sitter-typescript v0.23.2 // indirect
106117
github.com/xanzy/ssh-agent v0.3.3 // indirect
107118
github.com/xlab/treeprint v1.2.0 // indirect
108119
github.com/yoheimuta/go-protoparser/v4 v4.14.2 // indirect

‎go.sum‎

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJ
4141
github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=
4242
github.com/cloudflare/circl v1.6.5 h1:O64F26HEqNhznd/hrC5KZXVKYuKM2rx4deZDTc4ihQA=
4343
github.com/cloudflare/circl v1.6.5/go.mod h1:h5LNyxAc5nTue9DS5jT+48en2PSDYt3zdGnz5OstK6c=
44-
github.com/codefly-dev/core v0.3.8 h1:iqXrad1zwpX1CzAKr53TeuYLWHV8B5QkhHVV6unb9Os=
45-
github.com/codefly-dev/core v0.3.8/go.mod h1:4V8BP4F5mnRDZvylhC9P5N7rfifpAma5n3dW4YD+gtQ=
44+
github.com/codefly-dev/core v0.3.11 h1:FPYNQ3MysUeuZmXISBl7G2PEkzijE0wBWen2sF8pqMc=
45+
github.com/codefly-dev/core v0.3.11/go.mod h1:4V8BP4F5mnRDZvylhC9P5N7rfifpAma5n3dW4YD+gtQ=
4646
github.com/codefly-dev/gortk v0.2.0 h1:7bOlS5valYz2zil+fZctQNcPCYBcPj86abcw9N8h1hQ=
4747
github.com/codefly-dev/gortk v0.2.0/go.mod h1:dDWUMFgAP063OCGhTEpV7FFUj9+zTcxxO/nV80VKEwg=
48-
github.com/codefly-dev/service-python v0.0.52 h1:DY5IBBAmlna4Ll5XL8md5QvOqeB6BGA7mfPQsqfC1mw=
49-
github.com/codefly-dev/service-python v0.0.52/go.mod h1:qqcC3IWcnAYxK8Lst1ZrrrvsWL1+9/UhhB+mSvvWye0=
48+
github.com/codefly-dev/service-python v0.0.61 h1:kiS7nC4vqXNJ4tajpwj42uIjUxIMUDcLuJSOlt0vFuw=
49+
github.com/codefly-dev/service-python v0.0.61/go.mod h1:GHxhihx2UsWWOoXcFBKBfD7kz5XjyI6x0sQV5VRjQ5s=
5050
github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI=
5151
github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M=
5252
github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE=
@@ -59,6 +59,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
5959
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
6060
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
6161
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
62+
github.com/dekobon/tree-sitter-groovy v0.2.2 h1:ppghxHjtcQQakgjVStZN6lTFjjh5kluT1Y1dUQKfn4w=
63+
github.com/dekobon/tree-sitter-groovy v0.2.2/go.mod h1:zmwPJRzx9mn9Ca9qEa20FKgg9NukaZF0hUL4gF6zCbg=
6264
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
6365
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
6466
github.com/dlclark/regexp2 v1.12.0 h1:0j4c5qQmnC6XOWNjP3PIXURXN2gWx76rd3KvgdPkCz8=
@@ -190,6 +192,8 @@ github.com/mattn/go-colorable v0.1.15 h1:+u9SLTRGnXv73cEsnsmoZBom+dMU88B2M0aDcWy
190192
github.com/mattn/go-colorable v0.1.15/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
191193
github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI=
192194
github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A=
195+
github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0=
196+
github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc=
193197
github.com/mattn/go-runewidth v0.0.28 h1:rPyg2ybwEKPebvpzVWe1gKBkH8EQFkxO4Y0hjBeLaBU=
194198
github.com/mattn/go-runewidth v0.0.28/go.mod h1:3qAiGCV4Koz/yuveO58qUefmUTRm8r0IGEXZ9jeHp/8=
195199
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
@@ -259,6 +263,38 @@ github.com/tklauser/go-sysconf v0.4.0 h1:7H0uAN+7RkwWRaxhYXDLqa5V3LPrJeV8wmD9dRU
259263
github.com/tklauser/go-sysconf v0.4.0/go.mod h1:8mTNWyog7H+MpKijp4VmKJAd2bbYQ2zuUwkYRbUArPI=
260264
github.com/tklauser/numcpus v0.12.0 h1:NR85qdvHA9pFse3x3weVZ0r0ST8R6l5RHbZrlRaqob4=
261265
github.com/tklauser/numcpus v0.12.0/go.mod h1:ABHeXzJnr/qqwguhClkZKT1/8VABcYrsyUiUGobwWJg=
266+
github.com/tree-sitter-grammars/tree-sitter-kotlin v1.1.0 h1:SWIUDASa+WPhDDem1U5IJpYwQEezkqXrUI61OcnORzM=
267+
github.com/tree-sitter-grammars/tree-sitter-kotlin v1.1.0/go.mod h1:eH+flFf3QOa9c9BY9g3Bz02F7zTq30kGIG3cgB0lSlI=
268+
github.com/tree-sitter/go-tree-sitter v0.25.0 h1:sx6kcg8raRFCvc9BnXglke6axya12krCJF5xJ2sftRU=
269+
github.com/tree-sitter/go-tree-sitter v0.25.0/go.mod h1:r77ig7BikoZhHrrsjAnv8RqGti5rtSyvDHPzgTPsUuU=
270+
github.com/tree-sitter/tree-sitter-c v0.23.4 h1:nBPH3FV07DzAD7p0GfNvXM+Y7pNIoPenQWBpvM++t4c=
271+
github.com/tree-sitter/tree-sitter-c v0.23.4/go.mod h1:MkI5dOiIpeN94LNjeCp8ljXN/953JCwAby4bClMr6bw=
272+
github.com/tree-sitter/tree-sitter-c-sharp v0.23.5 h1:EeUc2WJE5G1pD6YEqera2yVHYeroeR+/MakKX2a+0xQ=
273+
github.com/tree-sitter/tree-sitter-c-sharp v0.23.5/go.mod h1:H7/aFm5vR1A8Yn5VIOfLWPdlKuJsMgZ5eDmaJdv8bY0=
274+
github.com/tree-sitter/tree-sitter-cpp v0.23.4 h1:LaWZsiqQKvR65yHgKmnaqA+uz6tlDJTJFCyFIeZU/8w=
275+
github.com/tree-sitter/tree-sitter-cpp v0.23.4/go.mod h1:doqNW64BriC7WBCQ1klf0KmJpdEvfxyXtoEybnBo6v8=
276+
github.com/tree-sitter/tree-sitter-embedded-template v0.23.2 h1:nFkkH6Sbe56EXLmZBqHHcamTpmz3TId97I16EnGy4rg=
277+
github.com/tree-sitter/tree-sitter-embedded-template v0.23.2/go.mod h1:HNPOhN0qF3hWluYLdxWs5WbzP/iE4aaRVPMsdxuzIaQ=
278+
github.com/tree-sitter/tree-sitter-go v0.25.0 h1:cEB0Q3LHgZtS+ECHx9wcP7AwzoOddJFQCVmytX42cVU=
279+
github.com/tree-sitter/tree-sitter-go v0.25.0/go.mod h1:Jrx8QqYN0v7npv1fJRH1AznddllYiCMUChtVjxPK040=
280+
github.com/tree-sitter/tree-sitter-html v0.23.2 h1:1UYDV+Yd05GGRhVnTcbP58GkKLSHHZwVaN+lBZV11Lc=
281+
github.com/tree-sitter/tree-sitter-html v0.23.2/go.mod h1:gpUv/dG3Xl/eebqgeYeFMt+JLOY9cgFinb/Nw08a9og=
282+
github.com/tree-sitter/tree-sitter-java v0.23.5 h1:J9YeMGMwXYlKSP3K4Us8CitC6hjtMjqpeOf2GGo6tig=
283+
github.com/tree-sitter/tree-sitter-java v0.23.5/go.mod h1:NRKlI8+EznxA7t1Yt3xtraPk1Wzqh3GAIC46wxvc320=
284+
github.com/tree-sitter/tree-sitter-javascript v0.25.0 h1:ZkWETb66/w8cc13yhfnNuHOLDQWl3BnKlH6f9AdR88c=
285+
github.com/tree-sitter/tree-sitter-javascript v0.25.0/go.mod h1:lmGD1EJdCA+v0S1u2fFgepMg/opzSg/4pgFym2FPGAs=
286+
github.com/tree-sitter/tree-sitter-json v0.24.8 h1:tV5rMkihgtiOe14a9LHfDY5kzTl5GNUYe6carZBn0fQ=
287+
github.com/tree-sitter/tree-sitter-json v0.24.8/go.mod h1:F351KK0KGvCaYbZ5zxwx/gWWvZhIDl0eMtn+1r+gQbo=
288+
github.com/tree-sitter/tree-sitter-php v0.23.11 h1:iHewsLNDmznh8kgGyfWfujsZxIz1YGbSd2ZTEM0ZiP8=
289+
github.com/tree-sitter/tree-sitter-php v0.23.11/go.mod h1:T/kbfi+UcCywQfUNAJnGTN/fMSUjnwPXA8k4yoIks74=
290+
github.com/tree-sitter/tree-sitter-python v0.25.0 h1:O6XD9v8U1LOcRc3cNj9nM7XufrtEBezE6VrpRrHZDf0=
291+
github.com/tree-sitter/tree-sitter-python v0.25.0/go.mod h1:cpdthSy/Yoa28aJFBscFHlGiU+cnSiSh1kuDVtI8YeM=
292+
github.com/tree-sitter/tree-sitter-ruby v0.23.1 h1:T/NKHUA+iVbHM440hFx+lzVOzS4dV6z8Qw8ai+72bYo=
293+
github.com/tree-sitter/tree-sitter-ruby v0.23.1/go.mod h1:kUS4kCCQloFcdX6sdpr8p6r2rogbM6ZjTox5ZOQy8cA=
294+
github.com/tree-sitter/tree-sitter-rust v0.24.2 h1:NL4nF67ib21RMzzfvkmXlVwe45vvhW10DVyO+D0z/W0=
295+
github.com/tree-sitter/tree-sitter-rust v0.24.2/go.mod h1:hfeGWic9BAfgTrc7Xf6FaOAguCFJRo3RBbs7QJ6D7MI=
296+
github.com/tree-sitter/tree-sitter-typescript v0.23.2 h1:/Odvphn18PniVixb9e97X0DbNVsU6Qocv9mfkyzdXwU=
297+
github.com/tree-sitter/tree-sitter-typescript v0.23.2/go.mod h1:zjzMXT/Ulffel2xfOcAkQQkiAkmgnbtPGlFQw/5X4xA=
262298
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
263299
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
264300
github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ=

‎init_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ func TestInitAfterStopBuildsAFreshEnvironment(t *testing.T) {
257257
resp, err := runtime.Stop(ctx, &runtimev0.StopRequest{})
258258
require.NoError(t, err)
259259
require.Equal(t, runtimev0.StopStatus_SUCCESS, resp.GetStatus().GetState(), resp.GetStatus().GetMessage())
260-
require.Nil(t, runtime.FastAPI.Service.ActiveEnv, "Code and the REPL must not be left holding a dead environment")
260+
require.Nil(t, runtime.FastAPI.Service.ActiveEnvironment(), "Code and the REPL must not be left holding a dead environment")
261261

262262
second, _, err := runtime.runnerEnv(ctx)
263263
require.NoError(t, err)

0 commit comments

Comments
 (0)