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

Ensure --doctool is run from root directory #91407

Merged
merged 1 commit into from
May 1, 2024

Conversation

RedMser
Copy link
Contributor

@RedMser RedMser commented May 1, 2024

There are two ways to run doctool:

  • --doctool (uses cwd by setting . as the path)
  • --doctool <path> (absolute or relative path)

While convenient, the former method implicitly relies on the cwd. So it might end up generating doc, modules and platform directories inside of your build directory or home directory.
Now we check for the existence of the doc folder for this case only, to avoid accidents.

This is technically a breaking change, but I assume most scripted usage of --doctool either runs in the repository root already, or specifies a path in the command line.

While we could also check for the doc folder in the case of an explicit path being passed, it might be desired to generate the XML structure outside of the repository folder for other purposes (such as a simple to parse list of classes, members, etc.)?

@RedMser RedMser requested a review from a team as a code owner May 1, 2024 11:13
main/main.cpp Outdated Show resolved Hide resolved
@RedMser RedMser force-pushed the doctool-verify-directory branch from 2c85473 to 3047bd4 Compare May 1, 2024 11:39
@akien-mga akien-mga modified the milestones: 4.x, 4.3 May 1, 2024
@akien-mga akien-mga merged commit 76afc98 into godotengine:master May 1, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

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