jsuereth / scala-arm

This project aims to be the Scala Incubator project for Automatic-Resource-Management in the scala library
www.scala-lang.org
549 stars 51 forks source link

scala 2.13 release #79

Open ThStock opened 5 years ago

ThStock commented 5 years ago

Can you provide a release version for scala 2.13?

mpollmeier commented 5 years ago

Technically scala-arm isn't necessary for scala 2.13 any more, but if your project is cross-compiling and you don't want to split your sources, it's nice to have a cross release.

For my own purposes I've published my fork to maven central:

"com.michaelpollmeier" %% "scala-arm" % "2.1"

Feel free to use that until @jsuereth publishes an official version.

redkhalil commented 5 years ago

Any plan to release for scala 2.12.10? It's probably more important since 2.13 already has try-with-resources.

mpollmeier commented 5 years ago

Just use the regular 2.12 version, it works for 2.12.x.

jsuereth commented 5 years ago

Just a quick update I've been trying to set up all my personal (com.jsuereth) repositories to have an automated travis-ci based release process based on tagging repositories. This can get me out of the loop on making releases.

Apologize for this taking me so long. My free time for this has been very limited. Thanks much to @mpollmeier for providing something in the mean time.

mpollmeier commented 5 years ago

@jsuereth if i may: https://github.com/ShiftLeftSecurity/sbt-ci-release-early Disclaimer: I get a hefty part of your annual license fees :)

jsuereth commented 5 years ago

Thanks @mpollmeier . I like the idea, but I actually want release based on tags. I've created new GPG key that denotes an auto-release signer, and then anyone with commit access to this repo (which I plan to expand) can push verified releases via a tag, which I think deviates from sbt-ci-release-early.

If not, let me know how I can use it! I'm almost set up with my demo setup on shady-side, going to update this project after I get everything figured out there (as I'd rather screw that one up than this one).

mpollmeier commented 5 years ago

sbt-ci-release-early automatically tags and releases every push to master. It auto-increments the version, e.g. if the last tag was v2.1 it will tag the current commit as v2.2 and release version 2.2.

If I understand correctly, the only difference to what you describe above is that in your scenario, committers explicitly tag a version. That's ok for many scenarios, and ensures you only release what you explicitly want to release.

But note that it's a manual step, and potentially leads people to beg for a release. I prefer to not care about it: contributor PR merged, rest is taken care of.

francisdb commented 5 years ago

for reference: https://scala-lang.org/files/archive/api/2.13.x/scala/util/Using$.html

sangamon commented 4 years ago

I'd really love to see continued support for scala-arm, even with Using being part of the standard lib now - I prefer scala-arm's "monadic" style.

adampauls commented 4 years ago

@jsuereth I can't quite tell from this thread if the work to provide new releases for scala-arm is done, on-going, or on hold? I would love a release with https://github.com/jsuereth/scala-arm/pull/80 in it.

dannashirn commented 4 years ago

Still no support for scala 2.13? I'm starting to migrate a big project to 2.13, but as it's a dependency for a lot of projects I'm doing cross compile 2ith 2.12, so it's not feasible for me to use 2.13's Using yet.

mpollmeier commented 4 years ago

@dannashirn for a workaround see above: https://github.com/jsuereth/scala-arm/issues/79#issuecomment-525998387

phoenix2082 commented 3 years ago

@mpollmeier - Can you publish artifacts for Scala 2.13.3. I was getting error that neither in local ivy cache nor on m2 repo it can find jar for 2.13.2_2.1 version. I was able to resolve it by checking out code and build locally. Might save someone couple of hours.

mpollmeier commented 3 years ago

@phoenix2082 it's already cross-published for Scala 2.13.x, so it should just work.

Just verified locally with the below - works just fine.

scalaVersion := "2.13.3"
libraryDependencies += "com.michaelpollmeier" %% "scala-arm" % "2.1"

Btw this is the same as https://github.com/jsuereth/scala-arm/issues/79#issuecomment-531040161 above. Not sure what you did differently?

cchantep commented 3 years ago

@jsuereth sbt-dyn-ver could be used? Do you want some help to publish manually meanwhile as I understand you're busy?

phoenix2082 commented 3 years ago

@mpollmeier - Just vanilla play framework project with following build.sbt. After that I am getting error. Not sure but may be working for you because It might be pulling jar for you from local ivy cache. Does it work if you delete ~/.ivy2/local ? Also I have added "scala-arm" dep after compilation error.

lazy val root = (project in file(".")).enablePlugins(PlayScala)

scalaVersion := "2.13.3"

libraryDependencies += guice libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "5.0.0" % Test libraryDependencies += "com.michaelpollmeier" %% "scala-arm" % "2.1"

libraryDependencies ++= Seq( jdbc, "org.playframework.anorm" %% "anorm" % "2.6.3", "org.postgresql" % "postgresql" % "42.2.17" )

dvgica commented 2 years ago

It is perhaps bad form to promote another project here, but since it's been a while without maintenance of the official or forked repos, I'll link to a very similar project of mine: https://github.com/dvgica/managerial . I suspect it will help anyone looking for monadic-style resource management in more recent Scala versions.