Native Code Generation warning message inconsistency and confusion - supported devices give no warning if it chose not to compile as NCG

Description

Someone told me in analytics they saw a warning once on a user that said:

Native code generation of script =SCRIPT failed: Native code generation is not supported on this device.

This was on the client and gave the impression that Native Code Generation would be enabled on the client.

Now, I am not getting any kind of warning or anything. And NCG works for me in Studio on the Client. But not on the Roblox Client, yet there’s no warning.

 

There’s also rumours that apparently NCG would be enabled on Android and nothing else or something. I checked in the LuauHeap and I don’t see [native] on the Client only on the Server.

In Studio I do see it though.

 

The issue now is this Warning message

Native code generation of script =SCRIPT failed: Native code generation is not supported on this device.

If this warning message exists, it could be implying that NCG might be enabled on the client, and for everyone that doesn’t receive this warning, it makes developers assume that other clients have their NCG working on the client. But that is wrong, because I don’t see NCG on my client and there’s no warning.

Because the truth is my device supports NCG because it works in Studio. Maybe, it won’t show the warning if it actually doesn’t support it.

But this causes an issue with consistency and makes people go in PVP with arguments about “Is NCG enabled on client or not”. “BUT why do some people get the warning message???”

Re-production Steps

Create --!native, put one function in it as well, and run it on repeat so you can look for <native> and [native] in F9.

Expected Result

Per game, if there’s the attempt to do native compilation on any script, where the Roblox Client chooses NOT to compile it as NCG. It should throw a one-time warning that says something like:

Native code generation on client-script was ignored.

And then if someone ever experiences lag or similar in a game, where a developer asks if they see this warning or not. They can confirm whether NCG is ACTUALLY enabled or not.

A private message is associated with this bug report

Actual Result

For something, it turns out NCG solves a performance issue, while without NCG it didn’t. However, figuring out whether it is a NCG issue or if the CPU is not good enough is too difficult without something like LuauHeap, because there’s no indication whether NCG is enabled or not.

Maybe on the MicroProfiler, but if it runs in Parallel, then probably it might as well not.

It could be even a SHIFT + F1 combo thing. But there needs to be an indication or a solution to this issue.