New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move NetLogo to new Vector implementation in 2.13.2? #1823
Comments
Scala 2.13.2 is now available and includes the new |
Scala 2.13.3 is out, so the new |
@SethTisue Did you already try running scala-collection-compat over the repository? If so, what where the results? |
@EwoutH I think you might be misunderstanding the purpose of scala-collection-compat. it's useful for using certain 2.13 features from 2.12, but we aren't staying on 2.12 and we don't need those features. I don't think scala-collection-compat is a useful tool for upgrading to 2.13, which is what I'm suggesting here |
Hi Seth,
What steps need to be taken to upgrade to scala 2.13.2 ?
What version of scala do you think we should aim for (if we have the resources) for the next release (or the one after).
- Aaron
--
Aaron Brandes, Software Developer
Center for Connected Learning and Computer-Based Modeling
From: Seth Tisue ***@***.***>
Date: Thursday, November 17, 2022 at 10:14 AM
To: NetLogo/NetLogo ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [NetLogo/NetLogo] move NetLogo to new Vector implementation in 2.13.2? (#1823)
@EwoutH<https://urldefense.com/v3/__https:/github.com/EwoutH__;!!Dq0X2DkFhyF93HkjWTBQKhk!RU_A6fhz0RVicRU2hYjmx7jy3tpGZ877uR-NV63_5AJ4r9-XndkuKZb1-C22v9RghQxLXywDOk2lptGm85XsETUdSFCckQm7TA$> I think you might be misunderstanding the purpose of scala-collection-compat. it's useful for using certain 2.13 features from 2.12, but we aren't staying on 2.12 and we don't need those features. I don't see that scala-collection-compat is useful for upgrading to 2.13
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/1823*issuecomment-1318783375__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!RU_A6fhz0RVicRU2hYjmx7jy3tpGZ877uR-NV63_5AJ4r9-XndkuKZb1-C22v9RghQxLXywDOk2lptGm85XsETUdSFAQjIEOnQ$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANSUO2QCKNJDSX4DCWITKXLWIZDWBANCNFSM4LE563PA__;!!Dq0X2DkFhyF93HkjWTBQKhk!RU_A6fhz0RVicRU2hYjmx7jy3tpGZ877uR-NV63_5AJ4r9-XndkuKZb1-C22v9RghQxLXywDOk2lptGm85XsETUdSFApMK5IVQ$>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
In that case I think I indeed misunderstood, I thought
|
@EwoutH Oh, sorry! The rewrite rules, I forgot about those. Yes, you're absolutely right, that could be helpful here. (I thought you meant the scala-collection-compat library.) |
You should go straight to 2.13.10. There's no reason to use any intermediate version as a way station. You can worry about Scala 3 later. It's best to get on 2.13 first.
Bump the version number, see what breaks, and fix it :-) You'll want to read https://github.com/scala/scala/releases/v2.13.0 very carefully and absorb it thoroughly. Anything in the notes in is a potential concern, but by far the biggest area of change is the Scala collections library. As the notes say, "Most ordinary code that used the old collections will continue to work as-is", but in any large codebase like NetLogo's, "most" will leave you with some work to do. After bumping Then get the code to compile on 2.13. as suggested by @EwoutH, Then get the tests to pass. Then do all of the extensions, too. |
I don't know how many warnings the NetLogo codebase generates or whether y'all are in the habit of ignoring them? During the upgrade, there will probably be new warnings that will alert you of potential issues and you won't want to tune them out. |
Oh, and I forgot to mention:
(This is in the 2.13.0 release notes, but it's easy to miss.) |
Hi Seth,
Thanks for all the info.
Our scalacOptions in build.sbt include -deprecation and -Xfatal-warnings, so we always eliminate any deprecations that arise. Similarly we use the javac options -deprecation and -Werror, which were very helpful in the Java 8 -> Java 17 ugrade.
* Aaron
…--
Aaron Brandes, Software Developer
Center for Connected Learning and Computer-Based Modeling
From: Seth Tisue ***@***.***>
Date: Thursday, November 17, 2022 at 1:56 PM
To: NetLogo/NetLogo ***@***.***>
Cc: Aaron Andre Brandes ***@***.***>, Comment ***@***.***>
Subject: Re: [NetLogo/NetLogo] move NetLogo to new Vector implementation in 2.13.2? (#1823)
I don't know how many warnings the NetLogo codebase generates or whether y'all are in the habit of ignoring them? During the upgrade, there will probably be new warnings that will alert you of potential issues and you won't want to tune them out.
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/NetLogo/NetLogo/issues/1823*issuecomment-1319067698__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!VmTBYHQj9CryrEuMw4LYeFxnEUJrLKyvU19r4IdfJxHax8dHR2ciZa1XtMbAo9IT4Q4x2LssnKNQ-WJoYAj-16JYcDWWW5C17g$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANSUO2WXLAU3LS5KPFVZJRLWIZ5V7ANCNFSM4LE563PA__;!!Dq0X2DkFhyF93HkjWTBQKhk!VmTBYHQj9CryrEuMw4LYeFxnEUJrLKyvU19r4IdfJxHax8dHR2ciZa1XtMbAo9IT4Q4x2LssnKNQ-WJoYAj-16JYcDV-PemACA$>.
You are receiving this because you commented.Message ID: ***@***.***>
|
I did try to apply the Collection213Upgrade rewrite rule using Scala Steward. This rule was recently added to Scala Steward. Unfortunately it failed, here is the log. |
scala/scala#8534 will likely land soon and be included in Scala 2.13.2
NetLogo's
LogoList
is just a wrapper aroundscala.collection.immutable.Vector[AnyRef]
, so the performance differences should carry over directly to NetLogosome of the improvements give huge speedups on very long lists. but perhaps in NetLogo such huge lists aren't that common
but also, another change in the new Vector is that small sizes are special-cased. I would expect even ordinary NetLogo models to benefit from that — if they use lists at all, I mean. they can expect to benefit in speed, but at least as important, they will use benefit in lower memory usage. users running with large number of agents, where each agent uses small lists, could see a noticeable drop in RAM usage
and it would be interesting to run the NetLogo benchmark suite before-and-after this change
but.... huge caveat.... you'd have to move to Scala 2.13 first. curious, is any work on that planned or in progress?
The text was updated successfully, but these errors were encountered: