Script analysis spammed with "Unknown require" warnings when using --!strict or --!nonstrict mode in Team Create

Issue Type: Other
Impact: Moderate
Frequency: Constantly
Date First Experienced: 2020-11-19 12:11:00 (-07:00)
Date Last Experienced: 2021-03-01 00:03:00 (-07:00)

Reproduction Steps:
This bug has been pretty long-standing, and I thought I’d make a dedicated bug report at this point, because it’s the reason why I no longer use strict or even nonstrict mode in my games’ code.

Whenever you use typed luau code with strict mode on in a fairly large codebase of modules requiring each other, you will begin to run into an issue where joining a Team Create server will stream in some instances after type analysis on the place’s scripts has begun. This leads to a race condition that spams the script analysis with “Unknown require” warnings, which immediately disappear when you open the module emitting these warnings.

They either look like “Unknown Require: (some number)” or “Unknown Require (path to module)”

Here is a team create place that uses stripped-down code from my codebase in a module style, with some extra stuff thrown in, in an attempt to simulate what happens when you try to scale typed luau in a team create codebase:
UnknownRequireRepro.rbxl (49.3 KB)
I have also uploaded it to a team create place, although I may replace the contents of this place later on:

Note that this repro might not show the issue on your device/internet; it seems to be inconsistent and based on a race condition. The issue scales with the size of your codebase/number of modules using strict mode and requiring other modules.

Expected Behavior:
I expect there to be no warnings in my script analysis

Actual Behavior:
Warnings like these show up whenever I re-join the team create, or even just after I run a Play Solo (F5) test and stop it:

These warnings disappear when you double-click the warning in script analysis to open the module:

Workaround:
A) Not using team create (not an option for me)
B) Turning --!nocheck on for every single one of my modules that should be strict mode and use type syntax.
C) Keeping off strict mode but allowing this to slow down my workflow by going through the pain of opening upwards of 30 ModuleScripts every time I re-open team create or go back to programming after I run a play solo test.

5 Likes

Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

4 Likes

I’m now very consistently getting ~75 unknown requires every single time I open team create.

image

This slows down my workflow immeasurably, and I’m considering going back to turning all of my modules on --!nocheck just to work around this.

1 Like

Hi DataBrain,

Thanks for updating this. Would you try to turn on Script Editor Linter beta feature? The original issue should’ve been fixed in beta feature.

2 Likes