From dff55091071d2c022ed1e9bab9aa2937afa0d555 Mon Sep 17 00:00:00 2001 From: plastikfan Date: Tue, 12 Dec 2023 15:30:40 +0000 Subject: [PATCH] chore(deps): incoming breaking changes from extendio & cobrass (#48) --- go.mod | 40 ++++++------ go.sum | 45 ++++++++++++++ src/app/command/bootstrap.go | 2 +- src/app/command/root-cmd.go | 2 +- src/app/command/shrink-cmd.go | 96 +++++++++-------------------- src/app/proxy/enter-shrink.go | 6 +- src/app/proxy/execution-sequence.go | 51 --------------- src/app/proxy/execution-step.go | 28 +++++++++ src/app/proxy/image-defs.go | 9 ++- src/app/proxy/item-runners.go | 58 ++++++++++++----- 10 files changed, 173 insertions(+), 164 deletions(-) delete mode 100644 src/app/proxy/execution-sequence.go create mode 100644 src/app/proxy/execution-step.go diff --git a/go.mod b/go.mod index d6e2163..6bd9f5e 100644 --- a/go.mod +++ b/go.mod @@ -3,52 +3,56 @@ module github.com/snivilised/pixa go 1.21 require ( - github.com/onsi/ginkgo/v2 v2.13.1 + github.com/onsi/ginkgo/v2 v2.13.2 github.com/onsi/gomega v1.30.0 github.com/pkg/errors v0.9.1 - github.com/samber/lo v1.38.1 - github.com/snivilised/extendio v0.4.0 + github.com/samber/lo v1.39.0 + github.com/snivilised/extendio v0.5.0 github.com/snivilised/lorax v0.4.2 - github.com/spf13/cobra v1.7.0 - github.com/spf13/viper v1.17.0 + github.com/spf13/cobra v1.8.0 + github.com/spf13/viper v1.18.1 go.uber.org/zap v1.26.0 ) require ( - github.com/BurntSushi/toml v1.2.1 // indirect + github.com/BurntSushi/toml v1.3.2 // indirect github.com/avfs/avfs v0.33.0 // indirect + github.com/chzyer/readline v1.5.1 // indirect github.com/go-logr/logr v1.3.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20230406165453-00490a63f317 // indirect + github.com/google/pprof v0.0.0-20231212022811-ec68065c825e // indirect github.com/google/uuid v1.4.0 // indirect + github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect + github.com/nxadm/tail v1.4.8 // indirect github.com/onsi/ginkgo v1.16.5 // indirect - github.com/sagikazarmark/locafero v0.3.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/tools v0.14.0 // indirect + golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb // indirect + golang.org/x/tools v0.16.0 // indirect + gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect ) require ( github.com/cubiest/jibberjabber v1.0.1 - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/natefinch/lumberjack v2.0.0+incompatible - github.com/nicksnyder/go-i18n/v2 v2.2.2 // indirect - github.com/pelletier/go-toml/v2 v2.1.0 // indirect - github.com/snivilised/cobrass v0.3.6 - github.com/spf13/afero v1.10.0 // indirect - github.com/spf13/cast v1.5.1 // indirect + github.com/nicksnyder/go-i18n/v2 v2.3.0 // indirect + github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/snivilised/cobrass v0.4.0 + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/pflag v1.0.5 github.com/subosito/gotenv v1.6.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 0a94f26..738becd 100644 --- a/go.sum +++ b/go.sum @@ -40,18 +40,25 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/avfs/avfs v0.33.0 h1:5WQXbUbr6VS7aani39ZN2Vrd/s3wLnyih1Sc4ExWTxs= github.com/avfs/avfs v0.33.0/go.mod h1:Q59flcFRYe9KYkNMfrLUJney3yeKGQpcWRyxsDBW7vI= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cubiest/jibberjabber v1.0.1 h1:JxKC9EZcdw8azEbyWaNj62ppPMkbFJBf2ayPY1vBeDI= github.com/cubiest/jibberjabber v1.0.1/go.mod h1:Ovt9ZAmzAgwQ8cWgvZ1se9oaGYzjHrlAXKM3NOzlQOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -68,10 +75,13 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8 github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -135,6 +145,8 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20230406165453-00490a63f317 h1:hFhpt7CTmR3DX+b4R19ydQFtofxT0Sv3QsKNMVQYTMQ= github.com/google/pprof v0.0.0-20230406165453-00490a63f317/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= +github.com/google/pprof v0.0.0-20231212022811-ec68065c825e h1:bwOy7hAFd0C91URzMIEBfr6BAz29yk7Qj0cy6S7DJlU= +github.com/google/pprof v0.0.0-20231212022811-ec68065c825e/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= @@ -149,6 +161,8 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab h1:BA4a7pe6ZTd9F8kXETBoijjFJ/ntaa//1wiH9BZu4zU= +github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= @@ -172,6 +186,8 @@ github.com/natefinch/lumberjack v2.0.0+incompatible h1:4QJd3OLAMgj7ph+yZTuX13Ld4 github.com/natefinch/lumberjack v2.0.0+incompatible/go.mod h1:Wi9p2TTF5DG5oU+6YfsmYQpsTIOm0B1VNzQg9Mw6nPk= github.com/nicksnyder/go-i18n/v2 v2.2.2 h1:Iv/FL6pvYmDqybEZkr4TrOv8jSHezwpE77K68kcaft8= github.com/nicksnyder/go-i18n/v2 v2.2.2/go.mod h1:fF2++lPHlo+/kPaj3nB0uxtPwzlPm+BlgwGX7MkeGj0= +github.com/nicksnyder/go-i18n/v2 v2.3.0 h1:2NPsCsNFCVd7i+Su0xYsBrIhS3bE2XMv5gNTft2O+PQ= +github.com/nicksnyder/go-i18n/v2 v2.3.0/go.mod h1:nxYSZE9M0bf3Y70gPQjN9ha7XNHX7gMc814+6wVyEI4= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -181,12 +197,16 @@ github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.13.1 h1:LNGfMbR2OVGBfXjvRZIZ2YCTQdGKtPLvuI1rMCCj3OU= github.com/onsi/ginkgo/v2 v2.13.1/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe6zrvLgM= +github.com/onsi/ginkgo/v2 v2.13.2 h1:Bi2gGVkfn6gQcjNjZJVO8Gf0FHzMPf2phUei9tejVMs= +github.com/onsi/ginkgo/v2 v2.13.2/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe6zrvLgM= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= +github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= @@ -200,28 +220,44 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.3.0 h1:zT7VEGWC2DTflmccN/5T1etyKvxSxpHsjb9cJvm4SvQ= github.com/sagikazarmark/locafero v0.3.0/go.mod h1:w+v7UsPNFwzF1cHuOajOOzoq4U7v/ig1mpRjqV+Bu1U= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= +github.com/samber/lo v1.39.0 h1:4gTz1wUhNYLhFSKl6O+8peW0v2F4BCY034GRpU9WnuA= +github.com/samber/lo v1.39.0/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= github.com/snivilised/cobrass v0.3.6 h1:sd8bTT5RWIUh61udWDpU77lu4l7H+nZz10oIaTRmKck= github.com/snivilised/cobrass v0.3.6/go.mod h1:i08Cgz6ZZ8vIzP9HhJ7ZjOqffWRLAo4cPxLyfqW+cas= +github.com/snivilised/cobrass v0.4.0 h1:UPxWRu9GQuEpYPxWQ0ZeuZJyjVzWAqZMUpCNuUUY2ls= +github.com/snivilised/cobrass v0.4.0/go.mod h1:n92WNirJR+VpceCwExljVde+gSqJ74+sB8bILVwsVik= github.com/snivilised/extendio v0.4.0 h1:dc43lUO3eFxfqjE1EjNN2+GP8xiqqse3cuHxUC8Q3kk= github.com/snivilised/extendio v0.4.0/go.mod h1:zL8elN5UpBQOIcvHHh4lWpEuQmnE90VknqcdIyk9C4I= +github.com/snivilised/extendio v0.5.0 h1:XxUW125nGxkluVOekzWWpoE80r5KL0e+MFP2gjiXOhc= +github.com/snivilised/extendio v0.5.0/go.mod h1:jBaeTO9432bNbBKR4mbt2d7OGyrDPY/U45siM3VhTks= github.com/snivilised/lorax v0.4.2 h1:jPo+o4cP/BUYBkR6sg3oLybHx0j2R+0wMLnvOf/gh0g= github.com/snivilised/lorax v0.4.2/go.mod h1:vyhM905Fc4fzShAXPvykS8ZRnO6B85hd0emJgZE4iNY= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI= github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI= +github.com/spf13/viper v1.18.1 h1:rmuU42rScKWlhhJDyXZRKJQHXFX02chSVW1IvkPGiVM= +github.com/spf13/viper v1.18.1/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -272,6 +308,8 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= +golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb h1:c0vyKkb6yr3KR7jEfJaOSv4lG7xPkbN6r52aJz1d8a8= +golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -335,6 +373,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -395,11 +435,14 @@ golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -467,6 +510,8 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= +golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/src/app/command/bootstrap.go b/src/app/command/bootstrap.go index bd97a18..159aee2 100644 --- a/src/app/command/bootstrap.go +++ b/src/app/command/bootstrap.go @@ -232,7 +232,7 @@ func (b *Bootstrap) viper() { for profile, pv := range profiles { if pair, ok := pv.(proxy.ProfilesFlagOptionAsAnyPair); ok { - b.ProfilesCFG[profile] = make(clif.SpecifiedFlagsCollection) + b.ProfilesCFG[profile] = make(clif.ChangedFlagsMap) for flag, optionAsAny := range pair { b.ProfilesCFG[profile][flag] = fmt.Sprint(optionAsAny) diff --git a/src/app/command/root-cmd.go b/src/app/command/root-cmd.go index fc89be1..979574c 100644 --- a/src/app/command/root-cmd.go +++ b/src/app/command/root-cmd.go @@ -139,7 +139,7 @@ func (b *Bootstrap) buildRootCommand(container *assistant.CobraContainer) { foldersFam := assistant.NewParamSet[store.FoldersFilterParameterSet](rootCommand) foldersFam.Native.BindAll(foldersFam) - // family: profile [--profile(p)] + // family: profile [--profile(P), --scheme(S)] // profileFam := assistant.NewParamSet[store.ProfileParameterSet](rootCommand) profileFam.Native.BindAll(profileFam, rootCommand.PersistentFlags()) diff --git a/src/app/command/shrink-cmd.go b/src/app/command/shrink-cmd.go index 99be869..a1e7a0c 100644 --- a/src/app/command/shrink-cmd.go +++ b/src/app/command/shrink-cmd.go @@ -2,9 +2,9 @@ package command import ( "fmt" + "maps" "strings" - "github.com/samber/lo" "github.com/snivilised/cobrass" "github.com/snivilised/cobrass/src/assistant" "github.com/snivilised/cobrass/src/store" @@ -30,11 +30,8 @@ import ( // and we use capitals for the short forms of files filters, to denote // compound filter. If files filter was not compound, it would be named // file and the short forms would be x and g instead of X and G. -var shrinkShortFlags = cobrass.KnownByCollection{ - // shrink specific: - // - "mirror-path": "r", - "mode": "m", + +var thirdPartyFlags = cobrass.KnownByCollection{ // third-party: // "gaussian-blur": "b", @@ -42,6 +39,13 @@ var shrinkShortFlags = cobrass.KnownByCollection{ "interlace": "i", "strip": "s", "quality": "q", +} + +var shrinkShortFlags = cobrass.KnownByCollection{ + // shrink specific: + // + "mirror-path": "r", + "mode": "m", // root: // "cpu": "C", @@ -55,6 +59,10 @@ var shrinkShortFlags = cobrass.KnownByCollection{ "scheme": "S", } +func init() { + maps.Copy(shrinkShortFlags, thirdPartyFlags) +} + const ( shrinkPsName = "shrink-ps" filesFamName = "files-family" @@ -67,29 +75,6 @@ func newShrinkFlagInfoWithShort[T any](usage string, defaultValue T) *assistant. return assistant.NewFlagInfo(usage, short, defaultValue) } -func GetThirdPartyCL( - flagSet *pflag.FlagSet, - knownBy cobrass.KnownByCollection, - changedOnly bool, -) cobrass.ThirdPartyCommandLine { - // move to cobrass/clif - // - cl := cobrass.ThirdPartyCommandLine{} - - flagSet.Visit(func(f *pflag.Flag) { - if _, found := knownBy[f.Name]; found { - if !changedOnly || (changedOnly && f.Changed) { - cl = append(cl, fmt.Sprintf("--%v", f.Name)) - if f.Value.Type() != "bool" { - cl = append(cl, f.Value.String()) - } - } - } - }) - - return cl -} - type shrinkParameterSetPtr = *assistant.ParamSet[proxy.ShrinkParameterSet] func (b *Bootstrap) buildShrinkCommand(container *assistant.CobraContainer) *cobra.Command { @@ -116,11 +101,9 @@ func (b *Bootstrap) buildShrinkCommand(container *assistant.CobraContainer) *cob return nil }); xvErr == nil { flagSet := cmd.Flags() - - changed := GetThirdPartyCL( + changed := assistant.GetThirdPartyCL( flagSet, shrinkPS.Native.ThirdPartySet.KnownBy, - true, ) shrinkPS.Native.ThirdPartySet.LongChangedCL = changed @@ -130,23 +113,23 @@ func (b *Bootstrap) buildShrinkCommand(container *assistant.CobraContainer) *cob ) inputs := b.getShrinkInputs() - inputs.RootInputs.ParamSet.Native.Directory = helpers.ResolvePath(args[0]) + inputs.Root.ParamSet.Native.Directory = helpers.ResolvePath(args[0]) // validate the profile // - profile := inputs.RootInputs.ProfileFam.Native.Profile + profile := inputs.Root.ProfileFam.Native.Profile if err := b.ProfilesCFG.Validate(profile); err != nil { return err } - // validate the scheme - // - if err := b.SamplerCFG.Validate( - inputs.ParamSet.Native.Scheme, - b.ProfilesCFG, - ); err != nil { - return err + if scheme := inputs.Root.ProfileFam.Native.Scheme; scheme != "" { + if err := b.SamplerCFG.Validate( + scheme, + b.ProfilesCFG, + ); err != nil { + return err + } } // Apply fallbacks, ie user didn't specify flag on command line @@ -157,9 +140,9 @@ func (b *Bootstrap) buildShrinkCommand(container *assistant.CobraContainer) *cob // that viper would fail to pick up this value, so implementing // the fall back manually here. // - if inputs.RootInputs.ParamSet.Native.IsSampling { + if inputs.Root.ParamSet.Native.IsSampling { if !flagSet.Changed("no-files") && b.SamplerCFG.NoFiles > 0 { - inputs.RootInputs.ParamSet.Native.NoFiles = b.SamplerCFG.NoFiles + inputs.Root.ParamSet.Native.NoFiles = b.SamplerCFG.NoFiles } } @@ -228,29 +211,6 @@ func (b *Bootstrap) buildShrinkCommand(container *assistant.CobraContainer) *cob }, ) - // -- scheme(S) - // - const ( - defaultScheme = "" - ) - - sampler := b.optionsInfo.Config.Viper.Get("sampler") - - // can we validate that it is present in the config? - paramSet.BindValidatedString( - newShrinkFlagInfoWithShort( - xi18n.Text(i18n.ShrinkCmdSchemeParamUsageTemplData{}), - defaultScheme, - ), - ¶mSet.Native.Scheme, - func(s string, f *pflag.Flag) error { - return lo.TernaryF(sampler != nil, - func() error { return nil }, - func() error { return fmt.Errorf("sampler not found (%v)", s) }, - ) - }, - ) - // --gaussian-blur(b) // const ( @@ -358,7 +318,7 @@ func (b *Bootstrap) buildShrinkCommand(container *assistant.CobraContainer) *cob filesFam := assistant.NewParamSet[store.FilesFilterParameterSet](shrinkCommand) filesFam.Native.BindAll(filesFam) - paramSet.Native.KnownBy = shrinkShortFlags + paramSet.Native.KnownBy = thirdPartyFlags b.viper() @@ -393,7 +353,7 @@ func (b *Bootstrap) buildShrinkCommand(container *assistant.CobraContainer) *cob func (b *Bootstrap) getShrinkInputs() *proxy.ShrinkCommandInputs { return &proxy.ShrinkCommandInputs{ - RootInputs: b.getRootInputs(), + Root: b.getRootInputs(), ParamSet: b.Container.MustGetParamSet( shrinkPsName, ).(*assistant.ParamSet[proxy.ShrinkParameterSet]), diff --git a/src/app/proxy/enter-shrink.go b/src/app/proxy/enter-shrink.go index c1dd87a..81dfd73 100644 --- a/src/app/proxy/enter-shrink.go +++ b/src/app/proxy/enter-shrink.go @@ -173,7 +173,7 @@ func (e *ShrinkEntry) resumeFn(item *nav.TraverseItem) error { } func (e *ShrinkEntry) run(_ configuration.ViperConfig) error { - runnerWith := composeWith(e.Inputs.RootInputs) + runnerWith := composeWith(e.Inputs.Root) resumption := &nav.Resumption{ // actually, we need to come up with a convenient way for the restore // file to be found. Let's assume we declare a specific location for @@ -207,11 +207,11 @@ func EnterShrink( profilesCFG ProfilesConfig, samplerCFG *SamplerConfig, ) error { - fmt.Printf("---> 🔊🔊 Directory: '%v'\n", inputs.RootInputs.ParamSet.Native.Directory) + fmt.Printf("---> 🔊🔊 Directory: '%v'\n", inputs.Root.ParamSet.Native.Directory) entry := &ShrinkEntry{ EntryBase: EntryBase{ - Inputs: inputs.RootInputs, + Inputs: inputs.Root, Program: program, Config: config, ProfilesCFG: profilesCFG, diff --git a/src/app/proxy/execution-sequence.go b/src/app/proxy/execution-sequence.go deleted file mode 100644 index 78dc335..0000000 --- a/src/app/proxy/execution-sequence.go +++ /dev/null @@ -1,51 +0,0 @@ -package proxy - -import ( - "github.com/snivilised/cobrass/src/clif" - "github.com/snivilised/extendio/collections" -) - -type Step interface { - Run() error -} - -type Sequence interface { - RunAll() error -} - -// magickStep knows how to combine parameters together so that the program -// can be invoked correctly; but it does not know how to compose the input -// and output file names; this is the responsibility of the runner, which uses -// the path-finder to accomplish that task. -type magickStep struct { // Step - fileManager *FileManager - program Executor - thirdPartyCL clif.ThirdPartyCommandLine - sourcePath string - outputPath string - journalPath string -} - -func (s *magickStep) Run() error { - positional := []string{s.sourcePath} - - return s.program.Execute(clif.Expand(positional, s.thirdPartyCL)...) -} - -// ExecutionSequence will batch together a list of steps. They are executed within -// the same go routine. The sequence will consist of 1 or more external blocking -// executions. By default, the execution sequence will stop running if the third -// party program returns a non zero result. -type ExecutionSequence struct { // Sequence - iterator collections.Iterator[Step] -} - -func (s *ExecutionSequence) RunAll() error { - // this will continue in the presence of errors .... (TODO change the while condition) - var err error - for entry := s.iterator.Start(); s.iterator.Valid(); entry = s.iterator.Next() { - err = entry.Run() - } - - return err -} diff --git a/src/app/proxy/execution-step.go b/src/app/proxy/execution-step.go new file mode 100644 index 0000000..6e9c9ed --- /dev/null +++ b/src/app/proxy/execution-step.go @@ -0,0 +1,28 @@ +package proxy + +import ( + "github.com/snivilised/cobrass/src/clif" +) + +type Step interface { + Run() error +} + +// magickStep knows how to combine parameters together so that the program +// can be invoked correctly; but it does not know how to compose the input +// and output file names; this is the responsibility of the runner, which uses +// the path-finder to accomplish that task. +type magickStep struct { + fileManager *FileManager + program Executor + thirdPartyCL clif.ThirdPartyCommandLine + sourcePath string + outputPath string + journalPath string +} + +func (s *magickStep) Run() error { + positional := []string{s.sourcePath} + + return s.program.Execute(clif.Expand(positional, s.thirdPartyCL)...) +} diff --git a/src/app/proxy/image-defs.go b/src/app/proxy/image-defs.go index 776bec2..8f2e92b 100644 --- a/src/app/proxy/image-defs.go +++ b/src/app/proxy/image-defs.go @@ -23,7 +23,7 @@ type RootParameterSet struct { // should contain RootCommandInputs type ( ProfilesFlagOptionAsAnyPair = map[string]any ProfilesFlagOptionPair = map[string]string - ProfilesConfig map[string]clif.SpecifiedFlagsCollection + ProfilesConfig map[string]clif.ChangedFlagsMap ) func (pc ProfilesConfig) Validate(name string) error { @@ -118,7 +118,6 @@ type ThirdPartySet struct { type ShrinkParameterSet struct { ThirdPartySet // - Scheme string // to be replaced by the scheme now defined in the profiles family MirrorPath string ModeEn assistant.EnumValue[ModeEnum] } @@ -132,7 +131,7 @@ type RootCommandInputs struct { } type ShrinkCommandInputs struct { - RootInputs *RootCommandInputs - ParamSet *assistant.ParamSet[ShrinkParameterSet] - FilesFam *assistant.ParamSet[store.FilesFilterParameterSet] + Root *RootCommandInputs + ParamSet *assistant.ParamSet[ShrinkParameterSet] + FilesFam *assistant.ParamSet[store.FilesFilterParameterSet] } diff --git a/src/app/proxy/item-runners.go b/src/app/proxy/item-runners.go index 0986956..8e4927e 100644 --- a/src/app/proxy/item-runners.go +++ b/src/app/proxy/item-runners.go @@ -14,8 +14,33 @@ import ( // type itemRunner struct { - shared *SharedRunnerInfo - exSequence Sequence + shared *SharedRunnerInfo +} + +func (r *itemRunner) Run(sequence []Step) error { + var ( + zero Step + resultErr error + ) + + iterator := collections.ForwardRunIt[Step, error](sequence, zero) + each := func(s Step) error { + return s.Run() + } + while := func(_ Step, err error) bool { + if resultErr == nil { + resultErr = err + } + + // this needs to change according to a new, not yet defined + // setting, 'ContinueOnError' + // + return err == nil + } + + iterator.RunAll(each, while) + + return resultErr } func (r *itemRunner) Reset() { @@ -44,36 +69,41 @@ func (r *SamplerRunner) OnNewShrinkItem(item *nav.TraverseItem, // either long or short forms, therefore we, need to be able to recognise if a short form // flag in present is actually in present in the config as its long form. // - profileName := r.shared.Inputs.RootInputs.ProfileFam.Native.Profile - schemeName := r.shared.Inputs.ParamSet.Native.Scheme - // + profileName := r.shared.Inputs.Root.ProfileFam.Native.Profile + schemeName := r.shared.Inputs.Root.ProfileFam.Native.Scheme changed := r.shared.Inputs.ParamSet.Native.ThirdPartySet.LongChangedCL - var steps []Step + var sequence []Step switch { case profileName != "": cl := r.composeProfileCL(profileName, changed) step := &magickStep{ + // fileManager program: r.shared.program, thirdPartyCL: cl, sourcePath: item.Path, + // outputPath: , + // journalPath: , } - steps = []Step{step} + sequence = []Step{step} case schemeName != "": scheme := r.shared.sampler.Schemes[schemeName] - steps = make([]Step, 0, len(scheme.Profiles)) + sequence = make([]Step, 0, len(scheme.Profiles)) for _, currentProfileName := range scheme.Profiles { cl := r.composeProfileCL(currentProfileName, changed) step := &magickStep{ + // fileManager program: r.shared.program, thirdPartyCL: cl, sourcePath: item.Path, + // outputPath: , + // journalPath: , } - steps = append(steps, step) + sequence = append(sequence, step) } default: @@ -85,16 +115,10 @@ func (r *SamplerRunner) OnNewShrinkItem(item *nav.TraverseItem, // outputPath: , // journalPath: , } - steps = []Step{step} - } - - var zero Step - - sequence := ExecutionSequence{ - iterator: collections.BeginIt[Step](steps, zero), + sequence = []Step{step} } - return sequence.RunAll() + return r.Run(sequence) } func (r *SamplerRunner) composeProfileCL(