Commit Graph

3094 Commits

Author SHA1 Message Date
Andrea Luzzardi
ec56160307
Merge pull request #115 from blocklayerhq/slim
Simplify runtime code by removing layers of abstraction
2021-02-12 15:27:18 -08:00
Solomon Hykes
acba8b3988 Simplify runtime code by removing layers of abstraction
- 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 <sh.github.6811@hykes.org>
2021-02-12 22:20:20 +00:00
Andrea Luzzardi
92b61f7edb
Merge pull request #113 from blocklayerhq/re-enable-specgen
re-enable spec generation
2021-02-10 18:45:17 -08:00
Andrea Luzzardi
3718749db5 re-enable spec generation
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-10 18:43:07 -08:00
Andrea Luzzardi
88b98cac6c
Merge pull request #111 from blocklayerhq/cue-v0.3.0-beta.4
bump cue to v0.3.0-beta.4
2021-02-09 12:51:54 -08:00
Andrea Luzzardi
7cbce4eec1
Merge pull request #108 from verdverm/mount-path
support path option in script/component mounts
2021-02-09 12:51:14 -08:00
Tony Worm
8de7a47b8d support path option in script/component mounts
Signed-off-by: Tony Worm <tony@hofstadter.io>
2021-02-09 15:00:23 -05:00
Andrea Luzzardi
b324fa3248 bump cue to v0.3.0-beta.4
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-09 11:42:41 -08:00
Solomon Hykes
781b89e41c Simplify op.go by removing unnecessary cue validations
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-02-08 15:10:32 -08:00
Solomon Hykes
612a25fb9f Simplify code by moving polyfill cue compiler to sub-package cc
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-02-08 15:10:32 -08:00
Solomon Hykes
622de21883 {do:"subdir"} to select a subdirectory in a script
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-02-05 15:27:37 -08:00
Solomon Hykes
0202f4447b Don't instantiate a global shared Env in cmd/compute.go
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-02-05 15:27:19 -08:00
Solomon Hykes
0fe2ef4fe4 Simplify Env API: Compute/Components instead of Compute/Walk
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-02-05 15:27:19 -08:00
Andrea Luzzardi
5b7bc78cf1
Merge pull request #104 from blocklayerhq/mnt-cache
mount cache support
2021-02-05 15:18:32 -08:00
Andrea Luzzardi
75c3b09415
Merge pull request #103 from blocklayerhq/trace-llb
solver: trace LLB
2021-02-05 15:18:11 -08:00
Andrea Luzzardi
b0294e79d1 solver: trace LLB
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-05 15:14:45 -08:00
Andrea Luzzardi
f336164699 mount cache support
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-05 15:08:44 -08:00
Andrea Luzzardi
89c7136f75 tests: move tests top-level
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-03 15:02:43 -08:00
Andrea Luzzardi
f6650901fd update .gitignore
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-03 14:58:33 -08:00
Solomon Hykes
b30febc7c2 Fix out-of-the-blue linter errors
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-02-03 12:39:25 -08:00
Andrea Luzzardi
17ce7cf2e8
Merge pull request #71 from blocklayerhq/export-fixes
Misc Export fixes
2021-02-02 16:20:26 -08:00
Andrea Luzzardi
c6e010d4f0 Misc Export fixes
- Temporarily disable export of base.cue as it causes merge errors at
  the end of compute
- Fixes for JSON export for Scalar and Lists
- Add YAML export
- Removed BOOL and NUMBER support, using JSON for now
- Re-enabled all export tests

Fixes #36

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-02 16:19:46 -08:00
Andrea Luzzardi
f8a7722261
Merge pull request #94 from blocklayerhq/readme-buildkit
README: command to create a buildkitd
2021-02-02 14:22:07 -08:00
Andrea Luzzardi
bc94452c83
Merge pull request #95 from blocklayerhq/simplify
simplify: remove compute.go
2021-02-02 14:21:05 -08:00
Andrea Luzzardi
86aa031f92 fix concurrency issues in Compiler.Compile and Value.Source
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-02 13:52:52 -08:00
Andrea Luzzardi
cd0f21dbd2 client: simplify Compute logic
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-02 12:32:22 -08:00
Andrea Luzzardi
c9e0d0854d client: remove unused printer
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-02 11:12:24 -08:00
Andrea Luzzardi
167edf4a76 simplify: remove compute.go
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-02 11:03:12 -08:00
Andrea Luzzardi
6e31193d64
Merge pull request #87 from blocklayerhq/input-ux
Better ux for inputs
2021-02-02 10:45:48 -08:00
Andrea Luzzardi
78601fefd6 fix dependencies between tasks
due to using an old snapshot of cue.Value, components relying on
dependent tasks were failing because of non-concretness.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-02-02 10:31:52 -08:00
Solomon Hykes
38967d0e8e README: command to create a buildkitd
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-02-02 07:51:55 +00:00
Solomon Hykes
1954c3f731 dagger compute [--input-dir TARGET=DIR] [--input-string TARGET=STRING] [--input-cue CUE] [--input-git REMOTE#REF]
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-01-31 22:48:30 -08:00
Solomon Hykes
af9581c28a Typo in examples/simple
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-01-30 18:24:26 -08:00
Solomon Hykes
ae577baf8c Typo in README
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-01-30 18:24:26 -08:00
Solomon Hykes
fa2cfc1267 Fix examples/simple (cannot load across package imports)
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-01-30 00:25:58 -08:00
Dan POP
23a1211cdf Update gen.sh to remove redundant error check
cue eval spec.cue >/dev/null removed (redunant per @shykes)

Signed-off-by: Dan POP <dan.papandrea@sysdig.com>
2021-01-28 22:38:38 -08:00
Solomon Hykes
c4e55a6915 Refactor how client prepares environment. Inputs may now reference local directories
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-01-28 19:29:57 -08:00
Solomon Hykes
6f4577d501 Fix and improve examples/simple
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-01-28 19:29:57 -08:00
Solomon Hykes
a26b767780 Fix bug in localdir (optional fields in spec not supported)
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-01-28 19:29:57 -08:00
Solomon Hykes
3e5063828a Fix bug in exec/mount
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-01-28 19:29:57 -08:00
Andrea Luzzardi
71e079c784
Merge pull request #82 from blocklayerhq/cue-0.3.0-beta.3
cue: update to v0.3.0-beta.3
2021-01-28 12:55:59 -08:00
Andrea Luzzardi
4e760887db cue: update to v0.3.0-beta.3
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-01-28 12:52:13 -08:00
Solomon Hykes
a282abfeb9 README: better intro, getting started instructions
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-01-27 12:09:34 -08:00
Andrea Luzzardi
cc5a48d39b
Merge pull request #76 from blocklayerhq/output-no-merge
output: merge base/input/output into a single state.cue
2021-01-26 16:53:32 -08:00
Solomon Hykes
f933278d43 Fix spec validation & merge so that default values are correctly applied
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-01-26 16:52:14 -08:00
Andrea Luzzardi
2009561ba5
Merge pull request #75 from dubo-dubon-duponey/tests
Work on integration tests
2021-01-26 13:27:53 -08:00
Andrea Luzzardi
04526b5b78 output: merge base/input/output into a single state.cue
Exporting base/input/output separately causes merge errors.
For instance, `foo: string | *"default foo"` gets serialized as
`{"foo":"default foo"}`, which will fail to merge if output contains
a different definition of `foo`.

This change temporarily merges the 3 streams together before
serializing.

Fixes #51

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-01-26 12:12:42 -08:00
dubo-dubon-duponey
707dbd0256
Work on integration tests
- add new entries for #70 and #74
- cleaned-up / enriched a little bit compute and exec tests

Signed-off-by: dubo-dubon-duponey <dubodubonduponey+github@pm.me>
2021-01-26 11:40:38 -08:00
Andrea Luzzardi
d06070b85a
Merge pull request #73 from blocklayerhq/exec-dir
op: exec: fix `dir`
2021-01-25 16:43:04 -08:00
Andrea Luzzardi
75fbddf6be op: exec: fix dir
Fixes #30

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-01-25 16:19:20 -08:00