Skip to content

Conversation

@kelson42
Copy link
Contributor

  • Fix handling of libicu 76+
  • Simplify a bit the handling of all deps

@kelson42 kelson42 added this to the 10.1.0 milestone Oct 27, 2025
meson.build Outdated
all_deps = [thread_dep, xapian_dep, lzma_dep, zstd_dep, win_deps]

# Dependencies as array
all_deps += libicu_deps
Copy link
Collaborator

Choose a reason for hiding this comment

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

libicu_deps → icu_deps

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

endif

# Dependencies as string
all_deps = [thread_dep, xapian_dep, lzma_dep, zstd_dep, win_deps]
Copy link
Collaborator

Choose a reason for hiding this comment

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

xapian_dep must be included conditionally

Copy link
Contributor Author

@kelson42 kelson42 Oct 28, 2025

Choose a reason for hiding this comment

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

It is already conditional because empty if not requested.

Comment on lines 79 to 93
if xapian_dep.found()
icu_dep = dependency('icu-i18n', static:static_linkage)
if icu_dep.version().version_compare('>= 76')
icu_dep = [icu_dep, dependency('icu-uc', static:static_linkage)]
icu_deps = [icu_dep, dependency('icu-uc', static:static_linkage)]
else
icu_deps = [icu_dep]
endif
else
icu_dep = dependency('icu-i18n', 'required:false', static:static_linkage)
if icu_dep.version().version_compare('>= 76')
icu_dep = [icu_dep, dependency('icu-uc', 'required:false', static:static_linkage)]
icu_deps = [icu_dep, dependency('icu-uc', 'required:false', static:static_linkage)]
else
icu_deps = [icu_dep]
endif
endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that we can avoid the duplication between the positive and negative branches of this if, by introducing a variable icu_dep_is_required = xapian_dep.found()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have done it differently but the idea is the same: simplification

Copy link
Collaborator

Choose a reason for hiding this comment

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

But your change works differently. Before, if xapian was not found, icu participated as an optional dependency, whereas now in that case it is simply skipped.

@kelson42
Copy link
Contributor Author

@veloman-yunkan Sorry, I was not over

@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.18%. Comparing base (8ef511b) to head (65fb47b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1015      +/-   ##
==========================================
- Coverage   58.13%   56.18%   -1.96%     
==========================================
  Files         101      101              
  Lines        5384     4989     -395     
  Branches     2197     2170      -27     
==========================================
- Hits         3130     2803     -327     
+ Misses        795      739      -56     
+ Partials     1459     1447      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines 62 to 64
if target_machine.system() == 'freebsd'
deps += [execinfo_dep]
endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

The variable deps was replaced with all_deps and could have been deleted altogether, however this piece of code means that something was overlooked

Comment on lines 79 to 93
if xapian_dep.found()
icu_dep = dependency('icu-i18n', static:static_linkage)
if icu_dep.version().version_compare('>= 76')
icu_dep = [icu_dep, dependency('icu-uc', static:static_linkage)]
icu_deps = [icu_dep, dependency('icu-uc', static:static_linkage)]
else
icu_deps = [icu_dep]
endif
else
icu_dep = dependency('icu-i18n', 'required:false', static:static_linkage)
if icu_dep.version().version_compare('>= 76')
icu_dep = [icu_dep, dependency('icu-uc', 'required:false', static:static_linkage)]
icu_deps = [icu_dep, dependency('icu-uc', 'required:false', static:static_linkage)]
else
icu_deps = [icu_dep]
endif
endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

But your change works differently. Before, if xapian was not found, icu participated as an optional dependency, whereas now in that case it is simply skipped.

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.

3 participants