copilot icon indicating copy to clipboard operation
copilot copied to clipboard

`copilot-core`: record field `uTypeType` is unnecessary

Open ivanperez-keera opened this issue 2 years ago • 0 comments

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. As a matter of fact, we cannot use it to obtain the value inside the UType due to the existential it encloses. It also makes the test report lower coverage than they otherwise might, since the record access function is not used by the tests.

This field is not necessary parts of the interface to use Copilot, and not required by Copilot's requirements. Therefore, it would be suitable to remove that definitions from the module.

As per our internal policy of waiting 3 versions from deprecation until a public interface declaration can be removed, those definitions should be deprecated.

Type

  • Bug: unused code included in the implementation.

Additional context

None.

Requester

  • Ivan Perez

Method to check presence of bug

The field is mentioned in the record definition, but making it a non-record datatype, or not exporting that field in the module exports, does not change the behavior and does not otherwise affect Copilot.

The code compiles without errors and behaves in the same way:

Expected result

The following elements are deprecated:

  • Copilot.Core.Type.UType.uTypeType

Desired result

The following elements are deprecated:

  • Copilot.Core.Type.UType.uTypeType

Proposed solution

Deprecate the following functions:

  • Copilot.Core.Type.UType.uTypeType

Further notes

None.

ivanperez-keera avatar Dec 28 '23 13:12 ivanperez-keera