Remove alternative token usage#1053
Conversation
|
Hello @antkmsft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
|
Though I agree that this change is good, can we please hold off on merging this until we have isolated and verified the root cause of the #1042 CI failure. If the use of I suspect the use of |
|
Otherwise, looks good. |
|
I want to understand why we used |
|
@Jinming-Hu , @katmsft introduced that line months ago, and it was fine until some recent MSVC update. |
|
@ahsonkhan , you asked not to merge, removed the auto-merge label 2 hours ago and later approved this 30 minutes ago. I am not sure if you are done with the investigations, so I am not merging this, please merge this PR if you are done. |
I agree that it wouldn't make a big difference. But I believe it's not a good habit to mix them (sometimes |
|
@Jinming-Hu , I agree, and I see no reason to use it, and it is better for consistency. I wouldn't block anyone's PR due to that, but I would leave my feedback. Even if not for fixing any issues, I see our code base better with this change than without it, so this is also why I want to check this in, but now I'm asking @ahsonkhan to ok if he is done with this investigations, since he requested to hold off this for a moment. |
That's great! |
Apologies for the mixed signal. I will be more clear next time :)
I will merge it once the investigation is complete and post an update here. It will likely be tomorrow because I wanted to isolate exactly which JSON version triggers the issue (whether it is 3.9.0 or 3.9.1). Thanks for double checking and waiting. |
|
@antkmsft merge away :) |
|
For the context, @vhvb1989 has located the change, it is nlohmann/json@8d29523, and the issue that explains the situation in detail: nlohmann/json#2089 |
CI/CD sometimes fails, and MSVC build now fails on some of our personal machines with the latest updates.
#1042 currently fails due to this.
I think it has to do with the compiler version update.
andshouldn't be used anyway - it is an alternative operator, that is intended to be used on the old systems with 7-bit char that don't have good representation for the&character.https://en.cppreference.com/w/cpp/language/operator_alternative
I think the reason it worked is that it was available in older MSVC versions, but now you must use some sort of a compiler switch in order to make it available.
Other possible explanation, which I hope is not the case, is that someone (us or 3rd party library) has defined "and" as macro, and now it can be substituted by something random, but I don't think it is the case.
Anyways, this change goes in, we compile successfully everywhere.