Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 2, 2025

This PR adds GitHub Actions CI to automatically build and test the project, and fixes several compatibility issues that prevented the project from building with modern toolchains.

Motivation

The repository did not have automated CI, making it unclear whether the project still builds with modern versions of GHC, Cabal, and system libraries. This PR answers that question definitively: yes, it builds (with some necessary fixes).

Changes

GitHub Actions CI Workflow

Added .github/workflows/ci.yml that:

  • Runs on pushes and pull requests to master
  • Installs the QuickFIX C++ library dependency (libquickfix-dev)
  • Sets up Haskell with GHC 9.4 and Cabal 3.10
  • Caches dependencies for faster builds
  • Builds the project to verify compilation

Haskell Compatibility Fixes

Type family constraints - Modern GHC (9.12+) requires UndecidableInstances when using type families in constraints:

  • Added {-# LANGUAGE UndecidableInstances #-} to src/AlphaHeavy/QuickFIX/GReceive.hs
  • Added {-# LANGUAGE UndecidableInstances #-} to src/AlphaHeavy/QuickFIX/GSend.hs

Time library API change - The time library deprecated parseTime in favor of parseTimeM:

  • Updated src/AlphaHeavy/QuickFIX/GetMessageField.hs to use parseTimeM True instead of parseTime

C++ Compatibility Fixes

C++ standard - The QuickFIX library uses dynamic exception specifications, which were deprecated in C++11 and removed in C++17:

  • Added -optcxx-std=c++11 to GHC options in alphaheavy-quickfix.cabal to compile C++ code with C++11 standard
  • This allows the code to use the exception specifications required by QuickFIX library headers

Missing return statement:

  • Fixed sessionString function in cbits/QuickFIXThunks.cpp to return the result of strdup

Build Configuration

  • Added dist-newstyle/ to .gitignore to exclude modern Cabal build artifacts

Testing

The project now builds successfully with:

  • GHC 9.12.2 (locally tested)
  • GHC 9.4 (configured for CI)
  • Cabal 3.10+
  • Ubuntu 24.04 with libquickfix-dev from apt

All changes are minimal and focused on compatibility without altering functionality.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

add Github actions to this repo; does it still build?


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits October 2, 2025 03:56
Co-authored-by: NathanHowell <170829+NathanHowell@users.noreply.github.com>
Co-authored-by: NathanHowell <170829+NathanHowell@users.noreply.github.com>
Copilot AI changed the title [WIP] add Github actions to this repo; does it still build? Add GitHub Actions CI and fix build compatibility issues Oct 2, 2025
Copilot AI requested a review from NathanHowell October 2, 2025 04:07
Copy link
Contributor Author

Copilot AI commented Oct 2, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@NathanHowell NathanHowell merged commit 6be6274 into master Oct 2, 2025
5 checks passed
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.

2 participants