Skip to content

Remove code duplication and unify definition of 'trim' function. #7795

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

Merged
merged 4 commits into from
Nov 4, 2021

Conversation

kczulko
Copy link
Collaborator

@kczulko kczulko commented Nov 4, 2021

Attempt to fix #7744 .

That's my first ever cabal PR so I somehow don't know what I'm doing. Just picked up first good-first-issue because I've found this https://twitter.com/bkmlep/status/1432474203245015040

Distribution.Utils.String sounds like a good place for trim but I had to expose this module unfortunately.

This the situation after my change:
image

Any advice or criticism fully welcomed!

Karol


Please include the following checklist in your PR:

Please also shortly describe how you tested your change. Bonus points for added tests!

@Mikolaj
Copy link
Member

Mikolaj commented Nov 4, 2021

The CI failures seems to be caused by github upgrading to GHC 9.2.1. We'll have to fix our CI.

@Mikolaj
Copy link
Member

Mikolaj commented Nov 4, 2021

Please kindly rebase and the two CI failures should be gone.

Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice clean up, Thanks!

@kczulko kczulko force-pushed the 7744-unify-trim-function branch from f8dec1b to 57d6578 Compare November 4, 2021 20:08
Copy link
Member

@Mikolaj Mikolaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fgaz
Copy link
Member

fgaz commented Nov 4, 2021

Do we add @since annotations now or on release?

edit: do we even do @since annotations?

@Mikolaj
Copy link
Member

Mikolaj commented Nov 4, 2021

It seems we do:

Cabal/src/Distribution/Version.hs:-- @since 3.6.0.0

Not sure about this particular case, because the function was available long before (though from different places).

Anyway, it makes sense to add them ASAP, because we are on fire and the world is falling when we release.

@kczulko
Copy link
Collaborator Author

kczulko commented Nov 4, 2021

@Mikolaj
How can I obtain the next release version in order to add @since label?

@Mikolaj
Copy link
Member

Mikolaj commented Nov 4, 2021

Oh, I forgot not all people are relaxed regarding time travel. It will be 3.8.

@fgaz fgaz added squash+merge me Tell Mergify Bot to squash-merge merge me Tell Mergify Bot to merge and removed squash+merge me Tell Mergify Bot to squash-merge merge me Tell Mergify Bot to merge labels Nov 4, 2021
@mergify mergify bot merged commit 5b4258c into haskell:master Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
squash+merge me Tell Mergify Bot to squash-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The seven definitions of trim
4 participants