contour-terminal / contour

Modern C++ Terminal Emulator
http://contour-terminal.org/
Apache License 2.0
2.41k stars 104 forks source link

Drop range-v3 and replace it with `std::ranges` #1611

Open christianparpart opened 1 week ago

christianparpart commented 1 week ago

We want to reduce external dependencies and embrace standards.

C++20 comes with its own <ranges> library, so there is no need to depend on range-v3 library anymore.

Most places should be trivial to adapt. If any first-time contributor comes across this ticket, don't hesitate to talk to us on Discord, so we can help you getting on board and guide you through.

DIlkhush00 commented 1 week ago

Hi @christianparpart , I would love to tackle this issue. Could you please provide more details on it?

christianparpart commented 1 week ago

Hi @christianparpart , I would love to tackle this issue. Could you please provide more details on it?

Oh this is great to hear. I think the following is the action list that needed to be done:

  1. get rid of the range-v3 dependency
  2. replace ranges namespace with std::ranges

Getting rid of the dependency

If you do a git grep range-v3 on the command line, you should get the list of files that need to be touched:

All of those files should simply get the occurrence removed. (In case of problems, just ask us)

Replacing the actual code calls

This should(tm) be as simple as replacing all ::ranges:: with std::ranges::. But of course, there might be some corner cases that are not that trivial.

Keep in mind, that Standard C++20 also provides a shortcut for std::ranges::views to std::views, that might make it easier to look at and use/type.

p.s.: If you create a PR early, we can also give early feedback. You don't have to wait until it is fully working, in case it might take you longer. Keep in mind, you can also join us on Discord for (most of the time) realtime chatting, in case it might help.

Good luck! And many thanks.

EKS2003 commented 1 week ago

Hey! Has this been fixed? I would like to give it a try.

christianparpart commented 1 week ago

Hey @EKS2003. It's a pleasure to get such a positive feedback from all of you, guys. However, this ticket has already been claimed. I can recommend you #1613, even though, this is a really trivial one (I'm sorry), it yet has to be done.

Apart from that, i sadly do not know how much you want to dive in, but we could surely find more, when you join us on Discord, so we can figure a good and easy ticket out for you.

Many thanks from all of you.

DIlkhush00 commented 1 week ago

Hi @christianparpart , something urgent has come up, and I won't be able to work on this issue at the moment. It's great that there's already someone claiming it. You can go ahead and assign it to @EKS2003

christianparpart commented 1 week ago

@DIlkhush00 I'm sorry to hear that. Many thanks for informing us :)

Yaraslaut commented 1 week ago

Hi @EKS2003, is there any updates?