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

Godot 4.3 beta 1 Parser Errors that don't appear in Godot 4.2.2 #92780

Closed
svendixon opened this issue Jun 5, 2024 · 3 comments · Fixed by #93346
Closed

Godot 4.3 beta 1 Parser Errors that don't appear in Godot 4.2.2 #92780

svendixon opened this issue Jun 5, 2024 · 3 comments · Fixed by #93346

Comments

@svendixon
Copy link

svendixon commented Jun 5, 2024

Tested versions

Godot 4.3 beta 1

System information

Windows 11, Vulkan, GTX 980 Ti (545.84)

Issue description

An autoload "PreloadedScenes.gd" that preloads a scene "some_node.tscn".

extends Node
const SOME_NODE := preload("res://some_node.tscn")

"some_node.tscn" has an attached script with a custom class name and var of type "Game" which is another custom class name for the game scene.

class_name SomeNode
extends Node
var game : Game

The game scene instantiates "some_node". Gives the error: Parser Error: Could not resolve member "SOME_NODE".

class_name Game
extends Node2D
var some_node := PreloadedScenes.SOME_NODE.instantiate() as SomeNode

Even when preloading it directly, it gives the error: Parser Error: Could not preload resource file "res://some_node.tscn".

class_name Game
extends Node2D
var some_node := preload("res://some_node.tscn").instantiate() as SomeNode

I'm not an experienced programmer so I'm unsure what is happening here. I assume this is a cyclic reference problem that Godot 4.2.2 was able to deal with but Godot 4.3 beta 1 no longer can?

Steps to reproduce

Open the minimal reproduction project and run it.

If you open it in 4.2.2, it will run. If you open it in 4.3 beta 1, it will error.

Minimal reproduction project (MRP)

SomeNode.zip

@matheusmdx
Copy link
Contributor

matheusmdx commented Jun 16, 2024

Reverting #85501 on latest master [71699e0] fixes the problem, also this looks similar to #90954 and pr #92326 fixes #90954 but doesn't fix this issue

@akien-mga akien-mga moved this from Unassessed to Release Blocker in 4.x Release Blockers Jun 16, 2024
@anniryynanen
Copy link
Contributor

This looks fun, I'll see if I can do something about it.

@anniryynanen
Copy link
Contributor

#93346 fixes this, the error doesn't happen in v4.3.beta.gh-93346 [c5b5b90df].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Release Blocker
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants