skvadrik / re2c

Lexer generator for C, C++, Go and Rust.
https://re2c.org
Other
1.07k stars 169 forks source link

CMake - Windows-compatible doc bootstrapping #419

Closed idigdoug closed 1 year ago

idigdoug commented 1 year ago

Pretty much every Python install includes Docutils, and Docutils is 95% of what is needed to bootstrap docs on Windows. Fill in the rest.

I think this addresses issue #327

idigdoug commented 1 year ago

More precisely, it fixes the CMake side of things. I don't have the autoconf stuff running in my environment right now, so I didn't mess with that.

idigdoug commented 1 year ago

The help.cc output is a little bit different.

idigdoug commented 1 year ago

I reverted the updated bootstraps before committing... Not sure if you wanted them included. Let me know.

skvadrik commented 1 year ago

@idigdoug Also please enable docs regeneration on CI (https://github.com/skvadrik/re2c/blob/master/.github/workflows/ci-cmake.yml).

idigdoug commented 1 year ago

The issue is that the Python modules are being installed here:

/Users/runner/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages

But the Python installation found by find_package is here:

/usr/local/Frameworks/Python.framework/Versions/3.10/bin/python3.10

idigdoug commented 1 year ago

@idigdoug Also please enable docs regeneration on CI (https://github.com/skvadrik/re2c/blob/master/.github/workflows/ci-cmake.yml).

I'm not sure I understand this. It's already building the -full preset, and that has RE2C_REBUILD_DOCS=true. Am I missing something?

idigdoug commented 1 year ago

Sorry, the review re-request was a click.

skvadrik commented 1 year ago

Thanks for addressing the comments! There are a few more things:

I'm not sure I understand this. It's already building the -full preset, and that has RE2C_REBUILD_DOCS=true. Am I missing something?

Docs regeneration is currently disabled on Windows builds on CI (see e.g. this build: https://github.com/skvadrik/re2c/actions/runs/3314965984/jobs/5476614508#step:14:17). This is disabled in cmake presets on line 262, line 282 and line 302. After you remove it, docs will be regenerated on CI builds. Also there is some special-casing in ci-cmake.yml for Windows that should probably be removed.

skvadrik commented 1 year ago

As for python root dir, I think issue is related: https://github.com/actions/setup-python/issues/162#issuecomment-1238566878 (it hasn't yet been fixed on macOS, which falls in line with the only failing builds being the macOS ones). Let's keep the -DPython3_ROOT_DIR workaround for now.

skvadrik commented 1 year ago

Tiny thing: on the first commit re2c - Windows-compatible doc bootstrapping, did you mean "CMake: Windows-compatible doc bootstrapping" ? I think it's the last one --- checks are passing.

skvadrik commented 1 year ago

Merged. Thanks @idigdoug !