You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Feature
Programmatic identification of conftest nodes.
Much like the issue reported in #3625, several of our tools work by interposing on emitters or scanners of existing builders. In some cases, the work we want to perform is inappropriate for conftests, either because of the special environment in which they execute, or because the injected behavior is inappropriate for conftests.
For now, we need to do something ugly like
if not "conftest" in str(target[0):
# Do stuff to non-conftest nodes
which is unpleasant and far from foolproof. We think it would be better if there were an attribute or method on Node that would allow us to identify conftest-related nodes directly. Ideally, we could write something better, like:
if not target[0].is_conftest():
# Do stuff to non-conftest nodes
Alternatively:
if not getattr(target[0].attributes, "is_scons_conftest", False):
# Do stuff to non-conftest nodes
Would it be possible to adorn all nodes used by the SConf subsystem this way? It would make it much easier to handle such nodes differently when required, without needing to worry that someone is going to introduce a file called "conftest.cpp" next year when they want to write a test for some configuration, not knowing that that name has special meaning to SCons and our tools.
Describe the Feature
Programmatic identification of conftest nodes.
Much like the issue reported in #3625, several of our tools work by interposing on emitters or scanners of existing builders. In some cases, the work we want to perform is inappropriate for conftests, either because of the special environment in which they execute, or because the injected behavior is inappropriate for conftests.
For now, we need to do something ugly like
which is unpleasant and far from foolproof. We think it would be better if there were an attribute or method on Node that would allow us to identify conftest-related nodes directly. Ideally, we could write something better, like:
Alternatively:
Would it be possible to adorn all nodes used by the SConf subsystem this way? It would make it much easier to handle such nodes differently when required, without needing to worry that someone is going to introduce a file called "conftest.cpp" next year when they want to write a test for some configuration, not knowing that that name has special meaning to SCons and our tools.
Required information
https://pairlist4.pair.net/pipermail/scons-users/2020-April/008072.html
The text was updated successfully, but these errors were encountered: