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

Web: Fix editor build after #pragma once refactoring #104406

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Mar 20, 2025

#102298 inadvertently broke the web editor build (which we don't test on CI), due to this weird setup for WebToolsEditorPlugin:

#ifndef WEB_TOOLS_EDITOR_PLUGIN
#define WEB_TOOLS_EDITOR_PLUGIN

#include "core/io/zip_io.h"
#include "editor/plugins/editor_plugin.h"

class WebToolsEditorPlugin : public EditorPlugin {
	GDCLASS(WebToolsEditorPlugin, EditorPlugin);

private:
	void _download_zip();

public:
	static void initialize();

	WebToolsEditorPlugin();
};

#else

class WebToolsEditorPlugin {
public:
	static void initialize() {}
};

#endif

While replacing the header guard we missed the weird #else clause here.

This #else seems to be a bug after a past refactor, as the original class @Faless added in c54de7f actually had this condition: #if defined(TOOLS_ENABLED) && defined(JAVASCRIPT_ENABLED).

The condition was removed when refactoring how this file gets compiled via SCons so it's properly editor-only anyway, but the #else wasn't removed.

@akien-mga akien-mga requested a review from a team as a code owner March 20, 2025 17:48
Copy link
Contributor

@Repiteo Repiteo left a comment

Choose a reason for hiding this comment

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

Beat me to the punch

@akien-mga
Copy link
Member Author

akien-mga commented Mar 20, 2025

For the record, we're merging this nominally for 4.5-dev2, but we're technically hotfixing the 4.5-dev1 source (based off 97241ff) with this to fix the web builds specifically. Other 4.5-dev1 builds are made from 97241ff.

@akien-mga akien-mga merged commit ae45510 into godotengine:master Mar 21, 2025
20 checks passed
@akien-mga akien-mga deleted the web-editor-build-fix branch March 21, 2025 12:06
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.

3 participants