Odd warnings found in 'Script Analysis'

Well, I encountered this weird bug after I was checking script analysis today, when I was scripting around my local save file.

A sudden 541 warnings in Studio.

Screenshot of the script analysis tab

Does not affect anything at all, encountered it after 23:30 CEST. Can someone look it up what these random warnings are?

Repro
  • Step 1, open Studio.
  • Step 2, open random place file.
  • Step 3, check script analysis.

Reproduction is too easy; this can be done on any place, even new ones. Read below.

Repro is easy, access any place except ones with TC on. Regardless how many times I reopen them, there are always 541 warnings. There’s no need to send in a specific file, because the bug is kind of everywhere.

I don’t think this is anything critical, but it is annoying to find 541 warnings popping up on the analysis. Yikes.

Oh, by the way, anyone can reproduce this on a Windows OS? I’m on a MacOS.

2 Likes

I’m having this exact issue, also on macOs.

This bug appears to occur on all operating systems as I have just run into it on Windows 8.1.

Roact is a UI library, and based on the context, it looks like it’s being used in a plugin. Appears Roact does naughty stuff like modifying the script environment from another module instead of using Roact.it(...) / Roact.expect(...) :(

https://github.com/Roblox/roact/blob/master/lib/init.spec.lua

local Roact = require(script.Parent)

it("should load with all public APIs", function()
	local publicApi = {
		...
	}

	expect(Roact).to.be.ok()
	
	...
)

@LPGhatguy

This is a known issue, and I think the fix just missed the release window. I’ll talk to some people internally about getting a Studio update pushed to resolve this sooner than next week.

This isn’t from Roact itself, but it’s a side effect of the migration we’ve been doing in trying to formalize our core script process internally.

We use a project called TestEZ at Roblox to run our tests, which does environment injection for writing BDD-style unit tests. It’s modeled after Busted (Lua), and Mocha (JS), which are designed to reduce boilerplate.

There are two things we didn’t intend that happened here:

  • Script analysis was not supposed to run on any members of CorePackages, which is a core script-only service and not visible in Roblox Studio at all
  • Unit tests (.spec modules) were not intended to ship with production builds of Roblox Studio.

We’re hoping to fix both of these problems ASAP. They slipped by my team (which caused this problem) and the adjacent teams because we tend to have the script analysis windows collapsed. For core script development, we use script analysis as a submission gate against non-spec files, but use Luacheck for day-to-day linting, which is configured to correctly recognize the variables that TestEZ injects.

Sorry for the disruption! I’ll post an update as to ETA for a fix after I find out more from the other teams involved.

7 Likes

I got an update after talking with the managers for Roblox Studio!

The current bug should only affect MacOS users. Because the way that we ship content files is different between MacOS and Windows, Roblox Studio on Windows should not be affected by this bug now or in the future.

The next Studio release early next week should have a fix, along with guards to help make sure we don’t regress and introduce this problem again later.

I’ve run into this bug recently, and my operating system is Windows 8.1.

Windows 10:

Hopefully you guys get this cleared up; it keeps freaking me out thinking it’s my code.

My OS is Windows 7, and these errors started popping up again within the last few days.

Darn. This is sort of exasperated by the fact that we skipped a release because of the 4th of July holiday!

As a workaround in the short term, you can go into your Roblox Studio install folder, and delete the content/LuaPackages folder. That should work until we ship the new version of Roblox Studio and enable the fix. It also shouldn’t break anything.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.