we're in process of 2018 -> 2021 and I'm wonder...
# adobe
m
we're in process of 2018 -> 2021 and I'm wondering if this is a feature or a bug: 2018
Copy code
a = {}
a.b.c = 1
writedump(serializeJSON(a)) // {"B":{"C":1}}
2021
Copy code
a = {}
a.b.c = 1
writedump(serializeJSON(a)) // {"b":{"C":1}}
m
Interesting... on mine it is not lowcased
neither is it that way on TryCF
m
ooh. hrm...
m
this setting on perhaps?
m
lemme see what update version our docker image is using
m
image.png
m
I'll πŸ‘€ that as well
I'm on 2021.0.05.330109 and have that checkbox unchecked in cfadmin
this is what I get on trycf.com
for 2021
and for 2018 I get
(note: I wrote out the output as a comment by hand and wrote it wrong at first. I've edited the OP to be the actual output)
@Mark Takata (Adobe) were you seeing it be upper-cased on trycf.com with the 2021 engine? It looks like the default engine they have selected is Lucee
m
oh, shoot I was looking at the wrong letter. Yes, you're right, it is low casing that first b
In 2023 it is uppercase
double u tee eff
m
ok. should I log a bug for it for 2021?
m
one sec, let me try something
m
k
m
OK yes, this is a bug. Please file and let me know the tracker number, I'll highlight it as this is a really annoying one and clearly has been regressed for 2023
m
I think the root of it is supporting side effects in the expression on the left-hand side of the assignment operator. fwiw πŸ™‚
k, will do
"has been regressed for 2023" - so is it broken still there or fixed there?
m
sorry, it is the same in 2023 as in 2018
m
oh, gotcha. ok, cool.
m
So depending on the intent it either "broke again" or "got fixed" lol
In either case, inconsistent behavior across versions gives me heartburn πŸ˜„
m
yeah ❀️‍πŸ”₯ πŸ™‚
fortunately we have some runway before we roll 2021 out to prod, but we also have around 1k instances of either calling serializeJSON directly, or passing a struct of not-easily-determined composition to ColdBox's renderData function to be serialized internally. as of right now, we're going to have to trace the pedigree of each of those instances and identify any use of the implicit struct creation feature and make it explicit.
thanks for looking into it πŸ‘
m
OK upvoted it and sent to the lead dev with additional information about behavior in 2023 πŸ™‚
πŸŽ‰ 1
πŸ₯“ 1
m
I don't know if you have access to edit the description on the bug. I realized that when I pasted it in, it picked up some unwanted {code:java} bidniss and the tracker system won't let the reporter modify the text once it's been submitted πŸ€¦β€β™‚οΈ
m
OK, so just so you're aware, I sent this to the lead engineer and he 100% was not only able to reproduce the issue, but is seems that the issue is bigger than what you found. This has been put in the stack on priority for a fix to be released with the next 2021 update. Amusingly, somehow, this bug does not show up in the 2023 code, and they are investigating which library got fixed lol. Thank you for finding this!
πŸ‘ 2
m
ah - good to know. Thanks for helping out with this.
be interesting to see at what point it broke. git blame, then give the developer a good noogie! Totally kidding, btw. (as if I've never broken anything πŸ˜† )
❀️ 1
Oh, actually I think I didn’t include the odd text to begin with. But in the web ui it’s showing as plain text
Dunno. I’m sure we share the same opinion about tracker.adobe.com πŸ˜‚
m
@mithlond Are you still waiting on this fix too?
m
For now, we've been working around it by modifying the code to explicitly define all keys whenever we run into the bug. It was a blocker for us moving from 2018 to 2021, but I don't know if a release has been issued that includes the build the bug is marked as fixed in. So, I'm not sure if I'm waiting on it or not (others at our org manage when we update).
m
@mithlond Dunno if you saw the new comments, but it looks like https://tracker.adobe.com/#/view/CF-4217130 will be fixed in the next bug fix update for CF2021. Let's hope. 🀞
❀️ 1
πŸŽ‰ 1