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

#618: Drop secondary dev-only reload for web-ext run #7470

Merged
merged 2 commits into from
Feb 1, 2024
Merged

Conversation

fregante
Copy link
Contributor

@fregante fregante commented Jan 29, 2024

@grahamlangford
Copy link
Collaborator

This is on my TODO list to test out before I approve. I want to be sure I understand the ramifications of the change.

@fregante
Copy link
Contributor Author

fregante commented Feb 1, 2024

the ramifications of the change

Do you use web-ext run?

  • No:
    • reloading the extension will be faster because you won't see the double-reload, avoiding a whole class of possible issues
  • Yes:
    • if you make changes to manifest.json, you will have to click "reload" in chrome://extensions
    • the exact version number shown does not match the manifest.json, but this rarely matters when debugging. Just click "reload" in chrome://extensions

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (53af1ea) 72.58% compared to head (442cf95) 72.60%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7470      +/-   ##
==========================================
+ Coverage   72.58%   72.60%   +0.01%     
==========================================
  Files        1210     1209       -1     
  Lines       37901    37890      -11     
  Branches     7120     7114       -6     
==========================================
- Hits        27511    27510       -1     
+ Misses      10390    10380      -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@grahamlangford
Copy link
Collaborator

the ramifications of the change

Do you use web-ext run?

  • No:

    • reloading the extension will be faster because you won't see the double-reload, avoiding a whole class of possible issues
  • Yes:

    • if you make changes to manifest.json, you will have to click "reload" in chrome://extensions
    • the exact version number shown does not match the manifest.json, but this rarely matters when debugging. Just click "reload" in chrome://extensions

So the only impact impact will be when making manifest changes? It will otherwise work the same or faster? We'll still get hot-reloading in web-ext for standard development and debugging?

@fregante
Copy link
Contributor Author

fregante commented Feb 1, 2024

Basically yes.

In practice, the "reload" mechanism of web-ext just turns off and on the extension, which means that the background is restarted and the content scripts are injected again.

When I have a minute, I'll look into actual HMR as shown in that PR from a year ago, it'll be greatly helpful when working on styles and React components

Copy link
Collaborator

@grahamlangford grahamlangford left a comment

Choose a reason for hiding this comment

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

I started running into the same issue more frequently. Let's give it a go and see if there are any issues. We can always revert.

Copy link

github-actions bot commented Feb 1, 2024

No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack.

Do not edit this comment manually.

@fregante fregante merged commit 77a6328 into main Feb 1, 2024
16 checks passed
@fregante fregante deleted the F/dev/autoreload branch February 1, 2024 14:29
@grahamlangford grahamlangford added this to the 1.8.8 milestone Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants