A little stupid question about SDK

This board is for discussions, bug reports, etc. for pre-releases of the v27 milestone codenamed "Tycho".

Since the beta phase is over, this board is closed for new posts/topics.
User avatar
JustOff
Banned user
Banned user
Posts: 2083
Joined: 2015-09-03, 19:47
Location: UA

A little stupid question about SDK

Unread post by JustOff » 2016-10-30, 16:24

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?

New Tobin Paradigm

Re: A little stupid question about SDK

Unread post by New Tobin Paradigm » 2016-10-30, 19:36

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.

Walter Dnes
Astronaut
Astronaut
Posts: 650
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: A little stupid question about SDK

Unread post by Walter Dnes » 2016-10-30, 20:04

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.
There's a right way
There's a wrong way
And then there's my way

User avatar
JustOff
Banned user
Banned user
Posts: 2083
Joined: 2015-09-03, 19:47
Location: UA

Re: A little stupid question about SDK

Unread post by JustOff » 2016-10-30, 20:34

10x Matt, I understood.

Btw, have you seen this epic fail?

User avatar
JustOff
Banned user
Banned user
Posts: 2083
Joined: 2015-09-03, 19:47
Location: UA

Re: A little stupid question about SDK

Unread post by JustOff » 2016-10-31, 17:01

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.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35404
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: A little stupid question about SDK

Unread post by Moonchild » 2016-10-31, 20:28

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.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
JustOff
Banned user
Banned user
Posts: 2083
Joined: 2015-09-03, 19:47
Location: UA

Re: A little stupid question about SDK

Unread post by JustOff » 2016-11-01, 12:35

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.

Fedor2
Banned user
Banned user
Posts: 704
Joined: 2016-04-11, 01:26

Re: A little stupid question about SDK

Unread post by Fedor2 » 2016-11-03, 11:41

As there are no devtools in the default built, is it safe to delete jetpack folder at all?

New Tobin Paradigm

Re: A little stupid question about SDK

Unread post by New Tobin Paradigm » 2016-11-03, 12:07

Backend Devtools components which the extension uses to some degree still require the jetpack loader or else it would be completely gone.

GreenGeek

Re: A little stupid question about SDK

Unread post by GreenGeek » 2016-11-03, 15:23

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!?).

User avatar
JustOff
Banned user
Banned user
Posts: 2083
Joined: 2015-09-03, 19:47
Location: UA

Re: A little stupid question about SDK

Unread post by JustOff » 2016-11-03, 16:01

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.

Gaylord Culbreth

Re: A little stupid question about SDK

Unread post by Gaylord Culbreth » 2016-11-11, 13:22

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.

Locked