# Upgrading embedding from ESR78. Any important changes?

**URL:** <https://discourse.mozilla.org/t/upgrading-embedding-from-esr78-any-important-changes/78593>\
**Category:** SpiderMonkey\
**Created:** [April 13, 2021, 10:21am UTC](https://discourse.mozilla.org/t/upgrading-embedding-from-esr78-any-important-changes/78593 "2021-04-13T10:21:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MilesT](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/milest/32/71131_2.png) [@MilesT](https://discourse.mozilla.org/u/MilesT)\
**Post date:** [April 13, 2021, 10:21am UTC](https://discourse.mozilla.org/t/upgrading-embedding-from-esr78-any-important-changes/78593/1 "2021-04-13T10:21:54Z")

</div>

Hi everyone.

I think that this is now the replacement for the old mozilla.dev.tech.js-engine mailing list ([[https://groups.google.com/g/mozilla.dev.tech.js-engine/c/hkqD0xh3nRs](https://groups.google.com/g/mozilla.dev.tech.js-engine/c/hkqD0xh3nRs)])

Over the last year we have done the massive task of upgrading our embedding to ESR78 (from 1.8.5). Now that we’ve done that I want to make sure that we keep up to date as I don’t want to have to go through that again! 😟  
Looking at the Firefox [release calendar](https://wiki.mozilla.org/Release_Management/Calendar) it looks like the next ESR release will be ESR91 in July and I would like to target this as the next release to move to.  
Looking at [treeherder](https://treeherder.mozilla.org/jobs?repo=mozilla-release&searchStr=spidermonkey-sm-package) it looks like the current release is 87.

Can anybody recommend if I should try to upgrade to the current release and then upgrade again to ESR91 later in the year or would I be better just waiting for ESR91 and upgrading in one step?  
Are there any big changes that I should be aware of (either in terms of API changes or toolsets required for compiling etc) that have already happened or that are planned between now and ESR91?  
If anybody has any thoughts I would be very grateful.  
If I’m better asking this in [chat.mozilla.org](http://chat.mozilla.org) instead then please let me know.

Many thanks

Miles

---

<div class="post-metadata">

**Author:** ![tcampbell](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@tcampbell](https://discourse.mozilla.org/u/tcampbell)\
**Post date:** [April 13, 2021, 12:20pm UTC](https://discourse.mozilla.org/t/upgrading-embedding-from-esr78-any-important-changes/78593/2 "2021-04-13T12:20:20Z")

</div>

This is a great place for that question. While the current release is 87, the current dev branch is 89. If your plan is to start targeting ESR91 when it comes out and want to get a head start, then I might suggest targeting whatever version is in Beta (See [https://whattrainisitnow.com/](https://whattrainisitnow.com/)). This avoids the churn of trunk but keeps you close enough to central that small ergonomic issues are more likely to be fixed in time if you raise them.

In terms of embedder-facing changes between now and ESR91, the team is planning a spring-cleaning sprint at the end of April and that _may_ include projects like splitting more parts of `jsapi.h` into individual files, or tweaking how test suites are organized.

If you started targeting Beta 89 (in 5 days), I anticipate that embedding API breakage between that and 91 will be pretty mechanical to fix.

It would be helpful to take a few notes as you work so we can update the [migration guide](https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples/blob/esr78/docs/Migration%20Guide.md).

---

<div class="post-metadata">

**Author:** ![MilesT](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/milest/32/71131_2.png) [@MilesT](https://discourse.mozilla.org/u/MilesT)\
**Post date:** [April 13, 2021, 1:04pm UTC](https://discourse.mozilla.org/t/upgrading-embedding-from-esr78-any-important-changes/78593/3 "2021-04-13T13:04:48Z")

</div>

That’s very useful. Thanks for the information.

Can I just check then…  
What’s the best way to download a beta version of Spidermonkey?

At [https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples/blob/esr78/docs/Building%20SpiderMonkey.md#getting-the-source-code](https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples/blob/esr78/docs/Building%20SpiderMonkey.md#getting-the-source-code) it suggests downloading the Firefox source.  
That’s not actually what I did when I downloaded ESR78. I went to [https://treeherder.mozilla.org/jobs?repo=mozilla-release&searchStr=spidermonkey-sm-package](https://treeherder.mozilla.org/jobs?repo=mozilla-release&searchStr=spidermonkey-sm-package) and clicked on the first **SM (pkg)** link I came to. I got that method from reading about it _somewhere_ on Mozilla a long time ago…

Should I go to [https://treeherder.mozilla.org/jobs?repo=mozilla-beta&searchStr=spidermonkey-sm-package](https://treeherder.mozilla.org/jobs?repo=mozilla-beta&searchStr=spidermonkey-sm-package) instead and click on the latest **SM (pkg)** link or is there a better/alternative way I should be downloading it?  
Again, any advice gratefully received!

BTW, I hadn’t come across [https://whattrainisitnow.com/](https://whattrainisitnow.com/) before. Useful! 😀

Thanks

Miles

---

<div class="post-metadata">

**Author:** ![tcampbell](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@tcampbell](https://discourse.mozilla.org/u/tcampbell)\
**Post date:** [April 13, 2021, 2:30pm UTC](https://discourse.mozilla.org/t/upgrading-embedding-from-esr78-any-important-changes/78593/4 "2021-04-13T14:30:24Z")

</div>

“Official” bundles of spidermonkey are still not a solved problem. For development purposes, using the `SM(pkg)` builds of beta are probably a good option. They are updated twice a week, but the changes should just be bug fixes.

For production purposes (using ESR builds), we do recommend using the Firefox ESR source bundles from [ftp.mozilla.org](http://ftp.mozilla.org). The reason is that those are the versions we track for security updates and it avoids accidentally getting an in-between version. The difficulty with the `SM(pkg)` approach is it is hard to know precisely which version QA signed off on and was shipped as a browser product and which commits are just staged so that QA can _start_ testing.

On the eternal team backlog we’ve got an item to try and generate the pkg tarball and ship it to the “[https://ftp.mozilla.org](https://ftp.mozilla.org)” site using the same commit that goes out the door as product. There are a few hiccups here we just haven’t found time to deal with. Unsurprisingly, I do not personally have the ability to sign anything with production keys 🙂.

---

<div class="post-metadata">

**Author:** ![MilesT](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/milest/32/71131_2.png) [@MilesT](https://discourse.mozilla.org/u/MilesT)\
**Post date:** [April 13, 2021, 2:49pm UTC](https://discourse.mozilla.org/t/upgrading-embedding-from-esr78-any-important-changes/78593/5 "2021-04-13T14:49:33Z")

</div>

Thanks. That makes sense. Noted about getting the Firefox ESR source bundles from [ftp.mozilla.org](http://ftp.mozilla.org) too.  
Presumably there is no difference in the way that Spidermonkey should be built, if it comes from the SM(pkg) or the Firefox ESR source bundles? You cd to js/src and build there using the instructions at [https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples/blob/esr78/docs/Building%20SpiderMonkey.md#building-spidermonkey](https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples/blob/esr78/docs/Building%20SpiderMonkey.md#building-spidermonkey).

I guess the Firefox source downloads are just a lot bigger than the SM(pkg) ones! 😉

---

<div class="post-metadata">

**Author:** ![tcampbell](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@tcampbell](https://discourse.mozilla.org/u/tcampbell)\
**Post date:** [April 13, 2021, 3:44pm UTC](https://discourse.mozilla.org/t/upgrading-embedding-from-esr78-any-important-changes/78593/6 "2021-04-13T15:44:43Z")

</div>

Yeah, should be able to just follow the same build instructions. The `SM(pkg)` process runs the `js/src/make-source-package.sh` script that makes a stripped down tarball, but with files in the same tree structure.

We were chatting in channel and noticed that what happens in the Debian mozjs78 source package is the full Firefox source tarball is pulled from [https://ftp.mozilla.org](https://ftp.mozilla.org), signature is verified, the `make-source-package.sh` script is used, and the resulting tarball contents (plus distro .patch files) for the source in Debian. Our friends at the GNOME project maintain the `mozjs78` repo since it powers a number of things in GNOME.
