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

Running --doctool wrongly creates shader_cache directory in working directory #49392

Closed
akien-mga opened this issue Jun 7, 2021 · 0 comments · Fixed by #49661
Closed

Running --doctool wrongly creates shader_cache directory in working directory #49392

akien-mga opened this issue Jun 7, 2021 · 0 comments · Fixed by #49661

Comments

@akien-mga
Copy link
Member

Godot version:
master (896aa94)

OS/device including version:
Mageia 9

Issue description:
When running --doctool, a shader_cache repository is created in the working directory, since the addition of shader caching in #49050.

Normally running the editor should generate and use the shader_cache in the editor config dir, but --doctool is badly set up in main.cpp as neither really editor nor project manager nor standalone project, so the logic seems to fail here.

This is similar to #41435 and would likely be fixed the same way (both bugs might be the same).

Steps to reproduce:

  • godot --doctool
  • ls
@akien-mga akien-mga added this to the 4.0 milestone Jun 7, 2021
akien-mga added a commit to akien-mga/godot that referenced this issue Jun 16, 2021
WARNING: Hacks everywhere!

The logic in `main.cpp` is due a full rewrite as it's extremely hacky,
splitting argument parsing over several functions, with a mess of global state
and assumptions about what combinations of arguments or lack thereof should
mean in terms of what we want to read: game, editor, project manager, or
command line tools such as `--doctool`, `--export` or `--script`.

Until this is fully rewritten, this patch hacks things some more to ensure
that we don't fall back to the project manager in cases where it's not
warranted, and especially not *too late*, as it can mean that we haven't
properly initialized stuff like `EditorPaths` needed by the PM (which in turn
impacts what kind of path will be used for logs and the shader cache, etc...
the rabbit hole goes deep).

Fixes godotengine#41435.
Fixes godotengine#49392.
Fixes godotengine#49658.
Fixes godotengine#38202 (comment).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant