Type checker cannot resolve `require` paths

Reproduction Steps

I don’t actually have a minimal repro, sadly.

I loaded up a project of mine (saved to disk) which contains about 300 ModuleScripts. At first, I saw ~500 warnings in the script analysis window. I opened up the first one to get a sense of it, and it was angry about a require path being unresolvable. I fussed around with it to see if I could make it happy. Eventually, I deleted the target of the require statement & re-added it. This made the warning go away. By opening every other warning, I forced the script to re-evaluate the types & the warnings started to disappear.

So, it seems like there’s something fishy with the type checker performing analysis before all the module scripts were loaded.

Expected Behavior

The type checker can find the targets of the require statements.

Actual Behavior

The type checker barfs & thinks a particular ModuleScript doesn’t exist.

Workaround

Yeah, cut & paste the module script.

Issue Area: Studio
Issue Type: Other
Impact: Moderate
Frequency: Often
Date First Experienced: 2022-10-11 00:10:00 (-04:00)

2 Likes

Thank you or the report.
We have made a small update to Roblox Studio configuration, can you test again to see if you still have this issue?

1 Like

Yep, seems to be gone.

Thank you! that was a very annoying routine to have to go through every time I rebooted studio. It normally wouldn’t be that bad, but I had object values pointing to the module script, so they were getting confused.

For extra context, do you use Roblox Studio on Mac or Windows?

Windows. Also, damn you minimum post length…