Skip to content

[dont merge] support both apigw and alb events as http::{Request,Response} (cargo features) #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

softprops
Copy link
Contributor

@softprops softprops commented Dec 29, 2018

Issue #, if available:

Description of changes:

bizzaro branch off of #64 with cargo feature flag toggles for conditional compilation

Have not checked the documentation checkbox yet because Im not sure this will look like the end state

By submitting this pull request

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.

@softprops softprops changed the title support both apigw and alb events as http::{Request,Response} (cargo features) [dont merge] support both apigw and alb events as http::{Request,Response} (cargo features) Dec 29, 2018
}

/// ALB request context
#[cfg(all(feature = "alb", not(all(feature = "apigw", feature = "alb"))))]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL learned cfg attrs are like a smaller dialect of lisp!

@@ -30,3 +30,8 @@ serde_urlencoded = "0.5"
[dev-dependencies]
log = "^0.4"
simple_logger = "^1"

[features]
default = ['apigw', 'alb']
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

big drawback here. if a consumer sets default-flags to false you'll get neither apigw nor alb! I don't think there's a way to express "there can be at least one!" in cargo

@softprops
Copy link
Contributor Author

gonna fix up these merge conflicts...

@softprops
Copy link
Contributor Author

with the 0.2 release looming what do you think about fold on this for now until we find its actually useful to enable feature flagging these. it seems the cost of maintenance added may not be worth the benefit. I'm kind of curious about hearing if this is an actual pain point before investing in an ointment to relieve it. Thoughts?

@davidbarsky
Copy link
Contributor

I'm kind of curious about hearing if this is an actual pain point before investing in an ointment to relieve it. Thoughts?

I think that's a good point. Feature flagging it seems cleaner, but it might not be worth the complexity.

@softprops
Copy link
Contributor Author

Cool. I'll let you folks make the call. I'd be fine to close this with commitment to revisit this if there's demand for it

@softprops
Copy link
Contributor Author

I havent seen any demand for this so I'm gonna close this for now to make sure the pull queue is only populated with pulls that spark joy

@softprops softprops closed this Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants