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

Update documentation setup configuration #99

Merged

Conversation

Krishna-13-cyber
Copy link
Contributor

No description provided.

@vgvassilev
Copy link
Contributor

Why do we need llvm 10? CppInterOp will require some work to enable llvm 10 if possible at all.

@Krishna-13-cyber
Copy link
Contributor Author

Krishna-13-cyber commented Jun 29, 2023

Why do we need llvm 10? CppInterOp will require some work to enable llvm 10 if possible at all.

The readthedocs supports llvm-version only till llvm-10 and also prior cmake versions.So I had to use these versions for readthedocs compatibility.

@vgvassilev
Copy link
Contributor

Do we really need to build the codebase with llvm-10? I think if we specified the doxygen build flag we should probably ignore the llvm version checks as we could be only building the doxygen config.

@davidlange6
Copy link

davidlange6 commented Jun 29, 2023 via email

@Krishna-13-cyber
Copy link
Contributor Author

Do we really need to build the codebase with llvm-10? I think if we specified the doxygen build flag we should probably ignore the llvm version checks as we could be only building the doxygen config.

We just need llvm to pass the cmake checks, it is nothing to do with docs generation. I will try to get some alter method for this

@Krishna-13-cyber
Copy link
Contributor Author

Where can we see this llvm-10 support? I don't immediately find it

The llvm-10 support was working for clad but I had upgraded it for interop to llvm-14 but it didnt seem to work well.
Yes, I found it too while building the docs in readthedocs build setup, I will just share a screen capture of build failure (llvm version incompatible).
build

@davidlange6
Copy link

whose cmake checks?

@davidlange6
Copy link

ok, I see your graphic now..

@davidlange6
Copy link

did you consider using conda to do the installs instead?

@parth-07
Copy link

parth-07 commented Jul 2, 2023

@vgvassilev @davidlange6 If I understand correctly, the pull request is not actually building CppInterOp in the readthedocs configuration. llvm-10 is only required to run CMake on the CppInterOp. CMake will generate documentation targets. These documentation targets are used to generate sphinx and doxygen docs.

I think if we specified the doxygen build flag we should probably ignore the llvm version checks as we could be only building the doxygen config.

Yes, this can be done. For this, we will have to add an option such as,
CPPINTEROP_BUILD_ONLY_DOCS. This option can modify CMake to explicitly ignore all configurations
related to building the project. But I don't think this option is required for this change, as we can use llvm-10
to bypass the CMake checks.

did you consider using conda to do the installs instead?

CppInterOp is not being built / installed. Only documentation is being built.

CMakeLists.txt Outdated
if (NOT LLVM_FOUND AND DEFINED LLVM_DIR)
find_package(LLVM REQUIRED CONFIG ${llvm_search_hints} NO_DEFAULT_PATH)
endif()
# if (NOT LLVM_FOUND AND DEFINED LLVM_DIR)
Copy link

Choose a reason for hiding this comment

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

I think this change can be reverted now.

CMakeLists.txt Outdated
if (NOT Clang_FOUND AND DEFINED Clang_DIR)
find_package(Clang REQUIRED CONFIG ${clang_extra_hints} NO_DEFAULT_PATH)
endif()
# if (NOT Clang_FOUND AND DEFINED Clang_DIR)
Copy link

Choose a reason for hiding this comment

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

This can be reverted as well.

@vgvassilev
Copy link
Contributor

@vgvassilev @davidlange6 If I understand correctly, the pull request is not actually building CppInterOp in the readthedocs configuration. llvm-10 is only required to run CMake on the CppInterOp. CMake will generate documentation targets. These documentation targets are used to generate sphinx and doxygen docs.

I think if we specified the doxygen build flag we should probably ignore the llvm version checks as we could be only building the doxygen config.

Yes, this can be done. For this, we will have to add an option such as, CPPINTEROP_BUILD_ONLY_DOCS. This option can modify CMake to explicitly ignore all configurations related to building the project. But I don't think this option is required for this change, as we can use llvm-10 to bypass the CMake checks.

did you consider using conda to do the installs instead?

CppInterOp is not being built / installed. Only documentation is being built.

Yes, but that change would make it look like we support llvm-10 which we do not. So users with llvm-10 might trigger a build which would then fail. That’s what I am trying to avoid here. The best would be to install the right llvm in the container. The second best would be to use a special cmake flag.

@parth-07
Copy link

parth-07 commented Jul 2, 2023

Yes, but that change would make it look like we support llvm-10 which we do not.

Oh, yes you are right.

The best would be to install the right llvm in the container. The second best would be to use a special cmake flag.

Yes, this seems right. @Krishna-13-cyber can you please add the special CMake flag for this if we cannot install
right llvm versions?

@Krishna-13-cyber
Copy link
Contributor Author

Yes, this seems right. @Krishna-13-cyber can you please add the special CMake flag for this if we cannot install right llvm versions?

Yes, I will get it done!

@davidlange6
Copy link

"llvm-10 is only required to run CMake on the CppInterOp." - this doesn't make much sense to me. Whose limitation is this?

@vgvassilev
Copy link
Contributor

"llvm-10 is only required to run CMake on the CppInterOp." - this doesn't make much sense to me. Whose limitation is this?

Apparently that's what's in the default container of the readthedocs infrastructure. So that limitation comes from there and I am not even convinced if that's a limitation per se. What we should not do is change our cmake files to seem that we support llvm-10 as that'd be incorrect.

@davidlange6
Copy link

ok, I guess this is because build.image is basically obsolete. I'd suggest we follow build.os instead..
https://docs.readthedocs.io/en/stable/tutorial/#adding-a-configuration-file

@Krishna-13-cyber
Copy link
Contributor Author

Krishna-13-cyber commented Jul 6, 2023

ok, I guess this is because build.image is basically obsolete. I'd suggest we follow build.os instead.. https://docs.readthedocs.io/en/stable/tutorial/#adding-a-configuration-file

I have used this approach and works perfect. Thanks!

@vgvassilev
Copy link
Contributor

Can you configure your editor to remove trailing white space?

@Krishna-13-cyber
Copy link
Contributor Author

Can you configure your editor to remove trailing white space?

Yes, I will do this but I don't see any trailing spaces here in this PR!

docs/conf.py Outdated

INTEROP_ROOT = '..'
html_theme_options = {
"github_user": "vgvassilev",
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably use compiler-research.

Copy link
Contributor

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

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

LGTM!

@vgvassilev vgvassilev added this pull request to the merge queue Jul 12, 2023
Merged via the queue into compiler-research:main with commit e087953 Jul 12, 2023
3 of 4 checks passed
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.

None yet

4 participants