Stiffstream / restinio

Cross-platform, efficient, customizable, and robust asynchronous HTTP(S)/WebSocket server C++ library with the right balance between performance and ease of use
Other
1.16k stars 93 forks source link

clara (used by test suite) abandoned upstream #181

Closed Apteryks closed 1 year ago

Apteryks commented 1 year ago

Hi!

Clara appears to be abandoned upstream (https://github.com/catchorg/Clara), at least the repository is archived.

Is it still needed by for the restinio test suite? It doesn't appear to build with glibc 2.35, so it's a problem.

Thanks!

Apteryks commented 1 year ago

OK; I was able to fix the build of clara by providing it with a newer catch2 (2.13.8) copy than the one it bundles. Here's what the Guix package definition for it looks like:

;;; XXX: This project is abandoned upstream, and included in modern catch2
;;; releases.  It is still depended by the restinio test suite at this time,
;;; so keep it (see: https://github.com/Stiffstream/restinio/issues/181).
(define-public clara
  (package
    (name "clara")
    (version "1.1.5")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/catchorg/Clara")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "08mlm9ax5d7wkmsihm1xnlgp7rfgff0bfl4ly4850xmrdaxmmkl3"))
              (modules '((guix build utils)))
              (snippet '(begin
                          ;; Un-bundle catch2.
                          (delete-file-recursively "third_party")
                          (substitute* "CMakeLists.txt"
                            (("include_directories\\( include third_party )")
                             "include_directories( include )"))))))
    (build-system cmake-build-system)
    (arguments
     (list
      #:configure-flags
      #~(list (string-append "-DCMAKE_CXX_FLAGS=-I"
                             (search-input-directory %build-inputs
                                                     "include/catch2")))
      #:phases
      #~(modify-phases %standard-phases
          (replace 'install
            (lambda _
              (install-file (string-append #$source "/single_include/clara.hpp")
                            (string-append #$output "/include")))))))
    (native-inputs (list catch2))
    (home-page "https://github.com/catchorg/Clara")
    (synopsis "Simple command line parser for C++")
    (description "Clara is a simple to use, composable, command line parser
for C++ 11 and beyond implemented as a single-header library.")
    (license license:boost1.0)))

So that's solved in Guix for now, but given it's abandoned, it'd be nice to migrate to a more recent catch2 release that doesn't provide the clara.hpp header (it uses it internally only).

eao197 commented 1 year ago

Hi! I'll rewrite tests/samples for RESTinio to remove the use of Clara. But it seems that it won't be in April, may be in May 2023.

Apteryks commented 1 year ago

That will be a welcome improvement and should enable more distributions to enable the test suite. Thank you!

eao197 commented 1 year ago

Clara is no more used since v.0.7.0.