Skip to content

Fix docs typo #692

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

Merged
merged 7 commits into from
Feb 27, 2025
Merged

Fix docs typo #692

merged 7 commits into from
Feb 27, 2025

Conversation

Curtis-Barnhart
Copy link
Contributor

@Curtis-Barnhart Curtis-Barnhart commented Feb 20, 2025

Just a few typos here and there, and one clarification of a sentence I thought was a little confusing to read.

I also added a small bit to the generate_rst.sh file so that I could build it on my linux machine (otherwise it would use the mac version of a command that I don't have here).

Copy link
Owner

@bitwes bitwes left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. It looks like you got the documentation generation working (original PR generated email indicated you were getting an error). I really appreciate that. I wasn't sure if any of the documentation I made would make any sense to anyone else. I get confused every time I get back into it. I'd like to hear any feedback about contributing to the documentation.

I have one change to generate_rst.sh that I'd like you to make and test. Everything else looked good.

@@ -43,7 +43,14 @@ function generate_xml(){
# soon (fixed merged after 4.3). So we wait 2 seconds +1 seconds (-k 1s)
# using gtimeout (which is mac version of timeout from coreutils) and then
# kill it (-k 1s).
gtimeout -k 1s 2s $GODOT --doctool $the_dir --no-docbase --gdscript-docs $scripts_dir
case $OSTYPE in
Copy link
Owner

Choose a reason for hiding this comment

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

Your original case statement didn't work for me because $OSTYPE has a version in it (at least for darwn); my $OSTYPE is "darwin23.0". This code changes the OS check to "darwin"* and then uses timeout as the default for any other OS. As I was testing this I figured timeout will probably work on most other shells and therefore should be the default case.

Please test this locally as I don't have a linux box to test on and could have broken it again. I've been testing by doing the following:

# kill all rst files
rm documentation/docs/class_ref/*.rst
# look to see that they are all deleted because I never trust what I do
git status
# regenerate them
zsh documentation/generate_rst.sh
# make sure they are all back
git status

Here's the change to the comment and code:

    # The --doctool command always hangs indefinitely. We use timeout to kill it
    # after some time.  The following case statement matches the timeout method
    # to the OS (basically Mac is special).  If your shell has a differently 
    # named timeout then add it to the case statement.
    #
    # The "hangs forever" bug might be fixed soon (a fix was merged after 4.3).
    case $OSTYPE in
        "darwin"*)
            gtimeout -k 1s 2s $GODOT --doctool $the_dir --no-docbase --gdscript-docs $scripts_dir
        ;;
        *)
            timeout -k 1s 2s $GODOT --doctool $the_dir --no-docbase --gdscript-docs $scripts_dir
        ;;
    esac

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The change works perfect over here.

@Curtis-Barnhart
Copy link
Contributor Author

Yeah, it turned out that SELinux was getting in the way of the docker container properly accessing the mounted docs directory. There were some strange file properties I had to change somewhere and then it all worked.
Reading the documentation/contributing to it was pretty straightforward. All the instructions worked out of the box for me (aside from having to figure out that it expected the environment variable GODOT to be set, and aside from the SELinux thing, which was a problem on my end). I'll probably be looking into the docs more deeply in the near future as I actually start to mess around with using Gut more.

@bitwes bitwes merged commit 8ffe60a into bitwes:main Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants