-
Notifications
You must be signed in to change notification settings - Fork 104
Allow empty string value for xcschemes.env_value #3165
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
base: main
Are you sure you want to change the base?
Allow empty string value for xcschemes.env_value #3165
Conversation
@ghugues I think you need to sign off the commit. |
Signed-off-by: Guillaume Hugues <guillaume@amo.co>
0586254
to
7e98584
Compare
@@ -1142,7 +1142,7 @@ def _env_value(value, *, enabled = True): | |||
checked in the scheme. An unchecked checkbox means Xcode won't | |||
include that environment variable when running a target. | |||
""" | |||
if not value: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to adjust the tests for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was not covered by unit tests so I add added a new suite with a couple tests. Let me know if this is what you had in mind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brentleyjones quick reminder.
Signed-off-by: Guillaume Hugues <guillaume@amo.co>
371e243
to
a8a9bf5
Compare
@@ -2,13 +2,16 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") | |||
load(":info_constructors_tests.bzl", "info_constructors_test_suite") | |||
load(":infos_from_json_tests.bzl", "infos_from_json_test_suite") | |||
load(":write_schemes_tests.bzl", "write_schemes_test_suite") | |||
load(":xcschemes_base_tests.bzl", "xcschemes_base_test_suite") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"base" isn't a good name for this, and xcschemes_
is redundant (we are in the xcschemes
package).
Xcode allows defining environment variables without a value. At runtime, sometimes only the presence of the environment variable is checked, not its value (e.g.
CG_NUMERICS_SHOW_BACKTRACE
,CGBITMAP_CONTEXT_LOG_ERRORS
, etc.).