8000 Make autoreload checking more robust by dhalbert · Pull Request #6132 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

Make autoreload checking more robust #6132

New issue

Have a question about this project? Sign up for a free GitHub ac 8000 count 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 2 commits into from
Mar 9, 2022
Merged

Conversation

dhalbert
Copy link
Collaborator
@dhalbert dhalbert commented Mar 9, 2022
  • Fixes No autoreload when saving a file on SAMD21 sometimes #6007.

  • Add reset for autoreload. De-request ticks.

  • Separate state a little more in autoreload.c

  • Rename some routines and variables.

  • Reset _tick_event_channel when ticks are disabled, in atmel_samd/supervisor/port.c

  • Add PYEXEC_RELOAD as a specific reason for a forced termination of code, instead of checking the exception.

  • Remove redundant settings of CIRCUITPY_AUTORELOAD_DELAY_MS.

The most vital changes are the autoreload reset, and perhaps the _tick_event_channel.

Saving a file over and over again very quickly can still occasionally cause some filesystem corruption, though it seems rare. Interestingly, I found that increasing the autoreload timeout (CIRCUITPY_AUTORELOAD_DELAY_MS) from 0.5 to 1 second seems to help a lot for that. It may be that 1 second may be a more realistic waiting time for a write to finish. But it causes a noticeable difference in how fast the board seems to respond, so I did not include it in this PR. But it's something we should consider.

- Add reset for autoreload. De-request ticks.
- Separate state a little more in autoreload.c
- Rename some routines.
- Remove redundant settings of CIRCUITPY_AUTORELOAD_DELAY_MS.
@dhalbert dhalbert requested review from tannewt and jepler March 9, 2022 16:10
Copy link
Member
@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Everything looks good to me. Just one typo that should break the CI.

whoopsies

Co-authored-by: Scott Shawcroft <scott@tannewt.org>
@dhalbert dhalbert requested a review from tannewt March 9, 2022 20:34
@dhalbert
Copy link
Collaborator Author
dhalbert commented Mar 9, 2022

CI failure is GitHub Action's problem.

Copy link
Member
@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Thank you!

@tannewt tannewt merged commit 0957c15 into adafruit:7.2.x Mar 9, 2022
@dhalbert dhalbert deleted the fix-autoreload branch March 9, 2022 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0