Page 1 of 1

A little stupid question about SDK

Posted: 2016-10-30, 16:24
by JustOff
While exploring Beta3 I've accidentally found something that looks like as full SDK at resource://gre/modules/jetpack/* I'm just curious, what does it do there? Was it left by mistake or intentionally for some purpose?

Re: A little stupid question about SDK

Posted: 2016-10-30, 19:36
by New Tobin Paradigm
It contains some of the jetpack code needed for Mozilla Devtools to function.. Mostly loading functions (devtools loader relies on jetpack loader). It doesn't work for extensions.. Not unless we restored the native Firefox application code for which it addresses.

Do not rely on any bits and bobs from it.. They will be going away as it is widdled down and the few functions devtools uses are re-incorporated back into devtools.

Re: A little stupid question about SDK

Posted: 2016-10-30, 20:04
by Walter Dnes
While re're at it, the packaging process in linux ("mach pachage") throws a lot of errors looking for jetpack stuff. I log packaging output to packagelog.txt. The command...

Code: Select all

grep -c "resource://gre/modules/jetpack/" packagelog.txt
...shows 544 hits. That's during my contributed SSE build for linux. I get the same number of hits building a 64-bit optimized and cut-down version for personal use.

Re: A little stupid question about SDK

Posted: 2016-10-30, 20:34
by JustOff
10x Matt, I understood.

Btw, have you seen this epic fail?

Re: A little stupid question about SDK

Posted: 2016-10-31, 17:01
by JustOff
Finally, I must confess that I found a simple way run any SDK extension in PM27, regardless of presence of required libraries in browser. But if they are there, it saves the memory, of course.

I understand that usage of SDK extensions is not good idea, but sometimes there is no choice. Especially when extension depends on page-mod and requires a lot of work to rewrite all sandboxing stuff in plain js.

Re: A little stupid question about SDK

Posted: 2016-10-31, 20:28
by Moonchild
JustOff wrote:sometimes there is no choice
There is always choice. Choosing to rely on unofficial jetpack inclusions in the toolkit that may vanish at any point in time in whole or in part is not a good choice, though.
If you don't want to re-write specific things, please understand that anything in our code base is open source and you can copy it to your extension if you need it, you know, in the spirit of the way the SDK was originally envisioned (to have it included in extensions that built on it).
If you e.g. need the sandboxing routines, you can take those and include a copy of them in your extension package -- you don't have to completely rewrite everything in that case.

Re: A little stupid question about SDK

Posted: 2016-11-01, 12:35
by JustOff
To be clear, I don't like SDK, none of my extensions was never written using SDK and I hope wouldn't be. But it so happened that my habitual browsing environment depends of several such extensions and I'm forced to deal with it. On the eve of PM27 release I figured out with all, except one, and that's why I started all of this.

Now I can run SDK extension in two ways: using the libs who currently in browser or with the same libs, copied from PM source into the extension itself. I'm not suggesting to anyone to do so, I only shared the fact that it can be done (possible as a last resort), and it works.

Re: A little stupid question about SDK

Posted: 2016-11-03, 11:41
by Fedor2
As there are no devtools in the default built, is it safe to delete jetpack folder at all?

Re: A little stupid question about SDK

Posted: 2016-11-03, 12:07
by New Tobin Paradigm
Backend Devtools components which the extension uses to some degree still require the jetpack loader or else it would be completely gone.

Re: A little stupid question about SDK

Posted: 2016-11-03, 15:23
by GreenGeek
JustOff, would you post some more details about what you're doing, particularly in regards to copying the needed functions to the extension? If the administrators don't want it posted here (as I kind of suspect), a page on github or some other site would be fine. Or private message me as last resort (not best choice because I'm sure someone else will be interested too). The only one I had in v26 that I can't replace in 27 is DeCentralEyes, so I might try a wrapper for it (doesn't need a user interface). This is not my area of programming specialty though so if someone else wants to do it, I'd be happy to let them. One that I always wanted but didn't have the skills to fork for PM is SSleuth which has intricate UI components so likely not able to work (unless maybe the output could be directed to console log as a workaround!?).

Re: A little stupid question about SDK

Posted: 2016-11-03, 16:01
by JustOff
I have already discussed this question today with Moonchild and must draw your attention to the following statement about using SDK-based extensions in Pale Moon 27:

This should still be considered hacking, and we cannot and will not provide any guarantees that anything will work or keep working; nor will we provide any support for anyone running an SDK extension that has been hacked to make it to run with the toolkit modules. That includes all support, also for general browser use, because SDK-sourced extensions may break the browser if forced to run.

So probably I'll open separate topic for such stuff, with all this warnings in red and bold in the leading post.

Re: A little stupid question about SDK

Posted: 2016-11-11, 13:22
by Gaylord Culbreth
JustOff-
Please share this magic with us. Thank you!
JustOff wrote:I have already discussed this question today with Moonchild and must draw your attention to the following statement about using SDK-based extensions in Pale Moon 27:

This should still be considered hacking, and we cannot and will not provide any guarantees that anything will work or keep working; nor will we provide any support for anyone running an SDK extension that has been hacked to make it to run with the toolkit modules. That includes all support, also for general browser use, because SDK-sourced extensions may break the browser if forced to run.

So probably I'll open separate topic for such stuff, with all this warnings in red and bold in the leading post.