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

Don't attempt to re-import broken files if they didn't change #94357

Merged

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Jul 14, 2024

Fixes #62271

_reimport_file() had code that was able to handle invalid imports (it even explicitly writes valid=false to file), but that code was unused, because the method failed early in case of error. This PR moves the fail line to the bottom of the method, so user is notified about failed import, but the .import file and modified times are written normally.

Moreover, I removed code that attempts to re-import when .import file is invalid. This is no longer necessary after #84974. Reimport will be automatically attempted if .import file has changed, so no reason to force it when the file will stay invalid anyway (see above case).

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This has been such a pain point for years.

@akien-mga akien-mga merged commit 4d97269 into godotengine:master Jul 17, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the your_file_is_broken._just_saying branch July 17, 2024 14:00
@ttencate
Copy link
Contributor

Does this also fix #90980?

@akien-mga
Copy link
Member

Does this also fix #90980?

Tested, seems so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken imports result in endless reimports making the editor unusable
3 participants