-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Description
The functions Copilot.Core.Type.typename
, Copilot.Core.Type.tylength
, Copilot.Core.Type.tysize
, Copilot.Core.Type.fieldname
, Copilot.Core.Type.accessorname
and Copilot.Core.Type.Array.arrayelems
are not being used by any other part of Copilot.
They were replaced by functions with similar names in lowerCamelCase format. The original functions were deprecated in Copilot 3.17 and no messages have been received requesting that they be kept in this library.
As per our internal policy of waiting 3 versions from deprecation until a public interface declaration can be removed, these functions can now be removed.
Type
- Bug: unused code included in the implementation.
Additional context
- Issue
copilot-core
: Compliance with style guide (partial) (3) #457 , addressed in Copilot 3.17, deprecated the functions.
Requester
- Ivan Perez
Method to check presence of bug
There is no easy, forwards-compatible, automated way of detecting that the functions are present and also deprecated. Manual inspection is recommended. At present, they are the only deprecated functions in copilot-core
, so their presence can be found with:
$ grep -nHre 'DEPRECATED' src/
src/Copilot/Core/Type.hs:58:-- {-# DEPRECATED typename "Use typeName instead." #-}
src/Copilot/Core/Type.hs:85:-- {-# DEPRECATED fieldname "Use fieldName instead." #-}
src/Copilot/Core/Type.hs:96:-- {-# DEPRECATED accessorname "Use accessorName instead." #-}
src/Copilot/Core/Type.hs:139:-- {-# DEPRECATED tylength "Use typeLength instead." #-}
src/Copilot/Core/Type.hs:149:-- {-# DEPRECATED tysize "Use typeSize instead." #-}
src/Copilot/Core/Type/Array.hs:47:{-# DEPRECATED arrayelems "Use ArrayElems instead." #-}
Expected result
The strings returned by the command above should be empty (nothing is deprecated).
Desired result
The strings returned by the command above should be empty (nothing is deprecated).
Proposed solution
Remove the deprecated functions from Copilot.Core.Type
and Copilot.Core.Type.Array
.
Further notes
None.