Skip to content

fix(ci): skip MQTT plugins in the Nix build where PahoMqttCpp is absent#72

Open
estebanzimanyi wants to merge 1 commit into
MobilityDB:mainfrom
estebanzimanyi:fix/nebula-nix-mqtt-optional
Open

fix(ci): skip MQTT plugins in the Nix build where PahoMqttCpp is absent#72
estebanzimanyi wants to merge 1 commit into
MobilityDB:mainfrom
estebanzimanyi:fix/nebula-nix-mqtt-optional

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

The Nix devShell and package build do not provide PahoMqttCpp. `find_package(PahoMqttCpp CONFIG REQUIRED)` in the MQTT source and sink plugin CMakeLists files aborts every Nix CI run at the configure step. A new `NES_ENABLE_MQTT` cmake option (default `ON`) gates both MQTT plugin activations; `flake.nix` passes `-DNES_ENABLE_MQTT=OFF` so the Nix build skips the MQTT source and sink plugins. Non-Nix builds (Docker, local) are unaffected.

@estebanzimanyi estebanzimanyi force-pushed the fix/nebula-nix-mqtt-optional branch 6 times, most recently from 2970bde to b99c59c Compare June 11, 2026 17:42
…aho-mqtt-cpp

The Nix environment provides paho-mqtt-cpp as a shared-only library and does
not include libmeos.  Four changes make the build pass:

- flake.nix: add stock paho-mqtt-c + paho-mqtt-cpp to baseThirdPartyDeps;
  pass -DNES_ENABLE_MEOS=OFF in both defaultPackage and devShell cmakeFlags.

- nes-plugins/CMakeLists.txt: introduce NES_ENABLE_MQTT and NES_ENABLE_MEOS
  options that gate the respective plugin subdirectories via
  activate_optional_plugin().

- nes-plugins/Sources/MQTTSource, nes-plugins/Sinks/MQTTSink: select
  PahoMqttCpp::paho-mqttpp3-static when available, fall back to the shared
  PahoMqttCpp::paho-mqttpp3 target (Nix only ships the shared variant).

- nes-physical-operators: gate all MEOS-specific add_plugin calls and the
  nes-meos link behind if(NES_ENABLE_MEOS) in three CMakeLists files
  (top-level, Functions/Meos, Aggregation/Function/Meos).

- CMakeLists.txt (root): declare option(NES_ENABLE_MEOS) and
  add_compile_definitions(NES_ENABLE_MEOS) before the nes-* subdirectory
  loop so the preprocessor symbol is visible to all sibling components.

- nes-query-optimizer/LowerToPhysicalWindowedAggregation.cpp: guard the
  TemporalSequenceAggregationPhysicalFunction include and instantiation
  with #ifdef NES_ENABLE_MEOS so the translation unit compiles and links
  when MEOS is disabled.
@estebanzimanyi estebanzimanyi force-pushed the fix/nebula-nix-mqtt-optional branch from a6e24e1 to 6b54911 Compare June 11, 2026 18:32
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