Upgrading from 0.5.9

6 views
Skip to first unread message

Louis B

unread,
May 12, 2020, 10:29:09 PM5/12/20
to ScalaPB
Hi

I'm using scala pb, but an old version (which actually works just fine) 

addSbtPlugin("com.trueaccord.scalapb" % "sbt-scalapb" % "0.5.9")


however I'm conscious this version is getting very old and I should upgrade soon. But, I doubt I can move to the very latest for many reasons, old sbt 0.13 for one, scala 2.10 for another, for now.


So, I'm looking to find an intermediate version that hopefully drops-in and meets these goals:

 

Same basic case class construction (not using lenses etc so that doesn’t matter)


Works with SBT 0.13.x still (launched by scala 2.10 or 2.11)

Works with Scala 2.10 and 2.11 (compile, libs, target) alike (runs on JRE 8)

Uses same python 2.7 (or no longer needs it)


What can you recommend as a latest intermediate plugin version that I can just try in the above setting.


Later I will trying newer versions but for now, just want to make a stepping stone forward.


What do you recommend? If you can recommend a suitable version,I will give it a try out!


Many thanks in advance, Louis


Nadav Samet

unread,
May 12, 2020, 10:50:59 PM5/12/20
to Louis B, ScalaPB
Hi Louis,

The most recent version of ScalaPB that supports 2.10/2.11 is 0.8.4.

The most recent version of sbt-protoc that supports SBT 0.13.x is 0.99.27. I believe these two versions of sbt-protoc and ScalaPB should work together, however if you are seeing errors during compilation that indicate binary incompatibility (like MethodNotFoundException or ClassNotFoundException), look for the latest sbt-protoc that would work (based on changelog 0.99.18 should be fine)

The transition from your current version require some renaming of package so please follow the migration notes here. When you are ready to update Scala and SBT to recent version, the transition from 0.8.4 to 0.10.x is pretty straightforward.

Hope this helps!

-Nadav




--
You received this message because you are subscribed to the Google Groups "ScalaPB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalapb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalapb/71b9115e-4b21-483d-9944-73cf697154d2%40googlegroups.com.


--
-Nadav

Nadav Samet

unread,
May 13, 2020, 9:55:41 AM5/13/20
to Louis Botterill, ScalaPB
(Re-adding the mailing list). Upgrading to 0.6.7 as a first step makes sense, as it isolates you from the package name changing.

On Wed, May 13, 2020 at 5:52 AM Louis Botterill <chillip...@gmail.com> wrote:
Hi again,

Looking in maven, perhaps then I should try for 0.6.7 for now, until I can get the name changed artifacts available.
Does this sound like the best bet?
I can do several incremental steps to get up to date, this being step 0. The others may take time due to the artifacts, so that's what I'm aiming for initially, a quick win to do now and then what to do next, which I think you answered once I can get past the 0.7.0 hurdles.

0.6.7 would be a good first step?

All the best, Louis


On Wed, 13 May 2020 at 08:37, Louis Botterill <chillip...@gmail.com> wrote:
Hi again,

Ah I see after reading your migration guide. I think I will need initially to update to the latest version that is before this change that occurs at 0.7.0, in the interim. This is because the renaming will mean I'll need to get the libs checked and approved for loading into internal nexus, that is tricky! Something I wanted to avoid right now, but will do also later. For now I just want to bump a like for like version update, if possible.

If I want a version in the mean-tim that is effectively same as 0.4 or 0.5 what is the latest working version I can use that is just prior to the 0.7.0 changes. 

this may be a useful question for others, I'll post in the group too but meanwhile to save time I'm emailing you a direct reply here for now.

Many thanks,
Louis


On Wed, 13 May 2020 at 08:32, Louis Botterill <chillip...@gmail.com> wrote:
Hi Nadav,

Great, thanks very much.
It's been a very long time since I first set this up, so maybe I forgot some details, specifically then;

Since the only version I reference is in the plugin line (as far as I can see), which is

addSbtPlugin("com.trueaccord.scalapb" % "sbt-scalapb" % "0.5.9")

I should just change this to 0.8.4. and that should bring in the correct transitives, the runtime component and also the sbt-protoc version would update accordingly?

Or is there some other component of this I've set somewhere and since forgotten about, the sbt-protoc where I can try to set the version to 0.99.27

Will this update produce case classes in the same way as the old version I am using? Or the same with minor changes?

Also I presume this will be fine with same protoc compiler binary.

Many thanks, Louis
--
Web: www.chillipower.com
Blog: http://louisbotterill.blogspot.com/
Twitter: http://twitter.com/BinaryJunkie
LinkedIn: http://uk.linkedin.com/pub/louis-botterill/10/3b2/265

“The trouble with the world is that the stupid are cocksure and the intelligent are full of doubt.” –Bertrand Russell

Please consider your environmental responsibility before printing this e-mail


--
Web: www.chillipower.com
Blog: http://louisbotterill.blogspot.com/
Twitter: http://twitter.com/BinaryJunkie
LinkedIn: http://uk.linkedin.com/pub/louis-botterill/10/3b2/265

“The trouble with the world is that the stupid are cocksure and the intelligent are full of doubt.” –Bertrand Russell

Please consider your environmental responsibility before printing this e-mail


--
Web: www.chillipower.com
Blog: http://louisbotterill.blogspot.com/
Twitter: http://twitter.com/BinaryJunkie
LinkedIn: http://uk.linkedin.com/pub/louis-botterill/10/3b2/265

“The trouble with the world is that the stupid are cocksure and the intelligent are full of doubt.” –Bertrand Russell

Please consider your environmental responsibility before printing this e-mail


--
-Nadav

Louis

unread,
May 13, 2020, 10:26:16 AM5/13/20
to Nadav Samet, ScalaPB
Hi,

Ok thanks for confirming that. Let me work on that as a first step and then after I will look at the 0.7 hurdle and migrating to new artefacts. Once that is achieved then hopefully final steps you suggest will then be straightforward, getting as up to date as possible, which limited in our case (for the time being) by scala 2.11, which is itself dictated by our use of Spark also.

Many thanks!

Louis


On May 13, 2020, at 9:55 AM, Nadav Samet <thes...@gmail.com> wrote:


Reply all
Reply to author
Forward
0 new messages