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

Error with Iterator Patch #155

Open
bytewife opened this issue Apr 30, 2021 · 6 comments
Open

Error with Iterator Patch #155

bytewife opened this issue Apr 30, 2021 · 6 comments
Labels
bug Something isn't working good first issue Good for newcomers topic:build

Comments

@bytewife
Copy link

There's an error when applying the iterator patch on commits recommended commits 81fc9fa1dc9162cb50e77ab5f7d7085eb3c4bc9e
28f56e2cbf03a164741f2eade17f9515f887482c

Here's the log for 81fc9fa1dc9162cb50e77ab5f7d7085eb3c4bc9e

git apply modules/godex/patches/add_custom_iterator.patch --reject --ignore-space-change --ignore-whitespace
Checking patch SConstruct...
Hunk #1 succeeded at 581 (offset 38 lines).
Checking patch core/config/engine.h...
Checking patch main/main.cpp...
error: while searching for:
        }

        /* todo restore
    OS::get_singleton()->_allow_layered = GLOBAL_DEF("display/window/per_pixel_transparency/allowed", false);
    video_mode.layered = GLOBAL_DEF("display/window/per_pixel_transparency/enabled", false);
*/
        GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation", 2);
        GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation.mobile", 3);

error: patch failed: main/main.cpp:1284
Hunk #2 succeeded at 2465 (offset 1 line).
Hunk #3 succeeded at 2504 (offset 3 lines).
Hunk #4 succeeded at 2537 (offset 3 lines).
Checking patch main/main.h...
Applied patch SConstruct cleanly.
Applied patch core/config/engine.h cleanly.
Applying patch main/main.cpp with 1 reject...
Rejected hunk #1.
Hunk #2 applied cleanly.
Hunk #3 applied cleanly.
Hunk #4 applied cleanly.
Applied patch main/main.h cleanly.
@AndreaCatania AndreaCatania added bug Something isn't working topic:build good first issue Good for newcomers labels May 1, 2021
@AndreaCatania
Copy link
Member

I'll give it a check, maybe I need to update the patch. I'll keep you in loop

@navx2810
Copy link

Just to confirm. I'm getting the the same issue from a fresh clone. The commit I tried this on is 364ea7f280a3f074795e542b16b1d0ec76cf6ce2.

@matthew-salerno
Copy link

I looked at the patch file and it looks like the part in question doesn't do anything except mess with whitespace?

@@ -1284,8 +1284,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
 	}
 
 	/* todo restore
-    OS::get_singleton()->_allow_layered = GLOBAL_DEF("display/window/per_pixel_transparency/allowed", false);
-    video_mode.layered = GLOBAL_DEF("display/window/per_pixel_transparency/enabled", false);
+	OS::get_singleton()->_allow_layered = GLOBAL_DEF("display/window/per_pixel_transparency/allowed", false);
+	video_mode.layered = GLOBAL_DEF("display/window/per_pixel_transparency/enabled", false);
 */
 	GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation", 2);
 	GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation.mobile", 3);

the last two lines got moved somewhere else in main which I think is the problem.

@AndreaCatania
Copy link
Member

@matthew-salerno Youp, that part was doing an useless format fix. I've removed it: https://github.com/GodotECS/godex/blob/main/patches/add_custom_iterator.patch

@kisg
Copy link

kisg commented Sep 7, 2021

Wouldn't it make sense to add this custom iterator feature to Godot? Or did you already try and it was rejected?

@AndreaCatania
Copy link
Member

I've a PR to introduce that feature: godotengine/godot#42875, though Reduz is working on a slightly different solution that works also when using the new GDExtension. Once t
hat's implemented (soon I think), I'll remove this patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers topic:build
Projects
None yet
Development

No branches or pull requests

5 participants