FPL Engine Update: Strict Mode
The FPLv2 engine now follows JavaScript strict-mode grammar. Boolean expressions short-circuit, and assigning to a variable that was never declared fails validation. Processors in the Fluency repository are already updated; processors written or edited on your own instance may need a one-line fix. The release also splits egress statistics between EventWatch and the data lake.
Changes
Short-circuit evaluation
&& and || stop at the first operand that decides the result. A guard such as this now returns false when a is null or undefined, where the previous engine raised an error:
if a && a.b {
// runs only when a exists and a.b is truthy
}
Undeclared assignments are rejected
The previous engine accepted an assignment to a variable that had not been declared, such as a = 1. That now fails validation. Declare the variable before using it:
let a = 1
Engine fixes
- Several engine bugs are fixed.
Egress statistics
- Egress counters report events sent to EventWatch and events sent to the data lake separately. These are the figures used for billing.
What you need to do
- Fluency-provided processors need no action. Every FPLv2 processor in the Fluency repository has been updated.
- Processors created or edited on your instance should be checked. Open each one on the Processors page and choose Validate. If it fails, add
let(orconst) to the first assignment of the variable named in the error.
See the FPL reference.