Skip to content
This repository has been archived by the owner on Jan 18, 2018. It is now read-only.

OSGi-fy the published incremental compiler artifacts #7

Open
dotta opened this issue Sep 11, 2013 · 6 comments
Open

OSGi-fy the published incremental compiler artifacts #7

dotta opened this issue Sep 11, 2013 · 6 comments

Comments

@dotta
Copy link

dotta commented Sep 11, 2013

To bundle the incremental compiler artifacts inside the Scala IDE we currently need to generate a MANIFEST. One additional point that complexify our builds a bit is to craft a proper osgi version, which of course we wouldn't need to do if the published incremental compiler artifacts where already OSGi-ready.

@jsuereth
Copy link
Contributor

Hmm...

Can you outline your osgi version scheme you use now?

@dotta
Copy link
Author

dotta commented Sep 13, 2013

@jsuereth Tricky question ;-)

Can you outline your osgi version scheme you use now?

Here is the current definition of sbt osgi version we inject while OSGi-fying Zinc.

However, I think the versioning scheme we currently use isn't ideal, and I'd like to suggest a better one. Here is my take at this:

  • Releases: ${sbt.version}.v_${timestamp}_${git-hash}
  • Milestones: ${sbt.version}.m${milestone-number}${timestamp}${git-hash}
  • RCs: ${sbt.version}.rc${rc-number}${timestamp}${git-hash}
  • Snapshots: ${sbt.version}.dev_${timestamp}_${git-hash}

Where ${sbt.version} is the sbt version without any SNAPSHOT qualifier, i.e., 0.13.1, and never 0.13.1-SNAPSHOT, and ${git-hash} is the short hash of the sbt commit on which the JAR is based.

Note that "Releases", "Milestones" and "RCs" are built against stable (i.e., tagged) Scala and sbt branches, i.e., we never want to build releases on top of a SNAPSHOT. While SNAPSHOTS are of course built on top of Scala SNAPSHOTS.

One more thing, the proposed OSGi versioning scheme cotains no reference of the used Scala version, because the natural place for that information is the MANIFEST. Meaning that we should fix this ticket together with #3.

\cc @dragos @skyluc

@dotta
Copy link
Author

dotta commented Sep 20, 2013

@jsuereth ping :)

@jsuereth
Copy link
Contributor

:) Yeah. I'm planning to get to this, but I need to get @skyluc his sbt-rc patch before I head out. If I'm lucky, I'll have time this next week to get this for you. You suggestion looks great, i'll just have to encode the logic into the build.

One issue on git-hash is I'll have to encode that on the sbt side so it makes it over to sbt-republish. So that just means it'll be a bit longer until it shows up.

@dotta
Copy link
Author

dotta commented Sep 20, 2013

@jsuereth Awesome. Just wanted to get your feedback on the versioning scheme. I'm glad you like it!

@dragos
Copy link

dragos commented Apr 4, 2014

Hey @jsuereth we could really use this info (specially the git hash) in debugging issues like this one: Scala IDE and Java 1.8 "Unknown constant: 18"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants