Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

copilot-theorem: Failure to compile with GHC 9.6.3 #491

Closed
ivanperez-keera opened this issue Jan 8, 2024 · 6 comments
Closed

copilot-theorem: Failure to compile with GHC 9.6.3 #491

ivanperez-keera opened this issue Jan 8, 2024 · 6 comments
Assignees
Labels
CR:Status:Closed Admin only: Change request that has been completed CR:Type:Bug Admin only: Change request pertaining to error detected
Milestone

Comments

@ivanperez-keera
Copy link
Member

Description

copilot-theorem is failing to compile with GHC 9.6.3. This is because the module Control.Monad.State no longer re-exports Control.Monad, so the functions ap, forM, when, liftM and liftM2 are not in scope. Another issue is that System.Directory can no longer be imported safely. These errors are causing the build to fail on hackage, which uses GHC 9.6.3.

Type

  • Bug: Failure to compile with version of dependency.

Additional context

Requester

  • Ivan Perez

Method to check presence of bug

Compiling with GHC 9.6 fails.

Expected result

Compiling with GHC 9.6 succeeds.

Desired result

Compiling with GHC 9.6 succeeds.

Proposed solution

Modify copilot-theorem to import Control.Monad, and to not import System.Directory safely.

Further notes

None.

@ivanperez-keera ivanperez-keera added CR:Type:Bug Admin only: Change request pertaining to error detected CR:Status:Initiated Admin only: Change request that has been initiated labels Jan 8, 2024
@ivanperez-keera
Copy link
Member Author

Change Manager: Confirmed that the issue exists.

@ivanperez-keera ivanperez-keera added CR:Status:Confirmed Admin only: Change request that has been acknowledged by the change manager and removed CR:Status:Initiated Admin only: Change request that has been initiated labels Jan 8, 2024
@ivanperez-keera
Copy link
Member Author

Technical Lead: Confirmed that the issue should be addressed.

@ivanperez-keera ivanperez-keera added CR:Status:Accepted Admin only: Change request accepted by technical lead and removed CR:Status:Confirmed Admin only: Change request that has been acknowledged by the change manager labels Jan 8, 2024
@ivanperez-keera
Copy link
Member Author

Technical Lead: Issue scheduled for fixing in Copilot 3.18.1.

Fix assigned to: @ivanperez-keera .

@ivanperez-keera ivanperez-keera added CR:Status:Scheduled Admin only: Change requested scheduled and removed CR:Status:Accepted Admin only: Change request accepted by technical lead labels Jan 8, 2024
@ivanperez-keera ivanperez-keera added this to the 3.18.1 milestone Jan 8, 2024
@ivanperez-keera ivanperez-keera self-assigned this Jan 8, 2024
@ivanperez-keera ivanperez-keera added CR:Status:Implementation Admin only: Change request that is currently being implemented and removed CR:Status:Scheduled Admin only: Change requested scheduled labels Jan 8, 2024
ivanperez-keera added a commit to ivanperez-keera/copilot that referenced this issue Jan 8, 2024
ivanperez-keera added a commit to ivanperez-keera/copilot that referenced this issue Jan 8, 2024
The module Copilot.Theorem.Misc.Utils, which is marked as safe, imports
System.Directory, which in a recent minor update, has been marked as not
safe. This makes the import illegal.

This commit updates the module Copilot.Theorem.Misc.Utils as
trustworthy, so that the import of System.Directory does not lead to a
compilation error.
ivanperez-keera added a commit to ivanperez-keera/copilot that referenced this issue Jan 8, 2024
…-Language#491.

The modules in Control.Monad.* in mtl >= 2.3 no longer re-export
Control.Monad, leading to a number of compilation errors in
copilot-theorem. Since mtl >= 2.3 is required for Copilot to work with
GHC 9.6 and above, this issue prevents Copilot from compiling with
current versions of GHC, including the one in hackage.

This commit updates copilot-theorem so that any imports from
Control.Monad are explicit and not via re-exports from other modules.
ivanperez-keera added a commit to ivanperez-keera/copilot that referenced this issue Jan 8, 2024
…anguage#491.

A recent update to copilot-theorem makes all of Copilot compatible with
GHC 9.6. This commit updates the README to reflect such compatibility.
ivanperez-keera added a commit to ivanperez-keera/copilot that referenced this issue Jan 8, 2024
ivanperez-keera added a commit to ivanperez-keera/copilot that referenced this issue Jan 8, 2024
@ivanperez-keera
Copy link
Member Author

Implementor: Solution implemented, review requested.

@ivanperez-keera ivanperez-keera added CR:Status:Verification Admin only: Change request that is currently being verified and removed CR:Status:Implementation Admin only: Change request that is currently being implemented labels Jan 8, 2024
@ivanperez-keera
Copy link
Member Author

ivanperez-keera commented Jan 8, 2024

Change Manager: Verified that:

  • Solution is implemented:
    • The code proposed compiles and passes all tests. Details:
      Build log: https://app.travis-ci.com/github/Copilot-Language/copilot/builds/268180998

    • The solution proposed produces the expected result. Details:
      The following Dockerfile checks Copilot can be installed with GHC 9.6, in which case it prints the message Success:

      FROM ubuntu:focal
      
      RUN apt-get update
      
      RUN apt-get install --yes libz-dev
      RUN apt-get install --yes git
      
      RUN apt-get install --yes wget
      RUN mkdir -p $HOME/.ghcup/bin
      RUN wget https://downloads.haskell.org/~ghcup/0.1.17.7/x86_64-linux-ghcup-0.1.17.7 -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/
      RUN apt-get install --yes curl
      RUN apt-get install --yes gcc g++ make libgmp3-dev
      
      RUN ghcup install ghc 9.6.3
      RUN ghcup install cabal 3.4
      RUN ghcup set ghc 9.6.3
      RUN cabal update
      
      SHELL ["/bin/bash", "-c"]
      CMD git clone $REPO \
          && cd $NAME \
          && git checkout $COMMIT \
          && cabal install --lib copilot**/ \
          && echo Success

      Command (substitute variables based on new path after merge):

      $ docker run -e "REPO=https://github.com/ivanperez-keera/copilot" -e "NAME=copilot" -e "COMMIT=b9c7f5861cd05fe87958f9f067f91ff1bfe908bb" -it copilot-verify-491
      
  • Implementation is documented. Details:
    README updated.
  • Change history is clear.
  • Commit messages are clear.
  • Changelogs are updated.
  • Examples are updated. Details:
    No updates needed.
  • Required version bumps are evaluated. Details:
    Bump not needed (new versions allowed but not required).

@ivanperez-keera
Copy link
Member Author

Change Manager: Implementation ready to be merged.

@ivanperez-keera ivanperez-keera added CR:Status:Closed Admin only: Change request that has been completed and removed CR:Status:Verification Admin only: Change request that is currently being verified labels Jan 8, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
CR:Status:Closed Admin only: Change request that has been completed CR:Type:Bug Admin only: Change request pertaining to error detected
Development

No branches or pull requests

1 participant