Issue Type: Other
Date First Experienced: 2020-11-19 12:11:00 (-07:00)
Date Last Experienced: 2021-03-01 00:03:00 (-07:00)
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.
I expect there to be no warnings in my script analysis
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:
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.