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

Fix 3619. Bump dependency catch2 #3635

Closed
wants to merge 2 commits into from

Conversation

LukashonakV
Copy link
Contributor

Signed-off-by: Viktar Lukashonak [email protected]

Signed-off-by: Viktar Lukashonak <[email protected]>
@LukashonakV LukashonakV changed the title Bump dependency catch2 Fix 3619. Bump dependency catch2 Sep 25, 2024
@LukashonakV
Copy link
Contributor Author

LukashonakV commented Sep 25, 2024

Hi @Alexays, @alebastr . Waybar meson configuration does not aware off whether tests option enabled or not. And In case when catch2 library is found forces to compile test subproject. I've reproduces case is mentioned in #3619 . By default catch2 has got tests option disabled. In my opinion in such case no need to compile test subproject.

default_options: [ 'tests=false' ],
fallback: ['catch2', 'catch2_dep'],
required: get_option('tests'),
)
if catch2.found()
if catch2.found() and get_option('tests').enabled()
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't correct, please see https://mesonbuild.com/Reference-manual_functions.html#dependency_required. -Dtests=disabled already skips the dependency lookup and sets catch2 to an empty dependency object.

Dependency catch2 skipped: feature tests disabled

Also, no reason to enforce the version requirement. Last time I checked the test code did not use anything specific to catch2 version 3.7.1 and worked with version 2.x.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @alebastr , very interesting case:

  1. Actually by default meson configuration for waybar provides two or even more features with the same name tests. One of belongs to the project itself and others one to their dependencies. In my case tests feature is provided by the gtk-layer-shell-0 and catch2 . So when catch2 dependency is not met in the system, meson trough dependency fallback provides tests=false
  2. When catch2 dependency is presented in the system then tests project feature is used. In my system by default tests=auto which leads to test subproject compilation. In this case for some reason linker failes with the undefined references

Need to digging deeper to check why linker fails

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like catch2 issue. I create pure small project with catch2 dependency only and not able to compile it. Will create issue to catch2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Appropriate issue is created catchorg/Catch2#2912

@LukashonakV LukashonakV deleted the bumpCatch2 branch September 26, 2024 14:55
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