Commit Graph

43 Commits

Author SHA1 Message Date
Claude
3b3446bfcb feat(tidy): add fairmq-bugprone-unchecked-transfer-result
- Report Receive() calls whose result is discarded. On a timeout, an
  error or an interrupt the message stays empty, and only the result
  tells.
- Report Send() too with the option CheckSend: true. Off by default,
  because many devices ignore the result of Send() on purpose.
- A cast to void discards the result on purpose and is not reported.
- Add Transfer.h with matchers for Send() and Receive() of Device,
  Channel and Socket, and isDiscarded(), for this and later checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 09:29:18 +00:00
Claude
8ee2518fb1 feat(options): deprecate the old ProgOptions accessors
- Mark GetValue<T>(), SetValue() and GetStringValue() as deprecated in
  favour of the property API, as the TODO comments ask.
- fairmq-modernize-progoptions-accessors migrates the calls.
- List them in the migration guide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 09:28:50 +00:00
Claude
871e7e54cf feat(tidy): add fairmq-modernize-run-device
- Migrate a device main file from <runFairMQDevice.h> to
  <fairmq/runDevice.h>: the include, the FairMQDevicePtr return type,
  the const ProgOptions& parameter and 'return new T(...)', which becomes
  'return std::make_unique<T>(...)'.
- Fix all of it or nothing: if a return statement of getDevice() is not
  a plain new expression, only report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 09:28:29 +00:00
Claude
67fd7f2305 feat(tidy): add fairmq-modernize-progoptions-accessors
- Replace GetValue<T>(key) with GetProperty<T>(key, {}) and
  GetStringValue(key) with GetPropertyAsString(key, {}). The {} default
  keeps the old result for an unknown key, where the property API throws.
- Replace SetValue() with SetProperty() only where its always-zero
  result is unused, because SetProperty() returns void.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 09:28:29 +00:00
Claude
83d0e741f5 feat(tidy): add fairmq-modernize-parts-api
- Replace Parts::AtRef(i) with Parts::At(i). At() returns a reference
  to the MessagePtr, so a following '.' becomes '->', and a lone call
  gets a leading '*'.
- Wrap the raw pointer of Parts::AddPart(Message*) in
  fair::mq::MessagePtr.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 09:28:29 +00:00
Claude
3975017183 feat(tidy): add fairmq-modernize-deprecated-functions
- Replace Device::GetStateName() and Device::GetTransitionName() with
  the free functions fair::mq::GetStateName() and GetTransitionName().
- Replace Socket::GetConstant() of the zeromq and shmem transports with
  fair::mq::zmq::getConstant() and include <fairmq/zeromq/Common.h>.
- Report Socket::Close() without a fix: the socket closes when it is
  destroyed, so the call must go away, not be renamed.
- Skip the fix if the object expression has side effects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 09:28:23 +00:00
Claude
75fd9622e2 docs(tidy): describe the plugin and fairmq-clangd
- Explain how to load libfairmq-tidy-checks.so into clang-tidy, and
  that the clang-tidy must have the same LLVM major version.
- Explain the editor setup with fairmq-clangd and a .clangd file,
  including FastCheckFilter for clangd >= 18.
- Add BUILD_TIDY_CLANGD to the CMake reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 09:27:51 +00:00
Claude
1a7b9a73a7 docs(tidy): describe the clang-tidy based fairmq-tidy
- Rewrite the tool reference and the guide for the clang-tidy driver:
  the options, --fix, the default check selection, run-clang-tidy and
  --warnings-as-errors for CI.
- Describe each check, list the build requirements and the tested LLVM
  releases.
- Document the CHECKS and EXTRA_ARGS arguments of fairmq_target_tidy().
- Update the pages that name the dependencies and the migration guide:
  the checks now find the old headers, InputMsgCallback and friends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 09:26:37 +00:00
Claude
e2a150d9e8 build(cmake): install public headers with a header file set
- Add the public headers and the generated Version.h to the file set
  HEADERS of FairMQ
- Install the file set instead of one install(FILES) per header
- The file set gives the include directory include/fairmq; the exported
  target also adds it for CMake versions before 3.23
- The installed headers are the same

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 10:21:32 +01:00
Claude
230a614bb1 build(cmake): build bundled GoogleTest with FetchContent
- Add the bundled GoogleTest with FetchContent and OVERRIDE_FIND_PACKAGE,
  so it uses the compiler and flags of the FairMQ build
- Build it in a block() without gmock, install and static analysis
- Replace build_bundled() with fairmq_init_submodule(), which runs
  git submodule update only if the submodule folder is empty, and stops
  with a clear error if it stays empty
- Install the bundled FairCMakeModules into the build directory with its
  tests off, as before
- Use the bundled PicoSHA2 headers directly from the source tree
- With USE_EXTERNAL_GTEST, GTest is a private dependency and no longer
  in FairMQ_PACKAGE_DEPENDENCIES

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 10:21:32 +01:00
Claude
08d371b1d4 build(cmake): use CMAKE_COLOR_DIAGNOSTICS for colored output
- Set CMAKE_COLOR_DIAGNOSTICS instead of adding -fdiagnostics-color to
  CMAKE_CXX_FLAGS and setting CMAKE_COLOR_MAKEFILE
- CMake adds the correct flag for each compiler
- Keep a CMAKE_COLOR_DIAGNOSTICS value given by the user, except with
  DISABLE_COLOR=ON
- The color flag is no longer part of FairMQ_CXX_FLAGS in the package

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 10:21:32 +01:00
Claude
13739445e8 docs(cmake): document add_subdirectory support and the target changes
- FairMQ::FairMQ exists in the build tree
- FairMQ uses PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR
- The exported library links Boost::headers

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 10:21:32 +01:00
Claude
ba286b4449 docs(cmake): document the CMake 3.25 minimum
- Update the dependency table, the build options and the test helper

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 10:21:32 +01:00
Claude
043dd323a4 docs(cmake): describe the fixed CMake behavior
- Remove the notes about the empty FairMQ_PACKAGE_COMPONENTS, the typo in
  the Boost.Asio definition, the unused IWYU variable and the
  installed start scripts
- Document that the installed scripts use the install-time prefix and
  that FairMQ no longer sets CMAKE_CONFIGURATION_TYPES

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 10:21:31 +01:00
Claude
25f44828d7 docs(shmem): document that sender and receiver must use the same kind of type
- shmem uses one metadata format for a single message and another for
  a multipart message; Receive(Parts) of a single send, or
  Receive(MessagePtr) of a multipart send, gives wrong metadata or a
  crash
- Add a sender/receiver table to the messages page of the
  documentation and a note to Channel::Receive()
- Update the source line links into Channel.h
- Keep PartsTransfer.SingleSendMultipartReceive disabled: a fix
  changes the shmem wire format

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 15:42:53 +01:00
Claude
102cdaf40e fix(shmem): refuse to send an empty Parts
- zeromq refuses an empty Parts with TransferCode::error; shmem sent a
  message with zero parts and returned 0, and the receiver got a
  Receive() with zero parts
- Refuse it in shmem too, with the same warning
- Enable PartsTransfer.EmptyPartsIsRefused
- Update the documentation pages that described the defect, and
  the source line links into the changed files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 15:42:53 +01:00
Claude
50387fe5cc fix(shmem): fill the result of Monitor::GetDebugInfo()
- The function reserved each result vector and then wrote to
  result[segment][handle], past the end of the vector: it returned
  empty vectors and corrupted the heap
- Append one entry per buffer, in the order of the buffer offset
- Check the debug map for null before its first use
- Name the map entries (segment id, offset, buffer) instead of
  .first and .second
- Enable Monitor.GetDebugInfo (needs FAIRMQ_DEBUG_MODE)
- Update the documentation page that described the defect

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 15:42:53 +01:00
Claude
47784207d6 fix(control): handle all keys of one input in interactive mode
- The REPL polled the stdin fd, then read one key with std::cin; the
  other keys of the same read stayed in the std::cin buffer, and
  poll() did not report them again
- Read one key with read(2), so poll() reports each key that is not
  handled yet; skip whitespace, as operator>> did
- Stop reading at end of input: before, a closed stdin (e.g.
  < /dev/null) made the loop print the help without a pause
- Enable ControlPlugin.SeveralKeysInOneInput
- Update the documentation pages that described the defect, and
  the source line links into the changed files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 15:42:53 +01:00
Claude
9b6662f6a9 fix(device): print --print-channels and --version output to stdout
- DeviceRunner sets the console log severity to "nolog" for both
  options, but printed their output with LOGV(info), so both options
  printed nothing
- Add Device::PrintRegisteredChannels(std::ostream&) for the
  machine-readable channel list; the version goes to std::cout, like
  --help and --print-options
- Enable DeviceRunner.PrintChannels and DeviceRunner.Version
- Update the documentation pages that described the defect, and
  the source line links into the changed files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 15:42:53 +01:00
Claude
b70595cebe fix(config): reject channel properties of the wrong type
- ptree::get(key, default) returns the default also for a value that
  does not convert, so a typo (e.g. sndBufSize=big) silently gave the
  default value
- Use the default only for a missing key; throw ParserError with the
  key and the value for a value of the wrong type
- Rethrow parser errors in the config plugin: before, the device
  logged the error and continued without its channel configuration
- Enable JSONParser and SuboptParser RejectsValuesOfTheWrongType
- Update the documentation pages that described the defect, and
  the source line links into the changed files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 15:42:53 +01:00
Claude
442b203d0d fix(fsm): refuse all transitions in the Error state
- The Error state is a terminate state: the state machine ignores all
  events in it and calls no action, so ChangeState() returned the
  result of the previous transition (ErrorFound: true)
- Return false for each transition in the Error state, except for
  ErrorFound: the device is already in the Error state, so callers
  such as ChangeStateOrThrow(ErrorFound) in Device::RunWrapper() or
  in user code do not throw
- Enable StateMachine.RefusesTransitionsInError
- Update the documentation pages that described the defect, and
  the source line links into the changed files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 15:42:53 +01:00
Claude
8de8505f8c fix(docs): center the content on wide screens
- Keep the table of contents at most 3rem wider than the sidebar
- Center the content between the two sidebars
- Use a content width of 52rem from a window width of 110rem

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 01:33:04 +01:00
Claude
93dfef1a74 docs: replace the Markdown docs with links to the site
- Remove docs/*.md and docs/images/
- Rewrite README.md: description, install, first steps and links to
  the site
- Replace the READMEs of the examples, fairmq/shmem, fairmq/devices and
  fairmq/tools with links to the site pages

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 01:21:28 +01:00
Claude
992db82b91 feat(docs): add the documentation site
- Astro and Starlight site in docs/ for
  https://fairrootgroup.github.io/FairMQ/
- 64 pages in eight groups: start, concepts, guides, shared memory,
  examples, tools, reference and project
- API reference and source browser from the Doxygen XML of fairmq/
- Code samples are snippets of the repository files; the build fails
  when a snippet does not match
- Option tables take the names, types and defaults from the code
- Interactive diagrams: state machine, zero-copy transfer, region
  acknowledgements, session objects, topology and channel anatomy
- The 404 page sends the URLs of the Doxygen site to the new pages
- scripts/check-pages.mjs checks pages, snippets and links without a
  build; scripts/check-links.mjs checks all links in dist/

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 01:21:28 +01:00
Claude
866f39f54e build!: remove the Doxygen documentation target
- Remove the option BUILD_DOCS, the target docs and the install of the
  HTML files
- Remove the Doxygen lookup and the docs line of the configure summary
- Remove docs/footer.html and the Doxygen entries of README.md

BREAKING CHANGE: The option BUILD_DOCS and the package component docs do
not exist any more. The site in docs/ replaces the Doxygen HTML.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 01:21:28 +01:00
Dennis Klein
0aecfff133 feat(plugins)!: Remove PMIx plugin 2023-03-02 11:20:35 +01:00
Dennis Klein
2e98a4e2cb feat(ofi)!: Remove ofi transport
BREAKING CHANGE

Due to a lack of users, we remove the experimental code. The
latest implementation can be found in release v1.4.56. This does
not mean it will never be picked up again, but for now there are
no plans.
2023-03-02 11:20:35 +01:00
Dennis Klein
ca420a0e0d feat(plugins): Allow kebab-case plugin names, e.g. libfairmq-plugin-pmix
Camel+snake-case plugin names are still allowed! e.g. `libFairMQPlugin_pmix`
2022-08-11 15:30:25 +02:00
Dennis Klein
12a85c6fb1 fix: Use namespaced typenames/headers 2022-08-11 15:30:25 +02:00
Dennis Klein
cda7282422 feat!: Remove deprecated components sdk, sdk_commands, dds_plugin
BREAKING CHANGE: Components have been moved to ODC project, see
https://github.com/FairRootGroup/FairMQ/discussions/392 for details.
2022-08-11 15:30:25 +02:00
Dennis Klein
5d45d89269 feat: Remove --max-run-time option
BREAKING CHANGE: was introduced in 1.4.0 release but appears unused
2022-03-21 16:28:43 +01:00
Dennis Klein
4e8f247a0d fix: First round of using new non-namespaced typenames 2021-09-07 20:53:16 +02:00
Dennis Klein
dff2b4b7d1 feat(tidy): Add new FairMQTidy.cmake module 2021-09-07 20:53:16 +02:00
Alexey Rybalchenko
a15d59c725 Remove nanomsg transport 2020-05-11 17:38:16 +02:00
Dennis Klein
0d46ffe010 Docs: Add section on the Controller SDK 2019-10-21 15:52:47 +02:00
Alexey Rybalchenko
2150257c1d Extend configuration docs 2019-07-11 18:58:46 +02:00
Alexey Rybalchenko
c515cbb3bf Update config documentation 2019-07-10 19:35:18 +02:00
Alexey Rybalchenko
cba6d19781 Add config plugin class. 2019-07-10 19:35:18 +02:00
Dennis Klein
374eb84039 Docs: Add section about plugins
Resolve #3
2019-06-24 18:18:29 +02:00
Alexey Rybalchenko
35399ee039 Update state machine picture 2019-04-29 20:32:37 +02:00
Alexey Rybalchenko
ec519cb318 update docs 2019-02-25 12:19:50 +01:00
Alexey Rybalchenko
ca694e4054 add privacy info link to doxygen 2018-05-24 16:06:28 +02:00
Dennis Klein
c0ebd58ee3 Update README 2018-04-10 18:52:57 +02:00