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

Delete MV2 Dart Debug Extension #2428

Merged
merged 3 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@
'dart-debug-extension':
- changed-files:
- any-glob-to-any-file: 'dwds/debug_extension/**/*'
- any-glob-to-any-file: 'dwds/debug_extension_mv3/**/*'
7 changes: 2 additions & 5 deletions dwds/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ analyzer:
# Ignore generated files
- "lib/data/*"
# Ignore debug extension builds
- "debug_extension/dev_build/*"
- "debug_extension/prod_build/*"
- "debug_extension_mv3/dev_build/*"
- "debug_extension_mv3/prod_build/*"
- "debug_extension/compiled/*"

linter:
rules:
Expand All @@ -32,7 +29,7 @@ dart_code_metrics:
metrics-exclude:
- test/**
rules:
# - arguments-ordering
# - arguments-ordering
# - avoid-banned-imports
- avoid-cascade-after-if-null
- avoid-collection-methods-with-unrelated-types
Expand Down
3 changes: 1 addition & 2 deletions dwds/debug_extension/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
build/
prod_build/
dev_build/
compiled/
extension_key.txt
109 changes: 0 additions & 109 deletions dwds/debug_extension/CHANGELOG.md

This file was deleted.

92 changes: 39 additions & 53 deletions dwds/debug_extension/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
## Building

> Note: First make the script executable: `chmod +x tool/build_extension.sh`
- For development: `dart run tool/build_extension.dart`
- For release: ` dart run tool/build_extension.dart --prod`

### With DDC (for development):

```
./tool/build_extension.sh
```

- The DDC-compiled extension will be located in the `/dev_build/web` directory.

### With dart2js (for release):

```
./tool/build_extension.sh prod
```

- The dart2js-compiled extension will be located in the `/prod_build` directory.
The dart2js-compiled extension will be located in the `/compiled` directory.

## Local Development

Expand All @@ -33,7 +20,7 @@
- Visit chrome://extensions
- Toggle "Developer mode" on
- Click the "Load unpacked" button
- Select the extension directory: `dev_build/web`
- Select the extension directory: `/compiled`

### Debug your local extension

Expand All @@ -48,42 +35,41 @@

## Release process

1. Update the version in `web/manifest.json`, `pubspec.yaml`, and in the
`CHANGELOG`.
1. Follow the instructions above to build the dart2js-compiled release version
of the extension.
- Update the version in `web/manifest_mv2.json`, `web/manifest_mv3.json`, `pubspec.yaml`, and in the
`CHANGELOG`.
- Follow the instructions above to build the release version of the extension.

> \*At this point, you should manually verify that everything is working by
> following the steps in [Local Development](#local-development), except load
> the extension from the `prod_build` directory. You will need to add an
> extension key to the `manifest.json` file in `prod_build` to test locally.
> the extension from the `compiled` directory. You will need to add an extension
> key to the `manifest.json` file in `compiled` to test locally.

3. Open a PR to submit the version change.
1. Once submitted, pull the changes down to your local branch, and create a zip
of the `prod_build` directory (NOT `dev_build/web`). **Remove the Googler
extension key that was added by the builder to the `manifest.json` file.**
1. 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
- Open a PR to submit the version change.
- Once submitted, pull the changes down to your local branch, and create a zip
of the `compiled` directory. **Remove the Googler extension key that was added
by the builder to the `manifest.json` file.**
- 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

> *You must be a Googler to do this. Ask for help if not.*
> _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).
1. At the top-right, under Publisher, select dart-bat.
- Go to the
[Chrome Web Store Developer Dashboard](https://chrome.google.com/webstore/devconsole).
- 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.*
> _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".
1. Go to “Package” then select “Upload new package”.
- Under Items, select the "Dart Debug Extension".
- 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.*
> _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.
1. Save as draft, and verify that the new version is correct.
1. Publish. The extension will be published immediately after going through the
review process.
- Upload the zip file you created in step 4.
- Save as draft, and verify that the new version is correct.
- Publish. The extension will be published immediately after going through the
review process.

## Rollback process

Expand All @@ -92,15 +78,15 @@
> 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.
- 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.*
> _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`).
1. Re-zip the directory and rename it to the new version number. Add it to the
go/dart-debug-extension-zips folder.
1. Now, follow steps 6 - 11 in [Release process](#release-process).
- 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`).
- Re-zip the directory and rename it to the new version number. Add it to the
go/dart-debug-extension-zips folder.
- Now, follow steps 6 - 11 in [Release process](#release-process).
12 changes: 0 additions & 12 deletions dwds/debug_extension/README.md

This file was deleted.

18 changes: 8 additions & 10 deletions dwds/debug_extension/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,26 @@ targets:
build_web_compilers|entrypoint:
options:
dart2js_args:
- -O4 # Note: Change to -01 for unminified JS.
- -O1 # Note: Change to -04 for minified JS.
- --csp
generate_for:
- web/**.dart
extension|client_js_copy_builder:
mv3_extension|client_js_copy_builder:
enabled: true

builders:
client_js_copy_builder:
required_inputs: [".js", ".png", ".html", ".css", ".json"]
import: "tool/copy_builder.dart"
builder_factories:
- copyBuilder
build_extensions:
{
"web/{{}}.dart.js": ["prod_build/{{}}.js"],
"web/{{}}.png": ["prod_build/{{}}.png"],
"web/{{}}.html": ["prod_build/{{}}.html"],
"web/{{}}.css": ["prod_build/{{}}.css"],
"web/manifest.json": ["prod_build/manifest.json"],
"web/panel.js": ["prod_build/panel.js"],
"web/detector.js": ["prod_build/detector.js"],
"web/devtools.js": ["prod_build/devtools.js"],
"web/{{}}.dart.js": ["compiled/{{}}.dart.js"],
"web/static_assets/{{}}.png": ["compiled/static_assets/{{}}.png"],
"web/static_assets/{{}}.html": ["compiled/static_assets/{{}}.html"],
"web/static_assets/{{}}.css": ["compiled/static_assets/{{}}.css"],
"web/manifest.json": ["compiled/manifest.json"],
}
auto_apply: none
build_to: source
25 changes: 15 additions & 10 deletions dwds/debug_extension/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
name: extension
name: mv3_extension
publish_to: none
version: 1.30.0
version: 2.1.4
homepage: https://github.com/dart-lang/webdev
description: >-
A chrome extension for Dart debugging.
A Chrome extension for Dart debugging.

environment:
sdk: ^3.2.0-36.0.dev

dependencies:
async: ^2.3.0
built_value: ^8.3.0
collection: ^1.15.0
js: ^0.6.1+1
pub_semver: ^2.0.0
sse: ^4.1.0
web_socket_channel: ^2.0.0

dev_dependencies:
args: ^2.3.1
build: ^2.0.0
build_web_compilers: ^4.0.4
build_runner: ^2.4.0
built_collection: ^5.0.0
dwds: ^11.0.0
webdev: ^2.0.0
built_value_generator: ^8.3.0
build_web_compilers: ^4.0.4
dwds: ^16.0.0
path: ^1.8.1
sse: ^4.1.2
web_socket_channel: ^2.2.0

dependency_overrides:
dwds:
path: ..
2 changes: 0 additions & 2 deletions dwds/debug_extension/pubspec_overrides.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
dependency_overrides:
webdev:
path: ../../webdev
dwds:
path: ..
Loading
Loading