Skip to content

Update CONTRIBUTING doc for the Dart Debug Extension #1524

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions dwds/debug_extension/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
pub run build_runner build web -o build -r
```

This will build to the `/web` directory.

TODO(elliette): Building with DDC no longer works, figure out why.
See https://github.com/dart-lang/webdev/issues/1506
- With DDC:

```
pub run build_runner build web -o build
```

This will build to the `/build/web` directory.
## Local Development

### Update `manifest.json`:
Expand Down Expand Up @@ -43,8 +47,31 @@ pub run build_runner build web -o build
* More debugging information can be found in the [Chrome Developers documentation](https://developer.chrome.com/docs/extensions/mv3/devguide/)


## Deployment
## Release process

1. Update the version in `web/manifest.json`, `pubspec.yaml`, and in the `CHANGELOG`.
2. Build dart2js: `pub run build_runner build web -o build -r`
> *At this point, you should manually verify that everything is working by following the steps in [Local Development](#local-development).*
3. Open a PR to submit the version and build changes.
4. Once submitted, pull the changes down to your local branch, and create a zip of the `debug_extension/web` directory (NOT `debug_extension/build/web`).
5. Rename the zip `version_XX.XX.XX.zip` (eg, `version_1.24.0.zip`) and add it to the go/dart-debug-extension-zips folder
Copy link
Member

Choose a reason for hiding this comment

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

What's the intent behind this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The idea is that if we need to "roll back" the extension (which is really just re-releasing an older version), we can do so easily. Obviously this would be possible if we just checked out a particular commit, but storing the zips makes it easier. We unfortunately still have to wait for the older version to get published.

Copy link
Member

Choose a reason for hiding this comment

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

If I recall there isn't a supported rollback feature in the Chrome Webstore so this makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, great! Also added instructions on rollback to the doc

> *You must be a Googler to do this. Ask for help if not.*
6. Go to the [Chrome Web Store Developer Dashboard](https://chrome.google.com/webstore/devconsole).
7. At the top-right, under Publisher, select dart-bat.
> *If you don’t see dart-bat as an option, you will need someone on the Dart team to add you to the dart-bat Google group.*
7. Under Items, select the "Dart Debug Extension".
8. Go to “Package” then select “Upload new package”.
> *The first time you do this, you will be asked to pay a $5 registration fee. The registration fee can be expensed.*
9. Upload the zip file you created in step 4.
10. Save as draft, and verify that the new version is correct.
11. Publish. The extension will be published immediately after going through the review process.

## Rollback process
> The Chrome Web Store Developer Dashboard does not support rollbacks. Instead you must re-publish an earlier version. This means that the extension will still have to go through the review process, which can take anywhere from a few hours (most common) to a few days.
1. Find the previous version you want to rollback to in the go/dart-debug-extension-zips folder.
> > *You must be a Googler to do this. Ask for help if not.*
2. Unzip the version you have chosen, and in `manifest.json` edit the version number to be the next sequential version after the current "bad" version (eg, the bad version is `1.28.0` and you are rolling back to version `1.27.0`. Therefore you change `1.27.0` to `1.29.0`).
3. Re-zip the directory and rename it to the new version number. Add it to the go/dart-debug-extension-zips folder.
4. Now, follow steps 6 - 11 in [Release process](#release-process).


- Update the version number in `web/manifest.json`.
- Zip `web/manifest.json`, `web/background.js`, and `dart.png`.
- Upload the `.zip` to the Chrome Web Store.