Skip to content

Conversation

@nnra6864
Copy link
Contributor

Describe your PR, what does it fix/add?

This PR replaces the generateVersion.sh script with CMakeLists.txt and meson.build code.
This way, versions.h header will have all the correct versions set before the build.
There should no longer be issues with plugins comparing versions against values such as @AQUAMARINE_VERSION@, e.g.:

Plugin /home/nn/Packages/hypr-dynamic-cursors/out/dynamic-cursors.so could not be loaded: plugin crashed/threw in main: [hs] Version mismatch.. 081450652c86cf6aea0dd3677132ad73582a4087_aq_0.9_hu_0.10_hg_0.2_hc_0.1_hlg_0.6 057695bc3f7de5e8841c15252fc51029590895e4_aq_@AQUAMARINE_VERSION@_hu_@HYPRUTILS_VERSION@_hg_@HYPRGRAPHICS_VERSION@_hc_@HYPRCURSOR_VERSION@_hlg_@HYPRLANG_VERSION@

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

This PR introduces a breaking change for plugins.
Each plugin must change this:

    const std::string HASH = __hyprland_api_get_hash();

    if (HASH != GIT_COMMIT_HASH) { }

To this:

    const std::string COMPOSITOR_HASH = __hyprland_api_get_hash();
    const std::string CLIENT_HASH = __hyprland_api_get_client_hash();

    if (COMPOSITOR_HASH != CLIENT_HASH) { }

Is it ready for merging, or does it need work?

This should be ready for merging.
I tested both cmake and meson builds, and both were fine on my end.
A wiki PR is needed, as well as updates for each plugin.

I would like to give all the credit to @ItsOhen, he wrote pretty much all the code, and guided me all the way through this.

nnra6864 added a commit to nnra6864/hyprland-wiki that referenced this pull request Oct 23, 2025
nnra6864 added a commit to nnra6864/hyprland-wiki that referenced this pull request Oct 23, 2025
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@vaxerski vaxerski merged commit 019589e into hyprwm:main Oct 23, 2025
13 checks passed
vaxerski pushed a commit to hyprwm/hyprland-wiki that referenced this pull request Oct 23, 2025
nnra6864 added a commit to nnra6864/hypr-dynamic-cursors that referenced this pull request Oct 23, 2025
nnra6864 added a commit to nnra6864/hy3 that referenced this pull request Oct 23, 2025
This is needed since hyprwm/Hyprland#12110 got merged
nnra6864 added a commit to nnra6864/hyprgrass that referenced this pull request Oct 23, 2025
This is needed since hyprwm/Hyprland#12110 got merged
nnra6864 added a commit to nnra6864/hyprland-virtual-desktops that referenced this pull request Oct 23, 2025
This is needed since hyprwm/Hyprland#12110 got merged
nnra6864 added a commit to nnra6864/hyprmodoro that referenced this pull request Oct 23, 2025
This is needed since hyprwm/Hyprland#12110 got merged
nnra6864 added a commit to nnra6864/hyprtoplr that referenced this pull request Oct 23, 2025
This is needed since hyprwm/Hyprland#12110 got merged
@solopasha
Copy link
Contributor

What about

bash -c scripts/generateVersion.sh
?

@vaxerski
Copy link
Member

@fufexan pls?

fufexan added a commit that referenced this pull request Oct 26, 2025
outfoxxed pushed a commit to nnra6864/hy3 that referenced this pull request Nov 1, 2025
This is needed since hyprwm/Hyprland#12110 got merged
jazzpi added a commit to jazzpi/nixcfg that referenced this pull request Nov 10, 2025
This reverts commit b8da4d9.

Hy3 was broken due to
hyprwm/Hyprland#12110, but this should be fixed
with outfoxxed/hy3#247 being merged.
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