Closed Veetaha closed 4 years ago
Oh good call. In hindsight, this probably should have been implemented this way when BIN was introduced. Thanks!
@softprops
Hmm, that's strange, but my travis build of this PR has timed out https://travis-ci.com/github/Veetaha/lambda-rust/builds/173146646 And indeed it seems to hang when running locally, it's hard to tell what's going on....
I may be mistaken, but rm
command in tests might be waiting for stdin (are you sure you want to remove write-protected file
or something)
I'm take a closer look but I may not have time this weekend
In my case I have a huge cargo workspace, some of its crates use platform-specific build scripts and dependencies and that are (A) very long to compile and (B) are impossible to compile using raw
lambci
image due to the lack of someC
libraries.My solution is to pass
--bin $BIN
flag tocargo build
to prevent it from building the entire workspace and just compile only the crate with the lambda if$BIN
is not an empty string.As my current temporary workaround for this, I use to pass both options
BIN=<lambda_binary_name> CARGO_FLAGS=--bin <lambda_binary_name>
, which is not horrible, but a bit inconvenient in terms of violating DRY. Anyway, I'd like to upstream the behaviour I proposed