I’m currently scoping out code to adapt to the ImplicitScopes changes introduced in CF2021 and CF2023. However, I’ve encountered an issue: when invoking methods within a CFC file—where the component path is explicitly specified—I get a peculiar recursion error. This error drives the CPU usage up to 300% and ultimately necessitates restarting ColdFusion. Is this issue a bug - no longer being able to explicitly define the component path within the component itself?
s
seancorfield
04/08/2024, 2:36 AM
Hmm, I didn't know you could even specify a filesystem path like that...
You do know that creates a completely new instance of the CFC, invokes the method on it, and throws it away, right?
(whereas the first one just calls the method in the current instance)
seancorfield
04/08/2024, 2:37 AM
Also, why use
cfinvoke
at all???
Copy code
<cfset usersInitReturn = usersInit()>
j
jakobward
04/08/2024, 2:41 AM
No, I hadn't realized that using the 'component' attribute behaves differently. I use
cfinvoke
to keep the code standardized for later automated analysis.