softprops / serverless-rust

⚡ 🦀 a serverless framework plugin for rustlang applications
https://www.npmjs.com/package/serverless-rust
MIT License
548 stars 82 forks source link

allow for explicitly turning on debuginfo for builds #59

Open maxcountryman opened 5 years ago

maxcountryman commented 5 years ago

What did you implement:

This patch creates an explicit interface for setting DEBUGINFO on Docker run invocations. To do so, one simply specifies debugInfo under the rust section of their custom section of the Serverless config.

Closes: #49

How did you verify your change:

Manual testing.

What (if anything) would need to be called out in the CHANGELOG for the next release:

maxcountryman commented 4 years ago

@softprops any thoughts on this?

maxcountryman commented 4 years ago

@softprops I can update this if you’d be interested in merging—right now we’re using a fork in order to get reasonable error logging in prod.

softprops commented 4 years ago

Have at it. I wanted to get that last release out there to start testing local builds quickly

You'll notice a few changes to the test setup. Namely there are unit tests! If possible try to see the structure for that and see if it is possible to add a unit test for this change.

softprops commented 4 years ago

I'll roll this change into the next release which can happen as soon as you like

maxcountryman commented 4 years ago

@softprops I think this is ready for another look.

maxcountryman commented 4 years ago

@softprops is this still something you want to merge and release? We'll continue using our branch for now, but would love to switch back at some point. 🙂

softprops commented 4 years ago

question. Does it make it any easier to accomplish this with the new dockerless option?

maxcountryman commented 4 years ago

Local builds don't require this but that may not be an option depending on your build pipeline. For when it's not an option, this is necessary if you want debug info. (We do. 🙂)

softprops commented 4 years ago

I totally get that. What I'm trying to gain a sense of is how nesessary docker builds are now that host configured builds ar exposed.

Here's a snippet of the set of of a build pipeline dependencies with GitHub actions

https://github.com/softprops/serverless-rust/blob/d7d12a644b855f69e1eb3dd0bf240d3d04f23bef/.github/workflows/main.yml#L38

maxcountryman commented 4 years ago

What I'm trying to gain a sense of is how nesessary docker builds are now that host configured builds ar exposed.

This feels orthogonal to this patch; we aren't able to use local builds if that's helpful (various issues with OpenSSL and musl, for instance).