Native Luau variable assignment is broken

Somehow, local variables are sometimes not set under --!native, I had this to occur with the spr module with this setup:

local spr = require(game.ReplicatedStorage.spr)

local a = {
	progress = CFrame.new()
} 

spr.target(a, .5, 1, {
	progress = CFrame.new(50,50,50)
})

The print from spr is this:

local j = sin(dt * f * c)

print(dt, f, c, sin(dt * f * c), j)

In the image you can see that j is nil, but the result of sin(dt * f * c) is not
Removing --!native from the module appears to stop the issue

Repro file: NativeLuauVariablesRepro.rbxl (70.9 KB)

This only started occurring today, and was not an issue prior to today

3 Likes

My studio plugins are somehow also affected.

A short non-elaborate code sample of what’s happening

--!native
local offset = 74
local newOffset = offset + 3

print(offset) -- 74
print(newOffset) -- nil

Hi, this bug is also affecting our experiences. Without pushing an update, mobile users (specifically android users) began reporting bugs with console spam full of spr errors that match exactly what OP has posted. Our game uses spr as a dependency heavily and everything is broken as a result of android devices not supporting native codegen, as shown by this warning/error from my game’s Error Reports analytics tab:

The affected experience in question:

Thank you for the reports, the issue should be fixed soon.

Thank you for the report. We have just reverted the change that we believe is responsible for this so it should be resolved shortly.

3 Likes

I can confirm that I am no longer getting errors related to this. Thanks!

1 Like

Glad to hear it! If you do see further issues it may be a side-effect of old servers that haven’t updated yet. You can resolve this by shutting them down, or waiting for them to naturally be phased out. Thanks!