Merge pull request #497 from myitcv/put_fullop_behind_build_attribute

stdlib: put full definition of #Op behind a build attribute
This commit is contained in:
Andrea Luzzardi 2021-05-28 23:48:39 -07:00 committed by GitHub
commit 7ec90a6155
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 16 deletions

View File

@ -3,27 +3,16 @@ package op
// One operation in a pipeline // One operation in a pipeline
// //
// #Op does not enforce the op spec at full resolution, to avoid triggering performance issues. // #Op does not current enforce the op spec at full resolution, to avoid
// See https://github.com/dagger/dagger/issues/445 // triggering performance issues. See
// https://github.com/dagger/dagger/issues/445
//
// To enforce the full #Op spec (see op_fullop.cue), run with "-t fullop"
#Op: { #Op: {
do: string do: string
... ...
} }
// Full resolution schema enforciong the complete op spec
#OpFull: #Export |
#FetchContainer |
#PushContainer |
#FetchGit |
#Exec |
#Local |
#Copy |
#Load |
#Subdir |
#WriteFile |
#Mkdir |
#DockerBuild
// Export a value from fs state to cue // Export a value from fs state to cue
#Export: { #Export: {
do: "export" do: "export"

View File

@ -0,0 +1,17 @@
@if(fullop)
package op
// Full resolution schema enforciong the complete op spec
#Op: (#Export |
#FetchContainer |
#PushContainer |
#FetchGit |
#Exec |
#Local |
#Copy |
#Load |
#Subdir |
#WriteFile |
#Mkdir |
#DockerBuild) & {do: string}