copilot icon indicating copy to clipboard operation
copilot copied to clipboard

`copilot-bluespec`: Tests are failing on Hackage

Open RyanGlScott opened this issue 5 months ago • 5 comments

Description

The copilot-bluespec requires bsc (the Bluespec compiler) to be installed in order to run its test suite, but the builders that Hackage uses to run uploaded packages' test suites do not have bsc installed, causing Hackage to spuriously claim that copilot-bluespec's tests are failing.

Type

  • Bug: Hackage incorrectly claims test failures.

Additional context

https://github.com/haskell/hackage-server/issues/1414 is a broader discussion about whether tests can be disabled on Hackage, or alternatively whether bsc can be installed on Hackage builders to allow the copilot-bluespec test suite to pass. This discussion is blocked pending further action from Hackage maintainers.

Requester

  • Ryan Scott (Galois)

Method to check presence of bug

https://hackage.haskell.org/package/copilot-bluespec/reports, which shows the build status for the most recently uploaded version of copilot-bluespec, shows "Failed" in the Tests column.

Expected result

https://hackage.haskell.org/package/copilot-bluespec/reports should show "Ok" or "NotTried" in the Tests column in the details page.

Desired result

https://hackage.haskell.org/package/copilot-bluespec/reports should show "NotTried" in the Tests column.

Proposed solution

Pending a resolution to https://github.com/haskell/hackage-server/issues/1414, employ a workaround by disabling copilot-bluespec's test suite by default in its .cabal file.

Further notes

None.

RyanGlScott avatar Sep 18 '25 15:09 RyanGlScott

Change Manager: Modified issued description to adjust possible expected and desired results.

ivanperez-keera avatar Nov 21 '25 17:11 ivanperez-keera

Change Manager: Confirmed that the issue exists.

ivanperez-keera avatar Nov 21 '25 17:11 ivanperez-keera

Technical Lead: Confirmed that the issue should be addressed.

ivanperez-keera avatar Nov 21 '25 17:11 ivanperez-keera

Technical Lead: Issue scheduled for fixing in Copilot 4.6.1.

Fix assigned to: @chathhorn-galois .

EDIT (2026-01-08): Modified to adjust the actual version of Copilot after release.

ivanperez-keera avatar Nov 21 '25 18:11 ivanperez-keera

Implementor: Solution implemented, review requested.

chathhorn-galois avatar Dec 04 '25 23:12 chathhorn-galois

Change Manager: Verified that:

  • Solution is implemented:
    • [X] The code proposed compiles and passes all tests. Details: Build log: https://app.travis-ci.com/github/Copilot-Language/copilot/builds/277177872
    • [X] The solution proposed produces the expected result. Details: The following Dockerfile checks that the tests can be disabled via a flag, and that they can be re-enabled with the same flag, after which it prints the message "Success":
      FROM ubuntu:focal
      
      ENV DEBIAN_FRONTEND=noninteractive
      RUN apt-get update
      
      RUN apt-get install --yes \
            libz-dev \
            git \
            curl \
            gcc \
            g++ \
            make \
            libgmp3-dev  \
            pkg-config
      
      RUN mkdir -p $HOME/.ghcup/bin
      RUN curl https://downloads.haskell.org/~ghcup/0.1.50.2/x86_64-linux-ghcup-0.1.50.2 -o $HOME/.ghcup/bin/ghcup
      RUN chmod a+x $HOME/.ghcup/bin/ghcup
      ENV PATH=$PATH:/root/.ghcup/bin/
      ENV PATH=$PATH:/root/.cabal/bin/
      
      SHELL ["/bin/bash", "-c"]
      
      RUN ghcup install ghc 9.2
      RUN ghcup install cabal 3.2
      RUN ghcup set ghc 9.2.8
      RUN cabal update
      
      SHELL ["/bin/bash", "-c"]
      CMD git clone $REPO \
          && cd $NAME \
          && git checkout $COMMIT \
          && cd copilot-bluespec \
          && cabal v1-install --enable-tests --only-dependencies \
          && cabal v1-configure --enable-tests \
          && (cabal v1-test  | grep -e 'Package has no buildable test suites') \
          && cabal v1-install --enable-tests --only-dependencies -ftest-bluespec \
          && cabal v1-configure --enable-tests -ftest-bluespec \
          && ! cabal v1-test \
          && echo "Success"
      
      Command (substitute variables based on new path after merge):
      $ docker run -e REPO=https://github.com/GaloisInc/copilot-1 -e NAME=copilot-1 -e COMMIT=03fc7d4059d762641c8fccc9076533dca626aa63 copilot-verify-673
      
  • [X] Implementation is documented. Details: New flag is documented.
  • [X] Change history is clear.
  • [X] Commit messages are clear.
  • [X] Changelogs are updated.
  • [X] Examples are updated. Details: No updates needed; change is to the cabal file.
  • [X] Required version bumps are evaluated. Details: Bump not required; change is to Cabal package affecting tests only.

ivanperez-keera avatar Jan 07 '26 21:01 ivanperez-keera

Change Manager: Implementation ready to be merged.

ivanperez-keera avatar Jan 07 '26 21:01 ivanperez-keera