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
#1185 added source information to the exception using C++20 (#ifdef __cpp_lib_source_location). Now, it may not be desirable to have source file paths strings included in release builds.
Can a facility be added which allows a user to control whether winrt adds source location to the exception?
Maybe through a new configuration define? e.g.
#define WINRT_NO_SOURCE_LOCATION
That is a reasonable request and would probably not be difficult to add.
Out of curiosity what is your reason for wanting to suppress this information? Are you concerned about binary size? Or leaking source code information publicly? Or some other reason entirely? That doesn't change the reasonableness of the request but I am curious.
Also, do you have any thoughts on debug vs. release for including this information? Would you still want debug builds to include this?
Charles Milette (@sylveon) I agree with that. The default should be enabled and there is a define to disable it.
My previous question was unclear and not fully thought-through. What I meant was whether the "disable this feature" define should be respected in debug builds. After thinking about it more that probably doesn't make sense. If someone wants this disabled then it should be disabled. If they want it only for debug builds then they can just add or remove the define as appropriate.
David Machaj (@dmachaj) Primary for privacy reasons (the source tree structure shouldn't be public). In addition, it might also be interesting for reproducible builds.
/d1trimfile is probably worth looking into regardless, if you want reproducible builds. It will strip out the parts of the path prior to the root of your repo so it is consistent regardless of the directory structure above it.
Activity
kennykerr commentedon Jan 5, 2023
Adding David Machaj (@dmachaj) for comment.
dmachaj commentedon Jan 5, 2023
That is a reasonable request and would probably not be difficult to add.
Out of curiosity what is your reason for wanting to suppress this information? Are you concerned about binary size? Or leaking source code information publicly? Or some other reason entirely? That doesn't change the reasonableness of the request but I am curious.
Also, do you have any thoughts on debug vs. release for including this information? Would you still want debug builds to include this?
sylveon commentedon Jan 5, 2023
I still want this information in my release builds, so automatically disabling them in release should be avoided
dmachaj commentedon Jan 5, 2023
Charles Milette (@sylveon) I agree with that. The default should be enabled and there is a define to disable it.
My previous question was unclear and not fully thought-through. What I meant was whether the "disable this feature" define should be respected in debug builds. After thinking about it more that probably doesn't make sense. If someone wants this disabled then it should be disabled. If they want it only for debug builds then they can just add or remove the define as appropriate.
matbech commentedon Jan 5, 2023
David Machaj (@dmachaj) Primary for privacy reasons (the source tree structure shouldn't be public). In addition, it might also be interesting for reproducible builds.
sylveon commentedon Jan 5, 2023
In regards to reproducible builds, /d1trimfile also affects std::source_location
dmachaj commentedon Jan 5, 2023
/d1trimfileis probably worth looking into regardless, if you want reproducible builds. It will strip out the parts of the path prior to the root of your repo so it is consistent regardless of the directory structure above it.