How to upgrade from 0.7 to 0.8?

Hi community,

First of all, thanks for all good works of Chestnut, putting things together and making CLJS + OM development really easy.

I just saw Chestnut 0.8 relased, I’m using 0.7 right now and would like to upgrade to 0.8. Is there any guideline for upgrading a Chestnut project?

Thank you very much,

  • Cox

Chestnut is just a template, there’s no such thing as “upgrading to the latest Chestnut”, the way there is with a framework or library. You can generate an app with the old version, and one with the new version, and diff the two. Maybe this patch will still apply to your project, which is unlikely, or you can manually port over some of the changes.

Hi @plexus,

I see. Thanks for your reply. I’ll try manual migration.

  • Cox
1 Like

@coxchen if you do it would be great if you could share your experience.

To be fair having a section in the docs that explains how to apply the changes for each version would be great. It just takes one person to actually write it :wink:

Hi @plexus,

I migrated my repo from Chestnut 0.7.0 to 0.8.1 (latest) manually.
The diff can be found here: https://github.com/coxchen/searchbot/commit/63656ba32a96a395ce144300060435130283a179

I tried to new a repo with Chestnut 0.8.1 and compare the differences generated files. The only change that is not included in my above commit is Having the uberjar run the server, because I’ve done that manually before.

Not sure if my experience applies to others, just for your reference.

  • Cox

Thanks for doing this, I’m sure it’s helpful to others. Depending on which
flags you run chestnut with you might see more differences.

Hi @plexus,

I tried to make an uberjar as I did before I migrate to Chestnut 0.8. However, there seems to be something missing in the resulted artifact. When I view my app, I see “Uncaught ReferenceError: goog is not defined” in JS console. And I cannot see anything of my app.

Any hint I can fix this error?

Thank you,

  • Cox

BTW, it works fine in dev mode.

It turns out to be a false alarm.

After I wipe out generated files in /public/js folder, uberjar now produces correct result. It seems that something generated previously were not replaced/removed after I migrated to 0.8.

1 Like