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.

Moderator: satrow

User avatar
JustOff
Localization Coordinator
Localization Coordinator
Posts: 1509
Joined: Thu, 03 Sep 2015, 19:47
Location: UA
Contact:

A little stupid question about SDK

Unread postby JustOff » Sun, 30 Oct 2016, 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?
Here are the add-ons I made in a spare time. That was fun!

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 4623
Joined: Tue, 09 Oct 2012, 19:37

Re: A little stupid question about SDK

Unread postby New Tobin Paradigm » Sun, 30 Oct 2016, 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: 562
Joined: Thu, 30 Jul 2015, 20:29
Location: Vaughan, ON, Canada

Re: A little stupid question about SDK

Unread postby Walter Dnes » Sun, 30 Oct 2016, 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
Localization Coordinator
Localization Coordinator
Posts: 1509
Joined: Thu, 03 Sep 2015, 19:47
Location: UA
Contact:

Re: A little stupid question about SDK

Unread postby JustOff » Sun, 30 Oct 2016, 20:34

10x Matt, I understood.

Btw, have you seen this epic fail?
Here are the add-ons I made in a spare time. That was fun!

User avatar
JustOff
Localization Coordinator
Localization Coordinator
Posts: 1509
Joined: Thu, 03 Sep 2015, 19:47
Location: UA
Contact:

Re: A little stupid question about SDK

Unread postby JustOff » Mon, 31 Oct 2016, 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.
Here are the add-ons I made in a spare time. That was fun!

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 22117
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: A little stupid question about SDK

Unread postby Moonchild » Mon, 31 Oct 2016, 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.
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

"If you want to build a better world for yourself, you have to be willing to build one for everybody." -- Coyote Osborne

Image

User avatar
JustOff
Localization Coordinator
Localization Coordinator
Posts: 1509
Joined: Thu, 03 Sep 2015, 19:47
Location: UA
Contact:

Re: A little stupid question about SDK

Unread postby JustOff » Tue, 01 Nov 2016, 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.
Here are the add-ons I made in a spare time. That was fun!

User avatar
Fedor2
Astronaut
Astronaut
Posts: 542
Joined: Mon, 11 Apr 2016, 01:26

Re: A little stupid question about SDK

Unread postby Fedor2 » Thu, 03 Nov 2016, 11:41

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

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 4623
Joined: Tue, 09 Oct 2012, 19:37

Re: A little stupid question about SDK

Unread postby New Tobin Paradigm » Thu, 03 Nov 2016, 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
Fanatic
Fanatic
Posts: 214
Joined: Sun, 11 Sep 2016, 16:36

Re: A little stupid question about SDK

Unread postby GreenGeek » Thu, 03 Nov 2016, 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
Localization Coordinator
Localization Coordinator
Posts: 1509
Joined: Thu, 03 Sep 2015, 19:47
Location: UA
Contact:

Re: A little stupid question about SDK

Unread postby JustOff » Thu, 03 Nov 2016, 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.
Here are the add-ons I made in a spare time. That was fun!

Gaylord Culbreth
New to the forum
New to the forum
Posts: 2
Joined: Fri, 11 Nov 2016, 13:19

Re: A little stupid question about SDK

Unread postby Gaylord Culbreth » Fri, 11 Nov 2016, 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.


Return to “Pale Moon "Tycho" alpha/beta”

Who is online

Users browsing this forum: No registered users and 2 guests