You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 874445d
Browse filesBrowse the repository at this point in the historyBrowse files
assert(pythonSdk.detectScope(ws.withWorkdir(lookupNestedPath)) == lookupModulePath, "detectScope should find the module owning a nested path")
127
-
assert(pythonSdk.detectScope(ws.withWorkdir(lookupModulePath)) == lookupModulePath, "detectScope should answer with the module root itself")
128
-
assert(pythonSdk.detectScope(ws.withWorkdir(runtimeModulePath + "/sdk/src/dagger/client")) == runtimeModulePath, "detectScope should answer with the module owning a vendored sdk/, not the sdk/ itself")
129
-
assert(pythonSdk.detectScope(ws.withWorkdir("sdk/src/dagger/client")) == "sdk", "detectScope should not lift a standalone sdk/ project into a parent that is not a Python module")
assert(pythonSdk.findClientRoot(ws.withWorkdir(lookupNestedPath)) == lookupModulePath, "findClientRoot should find the module owning a nested path")
117
+
assert(pythonSdk.findClientRoot(ws.withWorkdir(lookupModulePath)) == lookupModulePath, "findClientRoot should answer with the module root itself")
118
+
assert(pythonSdk.findClientRoot(ws.withWorkdir(runtimeModulePath + "/sdk/src/dagger/client")) == runtimeModulePath, "findClientRoot should answer with the module owning a vendored sdk/, not the sdk/ itself")
119
+
assert(pythonSdk.findClientRoot(ws.withWorkdir("sdk/src/dagger/client")) == "sdk", "findClientRoot should not lift a standalone sdk/ project into a parent that is not a Python module")
assert(pythonSdk.detectScope(nestedSdkWs.withWorkdir(runtimeModulePath + "/sdk/src/dagger/client")) == runtimeModulePath + "/sdk", "detectScope should answer with a nested module named sdk, not lift it into its parent")
133
-
assert(pythonSdk.detectScope(ws) == "", "detectScope should find no scope at the workspace root")
122
+
assert(pythonSdk.findClientRoot(nestedSdkWs.withWorkdir(runtimeModulePath + "/sdk/src/dagger/client")) == runtimeModulePath + "/sdk", "findClientRoot should answer with a nested module named sdk, not lift it into its parent")
123
+
assert(pythonSdk.findClientRoot(ws) == null, "findClientRoot should return null when it finds no client root")
134
124
135
125
null
136
126
}
137
127
138
128
"""
139
129
generateScope initializes a module that has no config: the template, a
140
-
dagger-module.toml from the engine's builder and no dagger.json, and the
130
+
dagger-module.toml from the manifest builder and no dagger.json, and the
141
131
generated client library, all under the scope, with the workspace cwd and
142
132
existing files untouched. SDK settings select the template and its
143
133
pyproject.toml values.
@@ -195,27 +185,28 @@ type E2e {
195
185
}
196
186
197
187
"""
198
-
generateScope regenerates a module that already has a config, whether a
199
-
dagger-module.toml or a pre-1.0 dagger.json: only the generated client
200
-
library is added, and nothing else changes.
188
+
generateScope preserves a current manifest. It migrates a pre-1.0
189
+
dagger.json to dagger-module.toml. Both cases generate the client library.
0 commit comments