Skip to content

sol2: Fix compilation by targeting Lua version - #9445

Merged
waruqi merged 3 commits into
devfrom
SirLynix-patch-9
Mar 5, 2026
Merged

sol2: Fix compilation by targeting Lua version#9445
waruqi merged 3 commits into
devfrom
SirLynix-patch-9

Conversation

@SirLynix

@SirLynix SirLynix commented Mar 4, 2026

Copy link
Copy Markdown
Member

Fixes

CMake Error at /home/runner/work/ThisSpaceOfMine/xmake-global/.xmake/packages/c/cmake/4.2.3/3bf8056420f14bda97125b2546883899/share/cmake-4.2/Modules/FindPackageHandleStandardArgs.cmake:290 (message):
  Could NOT find Lua (missing: LUA_INCLUDE_DIR) (Required is exact version
  "5.4")

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical compilation error encountered when building the sol2 package, specifically a CMake Error indicating a missing LUA_INCLUDE_DIR. The fix involves refining the Lua dependency specification within the sol2's xmake.lua file, ensuring that the correct Lua version is targeted and resolved based on the sol2 package's own version, thereby enabling successful compilation.

Highlights

  • Lua Dependency Fix: The xmake.lua configuration for sol2 has been updated to precisely specify the required Lua version based on the sol2 package version. This resolves a CMake Error related to missing LUA_INCLUDE_DIR when building sol2.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • packages/s/sol2/xmake.lua
    • Adjusted Lua dependency logic to specify exact or minimum versions based on the sol2 package version, resolving compilation issues.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@SirLynix

SirLynix commented Mar 4, 2026

Copy link
Copy Markdown
Member Author

Also see ThePhD/sol2#1723

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request correctly addresses a compilation issue by specifying a more precise Lua dependency based on the sol2 version. The logic is sound. I've added one suggestion to simplify the conditional logic and improve code readability by removing a redundant else block.

Comment thread packages/s/sol2/xmake.lua
Comment on lines +30 to 41
local version = package:version()
if version then
if version():gt("3.3") then
package:add("deps", "lua >=5.4")
elseif version():eq("3.3") then
package:add("deps", "lua 5.4")
else
package:add("deps", "lua")
end
else
package:add("deps", "lua")
end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This conditional logic can be simplified. The else block for when version is nil is redundant, as the inner if/elseif structure already has a final else that handles this case correctly. You can combine the checks to make the code more concise and readable.

            local version = package:version()
            if version and version():gt("3.3") then
                package:add("deps", "lua >=5.4")
            elseif version and version():eq("3.3") then
                package:add("deps", "lua 5.4")
            else
                package:add("deps", "lua")
            end

@waruqi
waruqi merged commit 58174a3 into dev Mar 5, 2026
61 checks passed
@SirLynix
SirLynix deleted the SirLynix-patch-9 branch March 5, 2026 07:21
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