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

Meson improvement #620

Merged
merged 5 commits into from
Jul 7, 2024
Merged

Meson improvement #620

merged 5 commits into from
Jul 7, 2024

Conversation

lidaobing
Copy link
Member

@lidaobing lidaobing commented Jul 7, 2024

Summary by Sourcery

This pull request improves the Meson build configuration by updating the required Meson version, adding summary sections for better visibility of configuration options and dependencies, and enhancing test definitions for better integration with the Google Test framework.

  • Enhancements:
    • Updated Meson build configuration to require Meson version >= 0.57.
    • Added summary sections in Meson build files to display configuration options, directories, and dependencies.
    • Replaced string-based dependency declarations with variable-based declarations in Meson build files for better maintainability.
    • Updated test definitions to include the 'protocol' field set to 'gtest' for better integration with Google Test framework.

@lidaobing lidaobing self-assigned this Jul 7, 2024
Copy link

sourcery-ai bot commented Jul 7, 2024

Reviewer's Guide by Sourcery

This pull request improves the Meson build configuration for the iptux project. The changes include updating the Meson version requirement, adding summary sections for directories, dependencies, and options, and modifying test configurations to use the 'gtest' protocol. Additionally, there are updates to the handling of paths and dependencies in various meson.build files.

File-Level Changes

Files Changes
src/iptux-core/meson.build
src/iptux-utils/meson.build
src/iptux/meson.build
Updated test configurations to use 'gtest' protocol.
share/metainfo/meson.build
po/meson.build
Updated path handling to use Meson project source root and option functions.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @lidaobing - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 3 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

meson.build Outdated Show resolved Hide resolved
@@ -23,9 +23,9 @@ metainfo_i18n = i18n.merge_file(
input: metainfo_with_relinfo,
output: 'io.github.iptux_src.iptux.metainfo.xml',
type: 'xml',
po_dir: join_paths(meson.source_root(), 'po'),
po_dir: meson.project_source_root() / 'po',
Copy link

Choose a reason for hiding this comment

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

suggestion: Use join_paths for consistency.

Consider using join_paths for constructing paths to maintain consistency with the rest of the codebase. This can also help avoid potential issues with different path separators on different operating systems.

Suggested change
po_dir: meson.project_source_root() / 'po',
po_dir: join_paths(meson.project_source_root(), 'po'),

install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo'),
install_dir: get_option('datadir') / 'metainfo',
Copy link

Choose a reason for hiding this comment

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

suggestion: Use join_paths for consistency.

Consider using join_paths for constructing paths to maintain consistency with the rest of the codebase. This can also help avoid potential issues with different path separators on different operating systems.

Suggested change
install_dir: get_option('datadir') / 'metainfo',
install_dir: join_paths(get_option('datadir'), 'metainfo'),

Copy link

codecov bot commented Jul 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.43%. Comparing base (dedf3c0) to head (2685972).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #620      +/-   ##
==========================================
+ Coverage   51.90%   52.43%   +0.52%     
==========================================
  Files          64       64              
  Lines        8375     8533     +158     
==========================================
+ Hits         4347     4474     +127     
- Misses       4028     4059      +31     

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

@lidaobing lidaobing merged commit 147c087 into master Jul 7, 2024
15 checks passed
@lidaobing lidaobing deleted the meson_improvement branch July 7, 2024 23:34
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.

1 participant