DX: change "#dagger: compute: " to "#compute: "

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes 2021-02-12 23:22:41 +00:00
parent 3f445f2421
commit 7a77466a66
81 changed files with 176 additions and 229 deletions

View File

@ -8,13 +8,13 @@ import (
func TestLocalDirs(t *testing.T) {
env := mkEnv(t,
`#dagger: compute: [
`#compute: [
{
do: "local"
dir: "bar"
}
]`,
`dir: #dagger: compute: [
`dir: #compute: [
{
do: "local"
dir: "foo"

View File

@ -149,7 +149,7 @@ func (env *Env) LocalDirs() map[string]string {
flow := cueflow.New(&cueflow.Config{}, inst, newDummyTaskFunc(inst))
for _, t := range flow.Tasks() {
v := compiler.Wrap(t.Value(), inst)
localdirs(v.Get("#dagger.compute"))
localdirs(v.Get("#compute"))
}
// 2. Scan the environment updater
localdirs(env.Updater())

View File

@ -102,7 +102,7 @@ func (f dirFlag) Set(s string) error {
return nil, err
}
return compiler.Compile("", fmt.Sprintf(
`#dagger: compute: [{do:"local",dir:"%s", include:%s}]`,
`#compute: [{do:"local",dir:"%s", include:%s}]`,
s,
include,
))
@ -140,7 +140,7 @@ func (f gitFlag) Set(s string) error {
remote := u.String()
return compiler.Compile("", fmt.Sprintf(
`#dagger: compute: [{do:"fetch-git", remote:"%s", ref:"%s"}]`,
`#compute: [{do:"fetch-git", remote:"%s", ref:"%s"}]`,
remote,
ref,
))

View File

@ -41,7 +41,7 @@ func (p *Pipeline) FS() FS {
}
func isComponent(v *compiler.Value) bool {
return v.Get("#dagger.compute").Exists()
return v.Get("#compute").Exists()
}
func ops(code ...*compiler.Value) ([]*compiler.Value, error) {
@ -50,7 +50,7 @@ func ops(code ...*compiler.Value) ([]*compiler.Value, error) {
for _, x := range code {
// 1. attachment array
if isComponent(x) {
xops, err := x.Get("#dagger.compute").List()
xops, err := x.Get("#compute").List()
if err != nil {
return nil, err
}

View File

@ -20,20 +20,20 @@ test: go.#Test & {
}
// Run a command with the binary we just built
help: #dagger: compute: [
help: #compute: [
dagger.#Load & {from: build},
dagger.#Exec & {args: ["dagger", "-h"]},
]
// Build dagger using the (included) Dockerfile
buildWithDocker: #dagger: compute: [
buildWithDocker: #compute: [
dagger.#DockerBuild & {
context: repository
},
]
// Run a command in the docker image we just built
helpFromDocker: #dagger: compute: [
helpFromDocker: #compute: [
dagger.#Load & {from: buildWithDocker},
dagger.#Exec & {args: ["dagger", "-h"]},
]

View File

@ -6,7 +6,7 @@ import (
"dagger.io/yarn"
)
repository: #dagger: compute: [
repository: #compute: [
dagger.#FetchGit & {
remote: "https://github.com/kabirbaidhya/react-todo-app.git"
ref: "624041b17bd62292143f99bce474a0e3c2d2dd61"

View File

@ -7,7 +7,7 @@ import (
let alpine = {
digest: "sha256:3c7497bf0c7af93428242d6176e8f7905f2201d8fc5861f45be7a346b5f23436"
package: [string]: true | false | string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "index.docker.io/alpine@\(digest)"
@ -33,7 +33,7 @@ www: {
listing: {
string
#dagger: compute: [
#compute: [
dagger.#Load & {
from: alpine
},
@ -52,7 +52,7 @@ www: {
url: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: alpine

View File

@ -10,7 +10,7 @@ let defaultVersion = "3.13.2@sha256:a75afd8b57e7f34e4dad8d65e2c7ba2e1975c795ce1e
package: [string]: true | false | string
version: string | *defaultVersion
#dagger: compute: [
#compute: [
dagger.#FetchContainer & {
ref: "index.docker.io/alpine:\(version)"
},

View File

@ -2,7 +2,7 @@ package dagger
// Any component can be referenced as a directory, since
// every dagger script outputs a filesystem state (aka a directory)
#Dir: #dagger: compute: [...#Op]
#Dir: #compute: [...#Op]
// One operation in a script
#Op: #FetchContainer | #FetchGit | #Export | #Exec | #Local | #Copy | #Load | #Subdir

View File

@ -17,7 +17,7 @@ import (
// Environment variables
env: [string]: string
#dagger: compute: [
#compute: [
dagger.#FetchContainer & {
ref: "docker.io/golang:\(version)-alpine"
},
@ -62,7 +62,7 @@ import (
env: [string]: string
#dagger: compute: [
#compute: [
dagger.#Copy & {
from: #Go & {
"version": version

View File

@ -36,7 +36,7 @@ import (
url: {
string
#dagger: compute: [
#compute: [
dagger.#Load & {
from: alpine.#Image & {
package: bash: "=~5.1"

View File

@ -20,7 +20,7 @@ import (
// Set these environment variables during the build
env?: [string]: string
#dagger: compute: [
#compute: [
dagger.#Load & {
from: alpine.#Image & {
package: bash: "=~5.1"

View File

@ -1,3 +1,3 @@
package testing
#dagger: compute: true
#compute: true

View File

@ -1,3 +1,3 @@
package testing
#dagger: compute: 123
#compute: 123

View File

@ -1,16 +0,0 @@
package testing
bar: #dagger: {
#new_def: "lala"
compute: [{
do: "fetch-container"
ref: "busybox"
},
{
do: "exec"
args: ["true"]
dir: "/"
}]
}

View File

@ -1,16 +0,0 @@
package testing
bar: #dagger: {
new_prop: "lala"
compute: [{
do: "fetch-container"
ref: "busybox"
},
{
do: "exec"
args: ["true"]
dir: "/"
}]
}

View File

@ -1,3 +1,3 @@
package testing
#dagger: compute: "whatever"
#compute: "whatever"

View File

@ -1,3 +1,3 @@
package testing
#dagger: compute: whatever: "wrong"
#compute: whatever: "wrong"

View File

@ -1,11 +1,6 @@
package testing
// no-op, should not error
realempty: {
#dagger: {}
}
// no-op, should not error
empty: {
#dagger: compute: []
#compute: []
}

View File

@ -6,7 +6,7 @@ new_prop: "lala"
new_prop_too: string
#new_def_too: string
#dagger: compute: [{
#compute: [{
do: "fetch-container"
ref: "busybox"
},

View File

@ -7,7 +7,7 @@ foo: {
new_prop_too: string
#new_def_too: string
#dagger: compute: [{
#compute: [{
do: "fetch-container"
ref: "busybox"
},

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "busybox"

View File

@ -3,7 +3,7 @@ package testing
test1: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "busybox"
@ -25,7 +25,7 @@ test1: {
test2: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "busybox"

View File

@ -1,6 +1,6 @@
package testing
component: #dagger: compute: [{
component: #compute: [{
do: "fetch-container"
ref: "alpine"
}, {
@ -14,7 +14,7 @@ component: #dagger: compute: [{
test1: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "busybox"
@ -36,14 +36,14 @@ test1: {
test2: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "busybox"
},
{
do: "copy"
from: #dagger: compute: [{
from: #compute: [{
do: "fetch-container"
ref: "alpine"
}, {

View File

@ -3,7 +3,7 @@ package testing
test: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "busybox"

View File

@ -3,7 +3,7 @@ package testing
A: {
result: string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@ -28,7 +28,7 @@ A: {
B: {
result: string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
A: {
result: string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@ -28,7 +28,7 @@ A: {
B: {
result: string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -5,7 +5,7 @@ import "encoding/json"
A: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@ -32,7 +32,7 @@ unmarshalled: json.Unmarshal(A)
B: {
result: string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -5,7 +5,7 @@ import "dagger.io/dagger"
// Set to `--input-dir=./tests/dockerbuild/testdata`
TestData: dagger.#Dir
TestInlinedDockerfile: #dagger: compute: [
TestInlinedDockerfile: #compute: [
dagger.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
@ -14,7 +14,7 @@ TestInlinedDockerfile: #dagger: compute: [
},
]
TestOpChaining: #dagger: compute: [
TestOpChaining: #compute: [
dagger.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
@ -26,7 +26,7 @@ TestOpChaining: #dagger: compute: [
}
]
TestBuildContext: #dagger: compute: [
TestBuildContext: #compute: [
dagger.#DockerBuild & {
context: TestData
},
@ -35,7 +35,7 @@ TestBuildContext: #dagger: compute: [
}
]
TestBuildContextAndDockerfile: #dagger: compute: [
TestBuildContextAndDockerfile: #compute: [
dagger.#DockerBuild & {
context: TestData
dockerfile: """
@ -48,7 +48,7 @@ TestBuildContextAndDockerfile: #dagger: compute: [
}
]
TestDockerfilePath: #dagger: compute: [
TestDockerfilePath: #compute: [
dagger.#DockerBuild & {
context: TestData
dockerfilePath: "./dockerfilepath/Dockerfile.custom"
@ -58,7 +58,7 @@ TestDockerfilePath: #dagger: compute: [
}
]
TestBuildArgs: #dagger: compute: [
TestBuildArgs: #compute: [
dagger.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
@ -70,7 +70,7 @@ TestBuildArgs: #dagger: compute: [
]
// FIXME: this doesn't test anything beside not crashing
TestBuildLabels: #dagger: compute: [
TestBuildLabels: #compute: [
dagger.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
@ -80,7 +80,7 @@ TestBuildLabels: #dagger: compute: [
]
// FIXME: this doesn't test anything beside not crashing
TestBuildPlatform: #dagger: compute: [
TestBuildPlatform: #compute: [
dagger.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -2,7 +2,7 @@ package testing
bar: string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
hello: "world"
bar: string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
hello: "world"
bar: string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -2,18 +2,16 @@ package def
#dang: string
#dagger: {
compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
dir: "/"
args: ["sh", "-c", """
echo success
"""]
},
]
}
#compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
dir: "/"
args: ["sh", "-c", """
echo success
"""]
},
]

View File

@ -4,11 +4,9 @@ import (
"dagger.io/def"
)
#dagger: {
compute: [
{
do: "load",
from: def
},
]
}
#compute: [
{
do: "load",
from: def
},
]

View File

@ -2,19 +2,17 @@ package nonoptional
dang: string
#dagger: {
compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
dir: "/"
args: ["sh", "-c", """
echo "This test SHOULD fail, because this SHOULD be executed"
exit 1
"""]
},
]
}
#compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
dir: "/"
args: ["sh", "-c", """
echo "This test SHOULD fail, because this SHOULD be executed"
exit 1
"""]
},
]

View File

@ -4,11 +4,9 @@ import (
"dagger.io/nonoptional"
)
#dagger: {
compute: [
{
do: "load",
from: nonoptional
},
]
}
#compute: [
{
do: "load",
from: nonoptional
},
]

View File

@ -2,18 +2,16 @@ package optional
dang?: string
#dagger: {
compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
dir: "/"
args: ["sh", "-c", """
echo success
"""]
},
]
}
#compute: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
dir: "/"
args: ["sh", "-c", """
echo success
"""]
},
]

View File

@ -4,11 +4,9 @@ import (
"dagger.io/optional"
)
#dagger: {
compute: [
{
do: "load",
from: optional
},
]
}
#compute: [
{
do: "load",
from: optional
},
]

View File

@ -3,7 +3,7 @@ package testing
test: {
bool
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
test1: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@ -27,7 +27,7 @@ test1: {
test2: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@ -51,7 +51,7 @@ test2: {
test3: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@ -75,7 +75,7 @@ test3: {
test4: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@ -99,7 +99,7 @@ test4: {
test5: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@ -123,7 +123,7 @@ test5: {
test6: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@ -147,7 +147,7 @@ test6: {
test7: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@ -171,7 +171,7 @@ test7: {
test8: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@ -195,7 +195,7 @@ test8: {
test9: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@ -219,7 +219,7 @@ test9: {
test10: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
test: {
float
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
teststring: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
teststring: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -4,7 +4,7 @@ test: {
string
=~"^NAAAA.+"
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
testScalar: {
bool
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@ -25,7 +25,7 @@ testScalar: {
]
}
testMap: #dagger: compute: [
testMap: #compute: [
{
do: "fetch-container"
ref: "alpine"
@ -50,7 +50,7 @@ testMap: #dagger: compute: [
// testList: {
// [...string]
// #dagger: compute: [
// #compute: [
// {
// do: "fetch-container"
// ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
test: {
number
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
test: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -4,7 +4,7 @@ test: {
string
=~"^some.+"
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
testScalar: {
bool
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"
@ -30,7 +30,7 @@ testScalar: {
// testList: {
// [...string]
// #dagger: compute: [
// #compute: [
// {
// do: "fetch-container"
// ref: "alpine"
@ -54,7 +54,7 @@ testScalar: {
// ]
// }
testMap: #dagger: compute: [
testMap: #compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -1,34 +1,34 @@
package testing
busybox1: #dagger: compute: [
busybox1: #compute: [
{
do: "fetch-container"
ref: "busybox"
},
]
busybox2: #dagger: compute: [
busybox2: #compute: [
{
do: "fetch-container"
ref: "busybox:latest"
},
]
busybox3: #dagger: compute: [
busybox3: #compute: [
{
do: "fetch-container"
ref: "busybox:1.33-musl"
},
]
busybox4: #dagger: compute: [
busybox4: #compute: [
{
do: "fetch-container"
ref: "busybox@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7"
},
]
busybox5: #dagger: compute: [
busybox5: #compute: [
{
do: "fetch-container"
ref: "busybox:1.33-musl@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7"

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
},

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine@sha256:c6c7524e2111f22a9f7577211232d89a9e68cf5b9ed4a41ba77957c9771380a5"

View File

@ -2,7 +2,7 @@ package testing
// XXX WATCHOUT
// Once buildkit has pulled that digest, it will stay cached and happily succeed WHATEVER the image name then is
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "busyboxaaa@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7"

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "doesnotexist"

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine:doesnotexist"

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-git"
remote: "https://github.com/blocklayerhq/acme-clothing.git"

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-git"
},

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-git"
remote: "pork://pork"

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-git"
remote: "https://github.com/blocklayerhq/acme-clothing.git"

View File

@ -1,6 +1,6 @@
package testing
#dagger: compute: [
#compute: [
{
do: "fetch-git"
remote: "https://github.com/blocklayerhq/lalalala.git"

View File

@ -5,7 +5,7 @@ X1=in: string | *"default input"
test: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -5,7 +5,7 @@ X1=in: string
test: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
test1: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]
@ -19,7 +19,7 @@ test1: {
test2: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "busybox"}]

View File

@ -1,6 +1,6 @@
package testing
component: #dagger: compute: [{
component: #compute: [{
do: "fetch-container"
ref: "alpine"
}, {
@ -14,7 +14,7 @@ component: #dagger: compute: [{
test1: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: component
@ -30,10 +30,10 @@ test1: {
test2: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: #dagger: compute: [{
from: #compute: [{
do: "fetch-container"
ref: "alpine"
}, {

View File

@ -3,7 +3,7 @@ package testing
test: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]

View File

@ -3,7 +3,7 @@ package testing
test: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]

View File

@ -3,7 +3,7 @@ package testing
test: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]
@ -13,8 +13,8 @@ test: {
args: ["sh", "-c", """
cat /mnt/test/lol > /out
"""]
mount: "/mnt/test": {
from: #dagger: compute: [
mount: "/mnt/test": from: {
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
test: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]

View File

@ -3,7 +3,7 @@ package testing
test: {
string
#dagger: compute: [
#compute: [
{
do: "load"
from: [{do: "fetch-container", ref: "alpine"}]

View File

@ -1,6 +1,6 @@
package test
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "busybox"

View File

@ -3,7 +3,7 @@ package main
hello: {
string
#dagger: compute: [
#compute: [
{
do: "fetch-container"
ref: "alpine"

View File

@ -43,13 +43,9 @@ test::compute(){
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/compute/invalid/int
test::one "Compute: invalid struct should fail" --exit=1 --stdout= \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/compute/invalid/struct
disable test::one "Compute: overloading #ComponentScript with new prop should fail (FIXME: unauthorized fields are not checked)" --exit=1 \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/compute/invalid/overload/new_prop
test::one "Compute: overloading #ComponentScript with new def should succeed" --exit=0 \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/compute/invalid/overload/new_def
# Compute: success
test::one "Compute: noop should succeed" --exit=0 --stdout='{"empty":{},"realempty":{}}' \
test::one "Compute: noop should succeed" --exit=0 --stdout='{"empty":{}}' \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/compute/success/noop
test::one "Compute: simple should succeed" --exit=0 --stdout="{}" \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/compute/success/simple