Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing something in StarterPlayerScripts from StarterCharacterScripts causes infinite yield #2481

Open
Dionysusnu opened this issue Sep 27, 2023 · 1 comment

Comments

@Dionysusnu
Copy link
Contributor

// src/character/b.client.ts
import { A } from "client/a";

a(2);
// src/client/a.ts
function a(i: number) {}
// default.project.json as from the game template, with the following addition
"StarterPlayerScripts": {
	"$className": "StarterPlayerScripts",
	"TS": {
		"$path": "out/client"
	}
},
// start add
"StarterCharacterScripts": {
	"$className": "StarterCharacterScripts",
	"TS": {
		"$path": "out/character"
	}
}
// end add

At runtime, this hangs forever with Infinite yield possible on Workspace:WaitForChild("StarterPlayerScripts")

It would be cool to support this by starting from game.Players.LocalPlayer, but if not then we should change the compiler to consider StarterPlayerScripts an isolated container that can't be imported from other locations.

@osyrisrblx
Copy link
Member

Semi-fixed by roblox-ts/rojo-resolver#374

Still up in the air if we want to special case StarterPlayer.StarterPlayerScripts imports..

@roblox-ts roblox-ts deleted a comment from LovreDev Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants