Skip to content
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

Create "feature flag" for if conditional removal. #14555

Closed
nathanhammond opened this issue Oct 30, 2016 · 4 comments
Closed

Create "feature flag" for if conditional removal. #14555

nathanhammond opened this issue Oct 30, 2016 · 4 comments

Comments

@nathanhammond
Copy link
Member

Currently in order to improve some of our error messages like in #14554 we pay a double cost in order to leverage runInDebug. In some future state we should be able to use a "feature flag" which allows us to strip things without needing to call it twice and so we can leave the code run in context. That would look something like this:

if (isDebugBuild()) {
  // Do the useful debug thing, probably including try/catch.
} else {
  // Do the performant thing.
}

Do we wish to add a "feature flag" like this? Related though to if (testing) , it is a tremendous way to accidentally troll ourselves.

/cc @krisselden @rwjblue

@locks
Copy link
Contributor

locks commented Nov 1, 2016

@nathanhammond I wonder if this should go through the RFC process instead?

@nathanhammond nathanhammond changed the title Create "feature flag" for Create "feature flag" for if conditional removal. Nov 1, 2016
@nathanhammond
Copy link
Member Author

The thing is we could simply create a new feature flag in a single line of code, this is almost more of a question of "if we want to do it."

@Turbo87
Copy link
Member

Turbo87 commented Dec 30, 2017

I think this has been implemented by now, right?

@chancancode
Copy link
Member

Yep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants