Fork me on GitHub

Along the lines of Franco's question, is there a way to include tasks from one bb.edn in another? Maybe by merging :tasks from one bb.edn in BABASHKA_PRELOADS or something? Or maybe this is just way too gross to consider. 😉


This isn't supported right now


I came up with a solution that is much better than what I had in mind (at least, in my mind). Will explain in my blog. 😉


Prepare to be horrified by the probable abuse of babashka-cli


Already loving it!


So yeah... didn't actually talk about babashka-cli in the post, just what it enables:


Tomorrow. I promise!


(Though as you know, I'm a well known liar, so take my promise with the requisite amount of salt.)


Where's the code?


You're so impatient! 😉


Like I said, prepare to choke back some vomit. 🤢


But seriously, if you have suggestions for improving things, I would be very happy to hear them. 🙂


@U054AT6KT I think this is awesome, I mean it. The thing I wondered about was the spec merging but you did this manually. I wanted to fix this, but I'm glad you found a way.


I see you are checking required keys manually. There is now also a :restrict option for this, that can be set to either true or a collection of required keys


Nice! I’ll try out the :restrict option. I was using a validator before, but I didn’t want an exception thrown. Would you consider being able to specify an error handler function which would get the invalid value and the spec for the invalid opt?


Yeah, this is an area that needs some love probably


I’ll open an issue for it. If we come up with a good design, I can try to do a PR.


Yes please


I think maybe you were mixing up :restrict and :require, right?

* `:restrict` - `true` or coll of keys. Throw on first parsed option not in set of keys or keys of `:spec` and `:coerce` combined.
  * `:require`: a coll of options that are required


:restrict true gets a little tricky with —help. I guess I'd just need to add it explicitly to my spec.


What do you think about :require true to mean all options are required?


sounds legit


but this means you can't have any optional options... is that what you want?


Exactly. It's not always what people would want, but in my case, it's exactly what I want, and easier than listing things explicitly.


I'll file an issue and you can think about it some more. 🙂


The saga continues 😄 So i've made the video split functionality - works great BUT I need to upload it to s3 now 🙂 I am using

(aws/invoke s3-client
                 {:op :PutObject
                  :request {:Bucket bucket
                            :Key s3-key
                            :Body (io/file file-name)}})
but whenever i am using bigger files (example 2.5GB) i am getting this error
{:cognitect.anomalies/category :cognitect.anomalies/fault, {:via [{:type java.lang.OutOfMemoryError, :at [ hugeCapacity "" 125]}], :trace [[ hugeCapacity "" 125] [ grow "" 119] [ ensureCapacity "" 95] [ write "" 156] [$fn__11554 invokeStatic "io.clj" 307] [$fn__11554 invoke "io.clj" 302] [clojure.lang.MultiFn invoke "" 239] [$copy invokeStatic "io.clj" 406] [$copy doInvoke "io.clj" 391] [clojure.lang.RestFn invoke "" 425] [$input_stream__GT_byte_array invokeStatic "util.clj" 104] [$fn__9796 invokeStatic "util.clj" 137] [$fn__9796 invoke "util.clj" 129] [$fn__9781$G__9776__9786 invoke "util.clj" 126] [clojure.core$update invokeStatic "core.clj" 6185] [$send_request$fn__10551$state_machine__5843__auto____10578$fn__10580$fn__10594 invoke "client.clj" 99] [$send_request$fn__10551$state_machine__5843__auto____10578$fn__10580 invoke "client.clj" 96] [$send_request$fn__10551$state_machine__5843__auto____10578 invoke "client.clj" 84] [clojure.core.async.impl.ioc_macros$run_state_machine invokeStatic "ioc_macros.clj" 978] [clojure.core.async.impl.ioc_macros$run_state_machine_wrapped invokeStatic "ioc_macros.clj" 980] [clojure.core.async.impl.ioc_macros$take_BANG_$fn__5861 invoke "ioc_macros.clj" 989] [clojure.core.async.impl.channels.ManyToManyChannel$fn__684$fn__685 invoke "channels.clj" 99] [clojure.lang.AFn run "" 22] [java.util.concurrent.ThreadPoolExecutor runWorker "" 1128] [java.util.concurrent.ThreadPoolExecutor$Worker run "" 628] [clojure.core.async.impl.concurrent$counted_thread_factory$reify__587$fn__588 invoke "concurrent.clj" 29] [clojure.lang.AFn run "" 22] [java.lang.Thread run "" 829] [ threadStartRoutine "" 596] [ pthreadStartRoutine "" 192]]}}
How do i go around this? One way i can think of is using aws cli and not use pods at all but maybe i am doing something obviously wrong


Yeah you could shell out to the aws cli or use awyeah-api which is the aws lib ported to bb

👍 1
🙇 1

@U45SLGVHV Let me know how that goes


Hey i decided to go aws cli route because it offers me bit more options with syncing the bucket and folders + i can control concurrent options with it I didn't try awyeah-api unfortunately

👍 1