1. 11 Sep, 2024 3 commits
  2. 10 Sep, 2024 2 commits
  3. 09 Sep, 2024 2 commits
    • Grégoire Locqueville's avatar
      Remove useless code, dependencies, warnings · 802e0cdf
      Grégoire Locqueville authored
      - Re-enable orphan warnings that were manually disabled in many modules
      - Remove non-Haskell files that were just sitting in the source tree
      - Remove modules that were not called from anywhere
      - Remove unused dependencies
      
      This is not exhaustive by any means. In particular, some more weeding out
      can be achieved by looking at individual functions and even branches of
      functions. Weeder can help with that.
      802e0cdf
    • Alexandre Delanoë's avatar
      [VERSION] +1 to 0.0.7.2.4 · 0b5ce744
      Alexandre Delanoë authored
      0b5ce744
  4. 05 Sep, 2024 8 commits
  5. 04 Sep, 2024 10 commits
  6. 03 Sep, 2024 5 commits
  7. 02 Sep, 2024 6 commits
    • Alfredo Di Napoli's avatar
      ws: remove calls to recvMalloc · 15b732f5
      Alfredo Di Napoli authored
      Remove the calls to `recvMalloc` in favour of using the (patched) `recv`
      from the original nanomsg library, which shouldn't segfault anymore. The
      reason for using `recv` are a few, but mostly the fact that `recv` can
      allocated arbitrary-long payloads data (up to the 1MB limit) without an
      hardcoded limit like `recvMalloc` was imposing. Furthermore, `recv` does
      resource cleanup for us via `c_nn_freemsg`, whereas `recvMalloc` is not
      thread/exception safe. Consider the implementation:
      
      ```
      recvMalloc :: Receiver a => Socket a -> Int -> IO ByteString
      recvMalloc (Socket t sid) numBytes = do
        ptr <- mallocBytes numBytes
        -- receive by blocking the thread
        len <- c_nn_recv sid ptr (#const NN_MSG) 0 -- (#const NN_DONTWAIT)
        str <- C.packCStringLen (castPtr ptr, fromIntegral len)
        free ptr
        return str
      ```
      
      If any exception (synchronous or asynchronous) strikes _before_ the call
      to `free`, we would be leaking C memory.
      15b732f5
    • Alfredo Di Napoli's avatar
      ws: make Dispatcher abstract · 7c0d6ba0
      Alfredo Di Napoli authored
      The `Dispatcher` type is now opaque and not exported by
      `.AsyncUpdates.Dispatcher`, and it has been moved out of the `.Types`.
      
      This ensures that we can make the internal record fields private, and
      offer accessors for things like `terminateDispatcher`. This preserve
      information hiding and allows us to change the internal way of
      terminating a dispatcher (for example switching away from normal
      `forkIO` in favour of `async` & co) while not breaking client's code.
      7c0d6ba0
    • Alfredo Di Napoli's avatar
      ws: abstract with pattern in withNotifications · 65053486
      Alfredo Di Napoli authored
      This commit refactors the common pattern `bracket init deinit use` in
      `withNotifications` in `drivers.hspec.Main`, so that `withNotifications`
      in atomic and the user doesn't incur in the pattern of using the init
      and deinit functions independently from the `bracket`.
      
      To be faithful about what I preach, we should do the same for
      `startCoreNLPServer` and `stopCoreNLPServer`.
      65053486
    • Alfredo Di Napoli's avatar
      ws: tighten the dispatcher public API · c5336b22
      Alfredo Di Napoli authored
      This commit tightens up the public API exposed by the Dispatcher,
      for similar reasons as we had for the CentralExchange.
      c5336b22
    • Alfredo Di Napoli's avatar
      ws: tighten CentralExchange API · b09e6de2
      Alfredo Di Napoli authored
      This commit tigthen the public API for the `.CentralExchange` module,
      so that it's clear which are the exported (public) functions, and
      we do not leak the transport layer used by the central exchange
      b09e6de2
    • Alfredo Di Napoli's avatar
      portRouteInfo shows status of proxy · 2a1439e3
      Alfredo Di Napoli authored
      This commit does two things: it reports the status of the microservices
      proxy in the `portRouteInfo`, so that if that's disabled we would
      immediately know, and it also stop spawn the proxy `Application` in case
      it's disabled. This wasn't the case before; previously we would be
      spawing the proxy process even though it was "morally" disabled.
      2a1439e3
  8. 30 Aug, 2024 3 commits
  9. 29 Aug, 2024 1 commit