Skip to content
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

ogma-core: Remove dependency on IfElse #150

Closed
ivanperez-keera opened this issue Sep 19, 2024 · 6 comments
Closed

ogma-core: Remove dependency on IfElse #150

ivanperez-keera opened this issue Sep 19, 2024 · 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

ivanperez-keera commented Sep 19, 2024

Description

The dependency on IfElse is quite unnecessary: it seems like the only function we use from that library is awhen :: Monad m => Maybe a -> (a -> m ()) -> m (), which is a type-specialized version of Data.Foldable.for_.. Since the latter is in base, we can simplify Ogma by removing the dependency on IfElse.

Type

  • Management: Reduce technical debt, in compliance with style guide.

Additional context

None.

Requester

  • Ivan Perez

Method to check presence of bug

Not applicable (not a bug).

Expected result

IfElse is not required by any library in ogma.

Desired result

IfElse is not required by any library in ogma.

Proposed solution

Replace calls to awhen with calls to for_

Remove the dependency on IfElse.

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 Sep 22, 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 Sep 22, 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 Sep 22, 2024
@ivanperez-keera
Copy link
Member Author

ivanperez-keera commented Sep 22, 2024

Technical Lead: Issue scheduled for fixing in Ogma 1.4.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 Sep 22, 2024
@ivanperez-keera ivanperez-keera added this to the 1.5.0 milestone Sep 22, 2024
@ivanperez-keera ivanperez-keera self-assigned this Sep 22, 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 Sep 22, 2024
@ivanperez-keera ivanperez-keera changed the title Remove dependency on IfElse ogma-core: Remove dependency on IfElse Sep 22, 2024
ivanperez-keera added a commit that referenced this issue Sep 22, 2024
The dependency on IfElse is quite unnecessary: it seems like the only
function we use from that library is awhen :: Monad m => Maybe a -> (a
-> m ()) -> m (), which is a type-specialized version of
Data.Foldable.for_.. Since the latter is in base, we can simplify Ogma
by removing the dependency on IfElse.

This commit replaces uses of awhen with uses of for_.
ivanperez-keera added a commit that referenced this issue Sep 22, 2024
All uses of functions from IfElse have been replaced with uses of
functions from base. This commit removes the dependency on IfElse from
the ogma-core's cabal file.
ivanperez-keera added a commit that referenced this issue Sep 22, 2024
The dependency on IfElse is quite unnecessary: it seems like the only
function we use from that library is awhen :: Monad m => Maybe a -> (a
-> m ()) -> m (), which is a type-specialized version of
Data.Foldable.for_.. Since the latter is in base, we can simplify Ogma
by removing the dependency on IfElse.

This commit replaces uses of awhen with uses of for_.
ivanperez-keera added a commit that referenced this issue Sep 22, 2024
All uses of functions from IfElse have been replaced with uses of
functions from base. This commit removes the dependency on IfElse from
the ogma-core's cabal file.
ivanperez-keera added a commit to ivanperez-keera/ogma that referenced this issue Sep 22, 2024
The dependency on IfElse is quite unnecessary: it seems like the only
function we use from that library is awhen :: Monad m => Maybe a -> (a
-> m ()) -> m (), which is a type-specialized version of
Data.Foldable.for_.. Since the latter is in base, we can simplify Ogma
by removing the dependency on IfElse.

This commit replaces uses of awhen with uses of for_.
ivanperez-keera added a commit to ivanperez-keera/ogma that referenced this issue Sep 22, 2024
All uses of functions from IfElse have been replaced with uses of
functions from base. This commit removes the dependency on IfElse from
the ogma-core's cabal file.
ivanperez-keera added a commit to ivanperez-keera/ogma that referenced this issue Sep 22, 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 Sep 22, 2024
@ivanperez-keera
Copy link
Member Author

Change Manager: Verified that:

  • Solution is implemented:
  • Implementation is documented. Details:
    No need for updates to documentation.
  • Change history is clear.
  • Commit messages are clear.
  • Changelogs are updated.
  • Examples are updated. Details:
    No examples affected.
  • Required version bumps are evaluated. Details:
    No update needed; the improvement reduces dependencies.

@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 Sep 22, 2024
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
Projects
None yet
Development

No branches or pull requests

1 participant