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

Migrate newpipe.error to Kotlin #10922

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

Migrate newpipe.error to Kotlin #10922

wants to merge 4 commits into from

Conversation

Profpatsch
Copy link
Contributor

An experiment in how much effort it is to migrate classes to kotlin.

It took me about 30–60 minutes (minus getting to know some kotlin features) to migrate these, try the result and fix all warnings that popped up.

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Due diligence

Only error was a nullable check in AcraReportSender, which I fixed by
replacing null with an empty array.

I tested the error report by producing a network error and opening the
report, creating an email and accepting the EULA.

Warnings will be fixed in the next commit.
We will init them at the beginning of the view lifecycle, so they are
definitly not null.
@github-actions github-actions bot added the size/giant PRs with more than 750 changed lines label Mar 30, 2024
Copy link

sonarcloud bot commented Mar 30, 2024

Copy link
Contributor

@EricDriussi EricDriussi left a comment

Choose a reason for hiding this comment

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

Formatting seems off (remember to set up ktlint)

Copy link
Contributor

Choose a reason for hiding this comment

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

This class seems unused

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think something went wrong with your review? The code you're talking about isn't showing up. Just the file names.

Copy link
Contributor

Choose a reason for hiding this comment

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

Well yea, I wanted to point to the file name. AcraReportSender seems to be unused, I think the file is safe to remove instead of converting to Kotlin.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh. I didn't know you could leave a review for an entire file.

Copy link
Contributor

@EricDriussi EricDriussi Jun 24, 2024

Choose a reason for hiding this comment

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

There are merge conflicts with this enum. Consider pulling the latest changes from dev and re-generate the .kt file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/giant PRs with more than 750 changed lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants