Remove dbg-server.jsm and use commonjs require to import DebuggerServer

RESOLVED FIXED in Firefox 43

Status

()

Firefox
Developer Tools
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: ochameau, Assigned: ochameau)

Tracking

(Blocks: 1 bug)

unspecified
Firefox 43
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox43 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

3 years ago
Let's make a dedicated bug to get rid of dbg-server.jsm.
This jsm is useless as we should import this module via
   const { DebuggerServer } = require("devtools/server/main");
(Instead of Cu.import("resource://gre/modules/devtools/dbg-server.jsm", {}))

All usages of dbg-server.jsm prevent correctly reloading server files when using local source directory.
(Assignee)

Comment 2

3 years ago
Created attachment 8644911 [details] [diff] [review]
patch v2

https://treeherder.mozilla.org/#/jobs?repo=try&revision=b7c7b7b7dd2c
This time, I'm not removing the jsm as it is used in too many addons.
Attachment #8642534 - Attachment is obsolete: true
(Assignee)

Comment 3

3 years ago
... but I've dispatched some previous try run with dbg-server.jsm removed to verify there was no more usages. Some new one may slit through, we would have to verify during reviews and may be a bit latter, check m-c codebase for possible new usages of it.
(Assignee)

Updated

3 years ago
Attachment #8644911 - Flags: review?(jryans)
Comment on attachment 8644911 [details] [diff] [review]
patch v2

Review of attachment 8644911 [details] [diff] [review]:
-----------------------------------------------------------------

Should dbg-server.jsm log a deprecation notice when it's used?
Attachment #8644911 - Flags: review?(jryans) → review+
(Assignee)

Comment 6

3 years ago
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #4)
> Comment on attachment 8644911 [details] [diff] [review]
> patch v2
> 
> Review of attachment 8644911 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Should dbg-server.jsm log a deprecation notice when it's used?

It's not a big deal if they keep using it or if we keep this alias.
But yes, we could do that. I would do that a bit later once file are moved, loader paths are cleaned up and everything is more stable as things might change again.
(Assignee)

Comment 7

3 years ago
Btw, I've pushed two try just before landing.
One removing dbg-server.jsm:
  https://treeherder.mozilla.org/#/jobs?repo=try&revision=9cc2dd728d33
And another without removing it (what actually landed):
  https://treeherder.mozilla.org/#/jobs?repo=try&revision=585e58baa292

Everything was green (enough)!

Comment 8

3 years ago
Commit pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/a50a0c78b557af3994fa78bbc8d830a3c77b6620
Bug 1190452 - Always import toolkit/devtools/server/main.js as CommonJS module. r=jryans
https://hg.mozilla.org/mozilla-central/rev/2fcd73fa8a7e
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox43: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43

Updated

3 years ago
Depends on: 1198716
You need to log in before you can comment on or make changes to this bug.