Repository navigation
Conversation
|
I am investigating the best way to validate & merge spec. I will document my progress here along the way. My first attempt was to merge each individual op with For my next attempt, I will try to merge & validate once at the top-level of the env. This depends primarily on whether we can express everything we need in cue. |
1b20779 to
a2ea340
Compare
|
Fixed linter errors, rebased against latest merged PRs. |
|
NOTE: some integration tests fails because this branch currently does not check config against spec at runtime. However, if you pass a correct config, it computes correctly (for example It would be interesting to see some benchmarks on this branch, it would give us an idea of the role of spec validation in the perf issue. |
2af0620 to
36adf67
Compare
122c812 to
842d3ba
Compare
|
Ready for review. |
c1d9412 to
7e8d8ed
Compare
- Remove intermediary types `Component`, `Script`, `Op`, `mount`: just use `cc.Value` directly - Remove `Executable` interface. - Execute llb code with a simple concrete type `Pipeline` - Analyze llb code with a simple utility `Analyze` Signed-off-by: Solomon Hykes <[email protected]>
Also remove broken examples uncovered by Makefile change. Signed-off-by: Solomon Hykes <[email protected]>
Handle panics as 500 errors
Replace the parallel [sdks.*] top-level section with an as-sdk sub-table on each module entry. An SDK install is now a regular [modules.<name>] entry whose role-specific data — the modules and clients it authors/manages locally — nests under [modules.<name>.as-sdk]. Why the pivot: - Settings unify. There's one place SDK settings live now — [modules.<sdk>.settings] — identical to every other module's settings location. `dagger settings` works for SDKs through the existing moduleList query without any engine-schema branching. The bifurcation that would have forced a parallel sdkList field, parallel settings discovery, and parallel runtime wiring is gone. - Install/develop distinction preserved. [modules.X] still means "installed here". The [[modules.X.as-sdk.modules]] entries are the develop side: an authored module gets an entry there AND (when default-path installed) its own [modules.<authored-name>] entry. - Mental model right. An SDK is a module whose role in this workspace is to author other things. The as-sdk sub-table makes the role visible without introducing a parallel taxonomy. Schema changes (core/workspace/config.go): - Config.SDKs map removed. - ModuleEntry gains AsSDK *ModuleAsSDK and Pin string. - ModuleAsSDK carries Modules + Clients slices (the existing SDKManagedModule / SDKManagedClient types are reused). - SerializeConfig writes the nested [[modules.<name>.as-sdk.modules]] / [[modules.<name>.as-sdk.clients]] arrays inline with each module. Format-preserving editor (core/workspace/config_document.go): - rewriteSDKSections is now rewriteModuleAsSDKSections, scoped to the nested as-sdk sub-blocks of each module. The "format inside the block is given up, everything outside is preserved" trade is unchanged. isModuleAsSDKHeading is the section-key matcher. Migration (core/workspace/migrate.go): - PlanMigration writes the legacy `sdk` field as Modules[<short>].AsSDK.Modules — same authoring path as before, new location. Engine moduleInit (core/schema/workspace_module_init.go): - Conflict detection scans [[modules.*.as-sdk.modules]] instead of [[sdks.*.modules]]. - The SDK install creates / mutates a regular ModuleEntry, with the authoring entry attached under AsSDK. CLI module sdk wrapper (cmd/dagger/module_sdk.go): - Lookup scans cfg.Modules[*].AsSDK.Modules for the cwd's path. Tests updated for the new shape (round-trip, migration, and the config_test invalid-key listing now includes "as-sdk" and "pin"). Net code delta is small (one parallel section collapses into a nested sub-table) but the schema simplification removes the engine work that "move SDK settings" would have required — task #109 disappears entirely.
Replace the parallel [sdks.*] top-level section with an as-sdk sub-table on each module entry. An SDK install is now a regular [modules.<name>] entry whose role-specific data — the modules and clients it authors/manages locally — nests under [modules.<name>.as-sdk]. Why the pivot: - Settings unify. There's one place SDK settings live now — [modules.<sdk>.settings] — identical to every other module's settings location. `dagger settings` works for SDKs through the existing moduleList query without any engine-schema branching. The bifurcation that would have forced a parallel sdkList field, parallel settings discovery, and parallel runtime wiring is gone. - Install/develop distinction preserved. [modules.X] still means "installed here". The [[modules.X.as-sdk.modules]] entries are the develop side: an authored module gets an entry there AND (when default-path installed) its own [modules.<authored-name>] entry. - Mental model right. An SDK is a module whose role in this workspace is to author other things. The as-sdk sub-table makes the role visible without introducing a parallel taxonomy. Schema changes (core/workspace/config.go): - Config.SDKs map removed. - ModuleEntry gains AsSDK *ModuleAsSDK and Pin string. - ModuleAsSDK carries Modules + Clients slices (the existing SDKManagedModule / SDKManagedClient types are reused). - SerializeConfig writes the nested [[modules.<name>.as-sdk.modules]] / [[modules.<name>.as-sdk.clients]] arrays inline with each module. Format-preserving editor (core/workspace/config_document.go): - rewriteSDKSections is now rewriteModuleAsSDKSections, scoped to the nested as-sdk sub-blocks of each module. The "format inside the block is given up, everything outside is preserved" trade is unchanged. isModuleAsSDKHeading is the section-key matcher. Migration (core/workspace/migrate.go): - PlanMigration writes the legacy `sdk` field as Modules[<short>].AsSDK.Modules — same authoring path as before, new location. Engine moduleInit (core/schema/workspace_module_init.go): - Conflict detection scans [[modules.*.as-sdk.modules]] instead of [[sdks.*.modules]]. - The SDK install creates / mutates a regular ModuleEntry, with the authoring entry attached under AsSDK. CLI module sdk wrapper (cmd/dagger/module_sdk.go): - Lookup scans cfg.Modules[*].AsSDK.Modules for the cwd's path. Tests updated for the new shape (round-trip, migration, and the config_test invalid-key listing now includes "as-sdk" and "pin"). Net code delta is small (one parallel section collapses into a nested sub-table) but the schema simplification removes the engine work that "move SDK settings" would have required — task dagger#109 disappears entirely. Signed-off-by: Solomon Hykes <[email protected]>
Replace the parallel [sdks.*] top-level section with an as-sdk sub-table on each module entry. An SDK install is now a regular [modules.<name>] entry whose role-specific data — the modules and clients it authors/manages locally — nests under [modules.<name>.as-sdk]. Why the pivot: - Settings unify. There's one place SDK settings live now — [modules.<sdk>.settings] — identical to every other module's settings location. `dagger settings` works for SDKs through the existing moduleList query without any engine-schema branching. The bifurcation that would have forced a parallel sdkList field, parallel settings discovery, and parallel runtime wiring is gone. - Install/develop distinction preserved. [modules.X] still means "installed here". The [[modules.X.as-sdk.modules]] entries are the develop side: an authored module gets an entry there AND (when default-path installed) its own [modules.<authored-name>] entry. - Mental model right. An SDK is a module whose role in this workspace is to author other things. The as-sdk sub-table makes the role visible without introducing a parallel taxonomy. Schema changes (core/workspace/config.go): - Config.SDKs map removed. - ModuleEntry gains AsSDK *ModuleAsSDK and Pin string. - ModuleAsSDK carries Modules + Clients slices (the existing SDKManagedModule / SDKManagedClient types are reused). - SerializeConfig writes the nested [[modules.<name>.as-sdk.modules]] / [[modules.<name>.as-sdk.clients]] arrays inline with each module. Format-preserving editor (core/workspace/config_document.go): - rewriteSDKSections is now rewriteModuleAsSDKSections, scoped to the nested as-sdk sub-blocks of each module. The "format inside the block is given up, everything outside is preserved" trade is unchanged. isModuleAsSDKHeading is the section-key matcher. Migration (core/workspace/migrate.go): - PlanMigration writes the legacy `sdk` field as Modules[<short>].AsSDK.Modules — same authoring path as before, new location. Engine moduleInit (core/schema/workspace_module_init.go): - Conflict detection scans [[modules.*.as-sdk.modules]] instead of [[sdks.*.modules]]. - The SDK install creates / mutates a regular ModuleEntry, with the authoring entry attached under AsSDK. CLI module sdk wrapper (cmd/dagger/module_sdk.go): - Lookup scans cfg.Modules[*].AsSDK.Modules for the cwd's path. Tests updated for the new shape (round-trip, migration, and the config_test invalid-key listing now includes "as-sdk" and "pin"). Net code delta is small (one parallel section collapses into a nested sub-table) but the schema simplification removes the engine work that "move SDK settings" would have required — task dagger#109 disappears entirely. Signed-off-by: Solomon Hykes <[email protected]>
Replace the parallel [sdks.*] top-level section with an as-sdk sub-table on each module entry. An SDK install is now a regular [modules.<name>] entry whose role-specific data — the modules and clients it authors/manages locally — nests under [modules.<name>.as-sdk]. Why the pivot: - Settings unify. There's one place SDK settings live now — [modules.<sdk>.settings] — identical to every other module's settings location. `dagger settings` works for SDKs through the existing moduleList query without any engine-schema branching. The bifurcation that would have forced a parallel sdkList field, parallel settings discovery, and parallel runtime wiring is gone. - Install/develop distinction preserved. [modules.X] still means "installed here". The [[modules.X.as-sdk.modules]] entries are the develop side: an authored module gets an entry there AND (when default-path installed) its own [modules.<authored-name>] entry. - Mental model right. An SDK is a module whose role in this workspace is to author other things. The as-sdk sub-table makes the role visible without introducing a parallel taxonomy. Schema changes (core/workspace/config.go): - Config.SDKs map removed. - ModuleEntry gains AsSDK *ModuleAsSDK and Pin string. - ModuleAsSDK carries Modules + Clients slices (the existing SDKManagedModule / SDKManagedClient types are reused). - SerializeConfig writes the nested [[modules.<name>.as-sdk.modules]] / [[modules.<name>.as-sdk.clients]] arrays inline with each module. Format-preserving editor (core/workspace/config_document.go): - rewriteSDKSections is now rewriteModuleAsSDKSections, scoped to the nested as-sdk sub-blocks of each module. The "format inside the block is given up, everything outside is preserved" trade is unchanged. isModuleAsSDKHeading is the section-key matcher. Migration (core/workspace/migrate.go): - PlanMigration writes the legacy `sdk` field as Modules[<short>].AsSDK.Modules — same authoring path as before, new location. Engine moduleInit (core/schema/workspace_module_init.go): - Conflict detection scans [[modules.*.as-sdk.modules]] instead of [[sdks.*.modules]]. - The SDK install creates / mutates a regular ModuleEntry, with the authoring entry attached under AsSDK. CLI module sdk wrapper (cmd/dagger/module_sdk.go): - Lookup scans cfg.Modules[*].AsSDK.Modules for the cwd's path. Tests updated for the new shape (round-trip, migration, and the config_test invalid-key listing now includes "as-sdk" and "pin"). Net code delta is small (one parallel section collapses into a nested sub-table) but the schema simplification removes the engine work that "move SDK settings" would have required — task #109 disappears entirely. Signed-off-by: Solomon Hykes <[email protected]>
Replace the parallel [sdks.*] top-level section with an as-sdk sub-table on each module entry. An SDK install is now a regular [modules.<name>] entry whose role-specific data — the modules and clients it authors/manages locally — nests under [modules.<name>.as-sdk]. Why the pivot: - Settings unify. There's one place SDK settings live now — [modules.<sdk>.settings] — identical to every other module's settings location. `dagger settings` works for SDKs through the existing moduleList query without any engine-schema branching. The bifurcation that would have forced a parallel sdkList field, parallel settings discovery, and parallel runtime wiring is gone. - Install/develop distinction preserved. [modules.X] still means "installed here". The [[modules.X.as-sdk.modules]] entries are the develop side: an authored module gets an entry there AND (when default-path installed) its own [modules.<authored-name>] entry. - Mental model right. An SDK is a module whose role in this workspace is to author other things. The as-sdk sub-table makes the role visible without introducing a parallel taxonomy. Schema changes (core/workspace/config.go): - Config.SDKs map removed. - ModuleEntry gains AsSDK *ModuleAsSDK and Pin string. - ModuleAsSDK carries Modules + Clients slices (the existing SDKManagedModule / SDKManagedClient types are reused). - SerializeConfig writes the nested [[modules.<name>.as-sdk.modules]] / [[modules.<name>.as-sdk.clients]] arrays inline with each module. Format-preserving editor (core/workspace/config_document.go): - rewriteSDKSections is now rewriteModuleAsSDKSections, scoped to the nested as-sdk sub-blocks of each module. The "format inside the block is given up, everything outside is preserved" trade is unchanged. isModuleAsSDKHeading is the section-key matcher. Migration (core/workspace/migrate.go): - PlanMigration writes the legacy `sdk` field as Modules[<short>].AsSDK.Modules — same authoring path as before, new location. Engine moduleInit (core/schema/workspace_module_init.go): - Conflict detection scans [[modules.*.as-sdk.modules]] instead of [[sdks.*.modules]]. - The SDK install creates / mutates a regular ModuleEntry, with the authoring entry attached under AsSDK. CLI module sdk wrapper (cmd/dagger/module_sdk.go): - Lookup scans cfg.Modules[*].AsSDK.Modules for the cwd's path. Tests updated for the new shape (round-trip, migration, and the config_test invalid-key listing now includes "as-sdk" and "pin"). Net code delta is small (one parallel section collapses into a nested sub-table) but the schema simplification removes the engine work that "move SDK settings" would have required — task #109 disappears entirely. Signed-off-by: Solomon Hykes <[email protected]>
Replace the parallel [sdks.*] top-level section with an as-sdk sub-table on each module entry. An SDK install is now a regular [modules.<name>] entry whose role-specific data — the modules and clients it authors/manages locally — nests under [modules.<name>.as-sdk]. Why the pivot: - Settings unify. There's one place SDK settings live now — [modules.<sdk>.settings] — identical to every other module's settings location. `dagger settings` works for SDKs through the existing moduleList query without any engine-schema branching. The bifurcation that would have forced a parallel sdkList field, parallel settings discovery, and parallel runtime wiring is gone. - Install/develop distinction preserved. [modules.X] still means "installed here". The [[modules.X.as-sdk.modules]] entries are the develop side: an authored module gets an entry there AND (when default-path installed) its own [modules.<authored-name>] entry. - Mental model right. An SDK is a module whose role in this workspace is to author other things. The as-sdk sub-table makes the role visible without introducing a parallel taxonomy. Schema changes (core/workspace/config.go): - Config.SDKs map removed. - ModuleEntry gains AsSDK *ModuleAsSDK and Pin string. - ModuleAsSDK carries Modules + Clients slices (the existing SDKManagedModule / SDKManagedClient types are reused). - SerializeConfig writes the nested [[modules.<name>.as-sdk.modules]] / [[modules.<name>.as-sdk.clients]] arrays inline with each module. Format-preserving editor (core/workspace/config_document.go): - rewriteSDKSections is now rewriteModuleAsSDKSections, scoped to the nested as-sdk sub-blocks of each module. The "format inside the block is given up, everything outside is preserved" trade is unchanged. isModuleAsSDKHeading is the section-key matcher. Migration (core/workspace/migrate.go): - PlanMigration writes the legacy `sdk` field as Modules[<short>].AsSDK.Modules — same authoring path as before, new location. Engine moduleInit (core/schema/workspace_module_init.go): - Conflict detection scans [[modules.*.as-sdk.modules]] instead of [[sdks.*.modules]]. - The SDK install creates / mutates a regular ModuleEntry, with the authoring entry attached under AsSDK. CLI module sdk wrapper (cmd/dagger/module_sdk.go): - Lookup scans cfg.Modules[*].AsSDK.Modules for the cwd's path. Tests updated for the new shape (round-trip, migration, and the config_test invalid-key listing now includes "as-sdk" and "pin"). Net code delta is small (one parallel section collapses into a nested sub-table) but the schema simplification removes the engine work that "move SDK settings" would have required — task #109 disappears entirely. Signed-off-by: Solomon Hykes <[email protected]>
Move every dagger/go pin, the built-in Go SDK's included, to dagger/go main's 79a92be, the merge of dagger/go#104, whose tree is that PR's last head; and go-sdk to its main with daggerGo naming the same commit. That go-sdk main also brings its #109: a module's local clients are addressed by their path from the module. Signed-off-by: Erik Sipsma <[email protected]>
Move every dagger/go pin, the built-in Go SDK's included, to dagger/go main's 79a92be, the merge of dagger/go#104, whose tree is that PR's last head; and go-sdk to its main with daggerGo naming the same commit. That go-sdk main also brings its #109: a module's local clients are addressed by their path from the module. Signed-off-by: Erik Sipsma <[email protected]>
Move every dagger/go pin, the built-in Go SDK's included, to dagger/go main's 79a92be, the merge of dagger/go#104, whose tree is that PR's last head; and go-sdk to its main with daggerGo naming the same commit. That go-sdk main also brings its #109: a module's local clients are addressed by their path from the module. Signed-off-by: Erik Sipsma <[email protected]>
Component,Script,Op,mount: just usecc.ValuedirectlyExecutableinterface.PipelineAnalyzecctests to the sub-package.”dagger.cloud/dagger”and use available definitions such asdagger.#Exec,dagger.#FetchContaineretc.