Adding normalization to osx32, osx64, win32, and win64.#2
Conversation
Work to support changes in nwutils/nw-builder#117
|
😍 thanks! Correct me if I'm wrong here but... It should still be possible for a user to put just I guess it should be possible for a user to have this in their JSON (if they wanted): {
"a": 1,
"b": 2,
"platformOverrides": {
"win": {
"a": 2
},
"win64": {
"b": 64
}
}
}So then on Windows 32-bit, it would return Does that make sense? Also, when a platform is passed, |
|
Yeah, that makes sense, but I have no idea on how to accomplish that 😞 With this line and Users should still be able to pass in 'osx' or 'win', but it will get normalized to 'osx32' / 'osx64' or 'win32' / 'win64' based on the architecture they're running. (Which makes sense on auto detected platforms, but admittedly, might be a bit weird when building cross platform.) |
|
Also, consider the cases: and Should the 32/64 version always take precedence, or should the last one in the list take precedence? I think there's might be enough ambiguity there to justify making the json require either 32 or 64 to be in the platformOverride. Just a thought. |
Yeah I was thinking that logic would have to be re-written; auto-detection versus specifying a platform will be very different now.
This does seem weird. On auto-detection, nothing is passed but when a platform is passed (i.e. it is a different platform to the current one) then the architecture should never be detected. So yeah, maybe we should no longer accept
Order in the JSON file shouldn't matter and I think specifity should win always. So if you have: {
"a": 0,
"b": 1,
"platformOverrides": {
"win": {
"a": 100,
"b": 999
},
"win32": {
"b": 101
}
}
}Then on If you want, I can create a new branch for this and you can make a PR from your branch to that new branch. Then I can merge right away and we can work out the rest of the details, like re-working that logic. But I guess we might as well start with tests defining exactly what's expected. |
That sounds like a good idea. Let me know where to PR to. |
|
There's a new branch called 64-bit |
|
Closing in favor of PR #3 |
Here are the changes I made to get Several changes to help with adding 64bit support. #117 ready to (hopefully) be accepted: