mozilla / web-ext

A command line tool to help build, run, and test web extensions
Mozilla Public License 2.0
2.65k stars 334 forks source link

`--id` flag seems to be unused in HEAD (8.0.0 pre-release) #3124

Closed dotproto closed 2 months ago

dotproto commented 3 months ago

During the drafting process for the web-ext 8.0.0 release's documentation update, @rebloor noted that that the "--id [seems to have] no purpose in version 8." Upon reviewing the source and running through a couple test cases, I did not see a way to effectively use the --id flag in the current master branch.

I suggest that we remove the --id flag before we formally release version 8.0.0.

#### Case 1: Using`--id` when submitting a new add-on without an `id` in manifest.json [2024-05-06-test1.zip](https://github.com/mozilla/web-ext/files/15229222/2024-05-06-test1.zip) ``` $ web-ext sign --id "2024-05-06-test1@webext.test" Building web extension from /Users/current-user/2024-05-06-test1/src UsageError: Cannot set custom ID 2024-05-06-test1@webext.test - The add-on ID must be specified in the manifest.json file. ```
#### Case 2: Using`--id` when signing an add-on with an `id` in manifest.json [2024-05-06-test2.zip](https://github.com/mozilla/web-ext/files/15229223/2024-05-06-test2.zip) ``` $ web-ext sign --id "2024-05-06-test2@webext.test" Building web extension from /Users/current-user/2024-05-06-test2/src UsageError: Cannot set custom ID 2024-05-06-test2@webext.test because manifest.json already defines ID ${manifestId} ```
dotproto commented 3 months ago

@willdurand, it looks like you may have been the last person to touch some related code in #2737. Am I missing anything that would necessitate keeping the --id flag?

Rob--W commented 2 months ago

We are considering the following options:

ioanarusiczki commented 2 months ago

With V8 master-f814a6195ad8a40d3bca1fc8105473a94e79bdca I could reproduce the examples above.

With V8 master-e224899cc015f55f56ccd2e87ca2b6c0f69a3ff9 I've Unknown argument: id and --id is no longer displayed in the Options list.