Skip to content

copilot-core: Remove deprecated record field Copilot.Core.Type.uTypeType #615

New issue

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

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

Already on GitHub? Sign in to your account

Closed
ivanperez-keera opened this issue Apr 17, 2025 · 6 comments
Assignees
Labels
CR:Status:Closed Admin only: Change request that has been completed CR:Type:Management Admin only: Change request for conformance with policies or procedures
Milestone

Comments

@ivanperez-keera
Copy link
Member

Description

The record field uTypeType, part of Copilot.Core.Type.UType, is never really used within the module or in any other part of Copilot or, as far as we know, by any user of Copilot.

The record field was deprecated in Copilot 4.1 and no messages have been received requesting that it be kept in this library.

As per our internal policy of waiting 3 versions from deprecation until a public interface declaration can be removed, this definition can now be removed.

Type

  • Management: remove deprecated code.

Additional context

Requester

  • Ivan Perez

Method to check presence of bug

Not applicable (not a bug).

Expected result

Running the check below prints a message indicating that the field imported does not exist:

$ runhaskell <<< 'import Copilot.Core(uTypeType); main = return ()'

Desired result

Running the check below prints a message indicating that the field imported does not exist:

$ runhaskell <<< 'import Copilot.Core(uTypeType); main = return ()'

Proposed solution

Remove the deprecated definition copilot-core:Copilot.Core.Type.uTypeType, and any references to them. Adjust documentation accordingly, if needed.

Further notes

None.

@ivanperez-keera ivanperez-keera added CR:Status:Initiated Admin only: Change request that has been initiated CR:Type:Management Admin only: Change request for conformance with policies or procedures labels Apr 17, 2025
@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 Apr 17, 2025
@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 Apr 17, 2025
@ivanperez-keera
Copy link
Member Author

Technical Lead: Issue scheduled for fixing in Copilot 4.4.

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 Apr 17, 2025
@ivanperez-keera ivanperez-keera added this to the 4.4 milestone Apr 17, 2025
@ivanperez-keera ivanperez-keera self-assigned this Apr 17, 2025
@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 Apr 21, 2025
ivanperez-keera added a commit to ivanperez-keera/copilot that referenced this issue Apr 21, 2025
…ilot-Language#615.

The record field uTypeType, part of Copilot.Core.Type.UType, is never really
used within the module or in any other part of Copilot or, as far as we know,
by any user of Copilot. The record field was deprecated in Copilot 4.1 and no
messages have been received requesting that it be kept in this library. As per
our internal policy of waiting 3 versions from deprecation until a public
interface declaration can be removed, this definition can now be removed.

This commit removes the field uTypeType from the definition of
Copilot.Core.Type.UType, making the type no longer a record.
ivanperez-keera added a commit to ivanperez-keera/copilot that referenced this issue Apr 21, 2025
@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 Apr 23, 2025
@ivanperez-keera
Copy link
Member Author

Change Manager: Verified that:

  • Solution is implemented:
    • The code proposed compiles and passes all tests. Details:
      Build log: https://github.com/Copilot-Language/copilot/runs/40886486874
    • The solution proposed produces the expected result. Details:
      The following Dockerfile tries to import the deprecated record field, succeeding only when the import fails, after which 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 \
            z3
      
      RUN mkdir -p $HOME/.ghcup/bin
      RUN curl https://downloads.haskell.org/~ghcup/0.1.40.0/x86_64-linux-ghcup-0.1.40.0 -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.10.1
      RUN ghcup install cabal 3.2
      RUN ghcup set ghc 9.10.1
      RUN cabal update
      
      SHELL ["/bin/bash", "-c"]
      CMD git clone $REPO && cd $NAME && git checkout $COMMIT && cd .. \
        && cabal v1-sandbox init \
        && cabal v1-install alex happy --constraint='happy <= 2' \
        && cabal v1-install $NAME/copilot**/ \
        && ! cabal v1-exec -- runhaskell <<< 'import Copilot.Core(uTypeType); main = return ()' \
        && 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=3e0b13d8a1b4f9317759a11fc4a4c65056cb9033 copilot-verify-615
      
  • Implementation is documented. Details:
    No updates needed; change removes definitions not mentioned in the documentation.
  • Change history is clear.
  • Commit messages are clear.
  • Changelogs are updated.
  • Examples are updated. Details:
    No updates needed; change removes definitions not mentioned in the examples.
  • Author is internal or has provided signed CLA.
  • Required version bumps are evaluated. Details:
    Bump required; change affects the API.

@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 Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CR:Status:Closed Admin only: Change request that has been completed CR:Type:Management Admin only: Change request for conformance with policies or procedures
Development

No branches or pull requests

1 participant