Klipper3d / klipper

Klipper is a 3d-printer firmware
GNU General Public License v3.0
9.32k stars 5.28k forks source link

remove dead code #6504

Closed kdomanski closed 5 months ago

kdomanski commented 7 months ago
dewi-ny-je commented 7 months ago

I think you need to sign your contribution. https://www.klipper3d.org/CONTRIBUTING.html

kdomanski commented 7 months ago

Yeah, I only signed the first commit and not the second. Thanks, nice catch!

github-actions[bot] commented 6 months ago

Thank you for your contribution to Klipper. Unfortunately, a reviewer has not assigned themselves to this GitHub Pull Request. All Pull Requests are reviewed before merging, and a reviewer will need to volunteer. Further information is available at: https://www.klipper3d.org/CONTRIBUTING.html

There are some steps that you can take now:

  1. Perform a self-review of your Pull Request by following the steps at: https://www.klipper3d.org/CONTRIBUTING.html#what-to-expect-in-a-review If you have completed a self-review, be sure to state the results of that self-review explicitly in the Pull Request comments. A reviewer is more likely to participate if the bulk of a review has already been completed.
  2. Consider opening a topic on the Klipper Discourse server to discuss this work. The Discourse server is a good place to discuss development ideas and to engage users interested in testing. Reviewers are more likely to prioritize Pull Requests with an active community of users.
  3. Consider helping out reviewers by reviewing other Klipper Pull Requests. Taking the time to perform a careful and detailed review of others work is appreciated. Regular contributors are more likely to prioritize the contributions of other regular contributors.

Unfortunately, if a reviewer does not assign themselves to this GitHub Pull Request then it will be automatically closed. If this happens, then it is a good idea to move further discussion to the Klipper Discourse server. Reviewers can reach out on that forum to let you know if they are interested and when they are available.

Best regards, ~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being.

kdomanski commented 6 months ago

Self-review checklist

1. Is the submission free of defects and is it ready to be widely deployed?

2. Does the submission provide a "high impact" benefit to real-world users performing real-world tasks?

No, however with just a few lines removed it removes a lot of confusion regarding the purpose of the dead code. Personally I struggled to understand the code in question when debugging certain issues and the presence of dead code served as a distraction. I think getting rid of it will help contributors.

3. Is the copyright of the submission clear, non-gratuitous, and compatible?

Yes.

4. Does the submission follow guidelines specified in the Klipper documentation?

Yes.

5. Is the Klipper documentation updated to reflect new changes?

No documentation is necessary.

6. Are commits well formed, address a single topic per commit, and independent?

IMO, yes.

KevinOConnor commented 6 months ago

Thanks. A call to toolhead.get_last_move_time() has side effects - it flushes the lookahead queue and ensures that the "print time" advances. So, I think this change could have a subtle impact on behavior. Also, although no current check_busy() implementation uses print_time I don't see a harm in passing it into that function - it can serve as a reminder that the toolhead should be flushed prior to invoking it.

The other parts of the dead code removal look good to me. Happy to commit those if separated from the changes that can alter behavior.

Cheers, -Kevin

kdomanski commented 6 months ago

Hey Kevin, thanks for the explanation. I plan to tend to this PR and #6503 in a week or two when I'm back from sick leave.

kdomanski commented 5 months ago

I restored the calls to toolhead.get_last_move_time() and removed the commit which altered the signature of check_busy().

KevinOConnor commented 5 months ago

Thanks.

-Kevin