Copy link to clipboard
Copied
In our development environment, we've started testing and deploying new code with CF2025.
However, our CI/CD is based on CF2023, as it's still in our production environments.
We've had a compilation error in our pipelines, which I'll summarize here:
<cfscript>
s = {
key1 = 1,
}
writeDump(s);
</cfscript>
On CF2025: no reports
On CF2023 (or all other previous versions): an "Invalid CFML construct found" exception is received
In my opinion, the exception reporting handled so far in CF2023 is correct and is a bug to report in CF2025.
In your opinion, is it right or wrong?
@Paolo Olocco I have just noticed that it was an intentional change in ColdFusion 2025:
https://helpx.adobe.com/coldfusion/using/whats-new.html
https://coldfusion.adobe.com/2025/03/trailing-commas-in-coldfusion/
The release documentation reads, "Trailing comma on last element in arrays: In previous versions, ColdFusion threw an error 500 when it encounters a trailing comma in certain code blocks. In the 2025 release of ColdFusion, you can add a trailing comma when creating arrays, structs, fun
...Copy link to clipboard
Copied
I agree with you. Like you, I think it's a bug in ColkdFusion 2025. You should report it.
Copy link to clipboard
Copied
This is absolutely _not_ a bug and is a QOL improvement - one JavaScript has as well. It lets you write code simpler, add and remove keys w/o worrying if you 'closed' off the final comma.
Copy link to clipboard
Copied
I have filed a bug ticket: https://tracker.adobe.com/#/view/CF-4229152
<cfscript>
testStruct = {"key1" = 1, };
testArray = ["item1", ];
writeDump(var=testStruct, label="Test Struct");
writeDump(var=testArray, label="Test Array");
</cfscript>
Copy link to clipboard
Copied
@Paolo Olocco I have just noticed that it was an intentional change in ColdFusion 2025:
https://helpx.adobe.com/coldfusion/using/whats-new.html
https://coldfusion.adobe.com/2025/03/trailing-commas-in-coldfusion/
The release documentation reads, "Trailing comma on last element in arrays: In previous versions, ColdFusion threw an error 500 when it encounters a trailing comma in certain code blocks. In the 2025 release of ColdFusion, you can add a trailing comma when creating arrays, structs, functions, parameters, and array/struct destructuring."
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more