Bug 2357569 - Review Request: rx-ranges - Simpler ranges for C++17
Summary: Review Request: rx-ranges - Simpler ranges for C++17
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: wojnilowicz
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/simonask/rx-ranges
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-04-04 22:06 UTC by Jerry James
Modified: 2025-04-07 17:34 UTC (History)
2 users (show)

Fixed In Version: rx-ranges-2.0.0-1.fc43
Clone Of:
Environment:
Last Closed: 2025-04-07 17:34:04 UTC
Type: ---
Embargoed:
lukasz.wojnilowicz: fedora-review+


Attachments (Terms of Use)

Description Jerry James 2025-04-04 22:06:53 UTC
Spec URL: https://jjames.fedorapeople.org/rx-ranges/rx-ranges.spec
SRPM URL: https://jjames.fedorapeople.org/rx-ranges/rx-ranges-2.0.0-1.fc43.src.rpm
Fedora Account System Username: jjames
Description: This is a ranges-like library for C++17 that provides zero-overhead list comprehensions with a pipe-like syntax.

Standard containers can be filtered, transformed, passed through various algorithms, optimizing to loops that would not be more efficient if written by hand.

The goal is to provide the tools to write more readable loops, where the intent of the programmer is clearly communicated to the reader.  Mentally simulating loops is a common but error-prone part of reading other people's code, and indeed your own code from 3 months ago.

The library makes heavy use of modern C++17 features, so a compliant C++17 compiler is required.

Features:
- Arbitrary composability.
- Constexpr-friendly.
- No unnecessary temporary heap allocations (`foo | sort() | to_vector()` only allocates into the resulting container).
- Heap allocation minimization: `reserve()` is used on resulting containers, when possible.
- Open-ended generators (non-terminating, infinite ranges).
- Re-entrancy: A non-rvalue range can be used multiple times in a function.
- Compatible with standard containers (anything that supports `std::begin()` and `std::end()`).
- Compatible with standard algorithms (implicit conversion to iterator-like objects).
- Simple extensibility with custom range adapters. Just implement the `InputRange` faux-concept.
- Non-intrusive `operator|`. The ranges `foo | bar | baz` can be expressed as `baz(bar(foo))`, if using `operator|` would introduce ambiguous overloads.
- No dependencies beyond the standard library.
- Integration with foreign codebases (override hooks for `std::optional`, `std::remove_cvref_t`, assertions, etc.). Can easily be used as a submodule.
- Compiler support for all major compilers (GCC, Clang, MSVC).
- Zero-overhead, compared to manually written loops in optimized builds.
- Header-only, and single-header.

Other than usability concerns, these are the main differences from C++20 ranges:
- Bidirectional ranges.  Ranges can only be consumed linearly in the forward direction.
- Random-access ranges.  Ranges can only be consumed linearly in the forward direction.
- Internally using iterators.  The internal iteration objects are modeled with an "enumerator" concept instead (objects that provide `next()`, `get()`, `at_end()`, etc.), which simplifies custom extensions.  Implicit, zero-overhead conversion to iterators is provided for compatibility with standard algorithms and the range-based for loop syntax.
- Direct access to the data of underlying contiguous ranges (`data()` etc.).

Comment 1 Fedora Review Service 2025-04-04 22:10:45 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8862126
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2357569-rx-ranges/fedora-rawhide-x86_64/08862126-rx-ranges/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 2 wojnilowicz 2025-04-05 12:40:28 UTC
The package is APPROVED.

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed

You could use %{build_cxx} instead of g++.

===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Package does not contain any libtool archives (.la)
[x]: Package contains no static executables.
[x]: Rpath absent or only used for internal libs.

Generic:
[-]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
     Note: Using prebuilt packages
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "MIT License". 10 files have unknown
     license. Detailed output of licensecheck in /var/lib/copr-
     rpmbuild/results/rx-ranges/licensecheck.txt
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[!]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[-]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 19927 bytes in 3 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: The License field must be a valid SPDX expression.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[x]: Reviewer should test that the package builds in mock.
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[-]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
     benchmark.cpp not tested and probably for a good reason.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.


Rpmlint
-------
Checking: rx-ranges-devel-2.0.0-1.fc43.noarch.rpm
          rx-ranges-2.0.0-1.fc43.src.rpm
============================ rpmlint session starts ============================
rpmlint: 2.6.1
configuration:
    /usr/lib/python3.13/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmpjzbrj4b6')]
checks: 32, packages: 2

rx-ranges.src: E: spelling-error ('composability', '%description -l en_US composability -> compos ability, compos-ability, comparability')
rx-ranges.src: E: spelling-error ('entrancy', '%description -l en_US entrancy -> entrance, entrant, transiency')
rx-ranges.src: E: spelling-error ('rvalue', '%description -l en_US rvalue -> value, revalue, r value')
rx-ranges.src: E: spelling-error ('baz', '%description -l en_US baz -> bass, biz, baa')
rx-ranges.src: E: spelling-error ('codebases', '%description -l en_US codebases -> co debases, co-debases, code bases')
rx-ranges.src: E: spelling-error ('cvref', '%description -l en_US cvref -> carefree')
rx-ranges.src: E: spelling-error ('submodule', '%description -l en_US submodule -> sub module, sub-module, module')
rx-ranges-devel.noarch: E: spelling-error ('composability', '%description -l en_US composability -> compos ability, compos-ability, comparability')
rx-ranges-devel.noarch: E: spelling-error ('entrancy', '%description -l en_US entrancy -> entrance, entrant, transiency')
rx-ranges-devel.noarch: E: spelling-error ('rvalue', '%description -l en_US rvalue -> value, revalue, r value')
rx-ranges-devel.noarch: E: spelling-error ('baz', '%description -l en_US baz -> bass, biz, baa')
rx-ranges-devel.noarch: E: spelling-error ('codebases', '%description -l en_US codebases -> co debases, co-debases, code bases')
rx-ranges-devel.noarch: E: spelling-error ('cvref', '%description -l en_US cvref -> carefree')
rx-ranges-devel.noarch: E: spelling-error ('submodule', '%description -l en_US submodule -> sub module, sub-module, module')
 2 packages and 0 specfiles checked; 14 errors, 0 warnings, 7 filtered, 14 badness; has taken 0.3 s 




Rpmlint (installed packages)
----------------------------
(none): E: there is no installed rpm "rx-ranges-devel".
There are no files to process nor additional arguments.
Nothing to do, aborting.
============================ rpmlint session starts ============================
rpmlint: 2.7.0
configuration:
    /usr/lib/python3.13/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 1

 0 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 filtered, 0 badness; has taken 0.0 s 



Source checksums
----------------
https://github.com/simonask/rx-ranges/archive/v2.0.0/rx-ranges-2.0.0.tar.gz :
  CHECKSUM(SHA256) this package     : 535a89c8b12aebaacf9accb75d2f08d89cce8f4338e83716936977b03e14fb5d
  CHECKSUM(SHA256) upstream package : 535a89c8b12aebaacf9accb75d2f08d89cce8f4338e83716936977b03e14fb5d


Requires
--------
rx-ranges-devel (rpmlib, GLIBC filtered):



Provides
--------
rx-ranges-devel:
    rx-ranges-devel
    rx-ranges-static



Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24
Command line :/bin/fedora-review --no-colors --prebuilt --rpm-spec --name rx-ranges --mock-config /var/lib/copr-rpmbuild/results/configs/child.cfg
Buildroot used: fedora-rawhide-x86_64
Active plugins: C/C++, Generic, Shell-api
Disabled plugins: PHP, Python, Perl, Haskell, SugarActivity, fonts, R, Ocaml, Java
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH

Comment 3 Jerry James 2025-04-07 17:07:32 UTC
Thank you for the review!

Comment 4 Fedora Admin user for bugzilla script actions 2025-04-07 17:11:49 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/rx-ranges

Comment 5 Jerry James 2025-04-07 17:34:04 UTC
This package has been built in Rawhide.


Note You need to log in before you can comment on or make changes to this bug.