> Hello esteemed Guava users,
>
> With JDK 7 released it's high time we re-opened the discussion about moving Guava onto JDK 6.
>
> Of course we all know there must exist some release of Guava that will be the final release to support JDK 5. Now that JDK 7 is out, I am proposing that that release should be either release 10 (this month) or 11 (fall).
>
> Once released, we will honor requests to backport specific bug fixes, and we'll make patch releases. But, we've never had patch releases before, so there are some kinks to work out. Most of the world uses "semantic versioning" or something like it, and we have been saying that to any system which expects semantic versioning it should interpret "Guava release N" as meaning "Guava version 1.N.0". So, the current newest release would be 1.09.0 and this month's release 1.10.0.
Given that symbols are deprecated and removed in potentially each Guava release, wouldn't the N go to N.x.y. Unless no symbols are removed, then you could bump the minor version (middle digit).
Blair
... and we have been saying that to any system which expects semantic versioning it should interpret "Guava release N" as meaning "Guava version 1.N.0". So, the current newest release would be 1.09.0 and this month's release 1.10.0.
--
guava-...@googlegroups.com
Project site: http://guava-libraries.googlecode.com
This group: http://groups.google.com/group/guava-discuss
This list is for general discussion.
To report an issue: http://code.google.com/p/guava-libraries/issues/entry
To get help: http://stackoverflow.com/questions/ask (use the tag "guava")
+1. i.e.:
<= 10.x for Java 5
11.x Java 6
12.x Java 7
13.x Java 8
...
IME it's better to make the target jdk part of the artifact name, e.g.
guava-jdk5 r11, so every branch may "reuse" the release numbers and we
keep the current versioning system. It also keeps the versioning
scheme used by guava-osgi. As each target jdk is a different beast I
think it's reasonable to make them incompatible in the artifact name,
but synchronized in the release number (e.g. r12 has the same bug
fixes for both guava-jdk5 and guava-jdk6 but different classes in some
cases, due to jdk specific changes).
In a previous company I had to maintain two releases of internal
libraries for jdk 1.4 and jdk 5, for a couple of years. I branched the
jdk 5 development tree from the 1.4 tree and the policy was to fix
bugs in the 1.4 tree and then merge the commit into the jdk 5 branch,
but release new functionality only in the jdk 5 branch, but backport
it on request. It was on a much smaller scale than Guava, but it seems
to be a workable solution.
Best regards,
Daniel Yokomizo.
Using this kind of versioning scheme, if you decide later to maintain
both the JDK 6 and JDK 7 projects active, you may end up using Guava
13 for JDK 6, Guava 14 and 15 for JDK 7, Guava 16 for JDK 6, etc., as
the release cycles may eventually be different.
I like the idea of putting the minimum JDK as part of the artifact ID,
and there are a few other libraries that use this precedence.
BouncyCastle uses the minimum JDK as part of the artifact ID, for
example bcprov-jdk15 for JDK 5+ and bcprov-jdk16 for JDK 6+ [1] [2]
[3]. Another example is ojdbc6.jar is Oracle's JDBC driver for JDK 6,
while ojdbc5.jar for JDK 5 [4].
Assuming that release 10 is the first to support multiple JDK
releases, here are a few sample Maven dependency configs:
Release 10 for JDK 5:
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava-jdk5</artifactId>
<version>r10</version>
</dependency>
Release 10 for JDK 6:
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava-jdk6</artifactId>
<version>r10</version>
</dependency>
Release 10 for JDK 7:
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava-jdk7</artifactId>
<version>r10</version>
</dependency>
[1]: http://www.bouncycastle.org/latest_releases.html
[2]: http://repo2.maven.org/maven2/org/bouncycastle/bcprov-jdk15/1.46/bcprov-jdk15-1.46.pom
[3]: http://repo2.maven.org/maven2/org/bouncycastle/bcprov-jdk16/1.46/bcprov-jdk16-1.46.pom
[4]: http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html
- Dave
This will break the scheme used by guava-osgi (if the point releases
include @Beta changes or deprecated removals). If the only releases
are for bugfixes and compatible backward changes then it would be ok
to keep only the point release numbering.
> A different artifact name sounds much simpler and better, but does it cause
> problems by making it less obvious that guava-jdk5 and guava-jdk6 are two
> independent things that should never appear on the same classpath at the
> same time? I don't know.
I don't see how this is different from having guava-r09 and guava-r10
in the classpath. Without tooling to handle dependencies (e.g. maven,
osgi) you usually have to be careful and pray for things to work out
anyway. With osgi's semantic versioning we can use the qualifier in
the export/import package declarations (e.g. Import-Package:
com.google.common.base; version=“9.0.0.jdk5”). With maven/ivy I think
we need to add some additional tooling to avoid this problem which
makes me less satisfied with this solution.
On Tue, Aug 2, 2011 at 8:00 PM, Kevin Bourrillion <kev...@google.com> wrote:This will break the scheme used by guava-osgi (if the point releases
> On Tue, Aug 2, 2011 at 3:42 PM, Daniel Yokomizo <daniel....@gmail.com>
> wrote:
>>
>> Using this kind of versioning scheme, if you decide later to maintain
>> both the JDK 6 and JDK 7 projects active, you may end up using Guava
>> 13 for JDK 6, Guava 14 and 15 for JDK 7, Guava 16 for JDK 6, etc., as
>> the release cycles may eventually be different...
>
> No, once we cross the line for JDK 7 in e.g. Guava 14, that next
> Guava-on-JDK6 release would have to be 13.1, and there will be no easily
> observable correspondence.
include @Beta changes or deprecated removals). If the only releases
are for bugfixes and compatible backward changes then it would be ok
to keep only the point release numbering.
For osgi we need to support both import bundle and import package. Changing the bundle name just fixes the first.
> --
> Robert Konigsberg
> konig...@gmail.com
Why?
On Aug 2, 2011 11:12 PM, "Robert Konigsberg" <konig...@gmail.com> wrote:
>
> Why?
In osgi we can have import-package (preferred) and import-bundle (discouraged) as a way to describe the dependencies of a bundle. Using import-package allows to a finer model of dependency management, but it would require guava-osgi to use the version string to disambiguate because the package names in both bundles (e.g. guava-jdk5 and guava-jdk6) are the same.
Peter Kriens and Neil Bartlett explain why import-package is preferred:
http://www.theserverside.com/feature/OSGi-Because-Sharing-Shouldnt-Be-Painful
http://njbartlett.name/2010/03/07/osgi-and-how-it-got-that-way.html
With only import bundle support we prevent future, finer grained, guava osgi bundles (orthogonal to code versioning) which is not terribly important but not irrelevant either.
--
guava-...@googlegroups.com
Project site: http://guava-libraries.googlecode.com
This group: http://groups.google.com/group/guava-discuss
This list is for general discussion.
To report an issue: http://code.google.com/p/guava-libraries/issues/entry
To get help: http://stackoverflow.com/questions/ask (use the tag "guava")
--
Unless the team feels that some of the changes within a major version will be incompatible (notwithstanding extreme and necessary fixes), in which case, it's worth thinking of a different way.
Christian.
I agree. You could use classifiers - Test NG did that for a time. But frankly, I think simply using a upper-order version number for large-scale compatibility (tied to the jdk) second-order version number for rolling-forward in each line, and patch versions for compatible changes that are fixes. That's fine.
Unless the team feels that some of the changes within a major version will be incompatible (notwithstanding extreme and necessary fixes), in which case, it's worth thinking of a different way.
Hello,
I don't think it is necessary to rename bundles in guava-osgi. As long
as the main guava project decides to stick with the following
versionning scheme
rX for Java 5 where X = 10 or X = 11 (math operator ;))
rY for Java 6 where Y > X
rZ for Java 7 where Z > Y and so on...
Once the minimum JDK version requirement is upgraded for a given
version, upper version of Guava can not require a lower JDK version.
So, every backport or hotfix for lower JDKs must be integrated into
the last version requiring it, and consequently creates a A dot B
version. It may lead to the following imaginary release history
(assuming r11 is the JDK6 version):
r10 requires JDK5
r11 requires JDK6
r12 requires JDK6
r10.1 requires JDK5 and integrating hotfix
r13 requires JDK7
r12.1 requires JDK6 backporting r13 features
r10.2 requires JDK5 backporting r13 features
[...]
It seems clear enough to me, but it will require a dedicated wikipage
with a nice table to inform users ;)
guava-r11-jdk5
guava-r11-jdk6
It'll force people to declare the classifier in their poms so there's no ambiguity. Unfortunately there's no way (that I know of) to make classifiers mutually exclusive - but that's a problem we'd have with any of these.
On a separate note... we need to start considering how to manage the source itself - i.e. forking the source repo. To maintain these in source is going to be fun. I have to re-think how we're going to build multiple kinds of source if we use classifiers. Hmm.
Sorry - should clarify - these are some of the implications on build:
* If we bake in the jdk version into the artifact, then they are different "projects"
(locus of build) with independent source trees.
- Can be built independently
- Can be deployed independently to maven central
- Benefit: Easiest on all counts
- Benefit: As the projects vary more, they may be quite different, so this may be a good signal
- Downside: No signals that each version is incompatible via any dependency aware build system.
* If we bake the jdk into the classifier, then they are the same "project"
(locus of build) and share a source tree.
- Could be built separately (with some work)
- Not sure how to deploy them separately.
- Benefit: Guava 12 is Guava 12, it just comes in flavours
- Benefit: The classifier tag sort of highlights the flavor part - could help with configuration error
- Downside: This is the hardest to coordinate buidls and releases since "classifiers" are
intended for dependent artifacts, not alternate streams
* If they're different versions (12.x, 13,x, etc for each JDK track)
- Can be build separately (forked in different branches, presumably)
- Can, for sure, deploy them to central repo independently.
- Benefit: Easy
- Downside: Major version doesn't track to features anymore, which can be confusing
It's also a question whether we want to fork branches for these, and how to structure the projects may depend on which option.
I'm starting to lean (despite my initial instinct) towards three separate "projects" with the artifact carrying the jdk name. Because I think Guava-jdk5 is not the same project anymore as Guava-jdk6, and Guava-jdk8, as Kevin pointed out, may be half the size and substantially different in shape.
cheers,
Christian.
> No, once we cross the line for JDK 7 in e.g. Guava 14, that nextThis will break the scheme used by guava-osgi (if the point releases
> Guava-on-JDK6 release would have to be 13.1, and there will be no easily
> observable correspondence.
include @Beta changes or deprecated removals). If the only releases
are for bugfixes and compatible backward changes then it would be ok
to keep only the point release numbering.
> A different artifact name sounds much simpler and better, but does it causeI don't see how this is different from having guava-r09 and guava-r10
> problems by making it less obvious that guava-jdk5 and guava-jdk6 are two
> independent things that should never appear on the same classpath at the
> same time? I don't know.
in the classpath. Without tooling to handle dependencies (e.g. maven,
osgi) you usually have to be careful and pray for things to work out
anyway. With osgi's semantic versioning we can use the qualifier in
the export/import package declarations (e.g. Import-Package:
com.google.common.base; version=“9.0.0.jdk5”). With maven/ivy I think
we need to add some additional tooling to avoid this problem which
makes me less satisfied with this solution.
Christian.
So we currently have just one artifactId which is "guava". Questions:1. Do we like the new name "guava-jdk6", "guava6", or what?
1. Do we like the new name "guava-jdk6", "guava6", or what?
2. Should we continue to use the name "guava" as meaning "guava-jdk5"? If we don't, and release 10 is the last "guava" we ever put out, I have the fear that even years from now people will still go looking for "guava" and will see 10.0.0 as being the newest we've got. But if we do, we have another problem which is that users will see that guava has been recently updated and will use it even though they're on JDK 6 or 7. If we keep "guava" around, should we also redundantly have "guava-jdk5" or not? If we don't keep it around, should we go ahead with the guava-to-guava-jdk5 rename right now?
To answer your question, rather than the maven technical minutia, I like.guava -> pointer to guava-${latest}guava-jdk5guava-jdk6guava-jdk7guava-jdk8
1. Do we like the new name "guava-jdk6", "guava6", or what?I was actually thinking of suggesting naming like "gauva6" because it plays on the similarity of "guava" and "java". It seems like it could be more confusing combined with version numbers though.
2. Should we continue to use the name "guava" as meaning "guava-jdk5"? If we don't, and release 10 is the last "guava" we ever put out, I have the fear that even years from now people will still go looking for "guava" and will see 10.0.0 as being the newest we've got. But if we do, we have another problem which is that users will see that guava has been recently updated and will use it even though they're on JDK 6 or 7. If we keep "guava" around, should we also redundantly have "guava-jdk5" or not? If we don't keep it around, should we go ahead with the guava-to-guava-jdk5 rename right now?That is a tough one. People are still confused by google-collections changing to guava it seems.
My feeling, though, is that if the artifact name is going to change it might as well change now.Having the guava artifact point to the latest as suggested might be a good solution to the issue of the artifact people have been using stagnating, but I'd worry about people depending on it rather than a specific version. Someone using JDK6 might depend on the guava artifact safely for a while before the release of a JDK7 version causes the next version of the guava artifact to not work for them.
That may not actually be an issue, though, as they can just change the artifact they're using.I'm also unsure as to how version numbers would work for that "pointer" guava artifact, or for the JDK-version artifacts for that matter. If, say, r11 were the first to have a JDK6 version, would that be version 1 of the JDK6 version and version 11 of the JDK5 version or version 11 of both? What version number would the pointer artifact use?
Finally, Is the goal to have versions of Guava (not including JDK8) be backwards compatible with previous JDK versions such that an application using the JDK7 version can use a library that was built for the JDK5 version (provided it didn't use @Beta APIs and such of course)?
> So we currently have just one artifactId which is "guava". Questions:
>
> 1. Do we like the new name "guava-jdk6", "guava6", or what?
I prefer guava-jdk6, it's clear it's meant for that version of the JDK. Guava6 looks like a guava version number.
Blair
2. Should we continue to use the name "guava" as meaning "guava-jdk5"? If we don't, and release 10 is the last "guava" we ever put out, I have the fear that even years from now people will still go looking for "guava" and will see 10.0.0 as being the newest we've got. But if we do, we have another problem which is that users will see that guava has been recently updated and will use it even though they're on JDK 6 or 7. If we keep "guava" around, should we also redundantly have "guava-jdk5" or not? If we don't keep it around, should we go ahead with the guava-to-guava-jdk5 rename right now?That is a tough one. People are still confused by google-collections changing to guava it seems.Yep. What can we do about that, do you think?
People search maven repository for guava will see guava-jdk* entries as well.
Remember - we can map the old artifacts to the new ones with new ids, new version numbers - whatever, to maintain history. The question should primarily be - what's the right way to move forward?
Christian.
Ahh, "guava6" can't really work. "Are you using guava 11?" "No, I'm using 6." "Whoa, that's old." "No, it's brand new!"So I think: guava-jdk6. And I think we should have a guava-jdk5 as of release 10.
And we need to figure, in this process, what we want to do with version numbers. I do think we're killing ourselves by avoiding the standard M.N numbering. Even if we do three different artifacts, I think 10.1 and 11.3 are understandable version numbers. But whatever the end result is - we need to pick one. Did we have resolution on any of this?
Remember - we can map the old artifacts to the new ones with new ids, new version numbers - whatever, to maintain history. The question should primarily be - what's the right way to move forward?
Hello esteemed Guava users,With JDK 7 released it's high time we re-opened the discussion about moving Guava onto JDK 6.Of course we all know there must exist some release of Guava that will be the final release to support JDK 5. Now that JDK 7 is out, I am proposing that that release should be either release 10 (this month) or 11 (fall).Once released, we will honor requests to backport specific bug fixes, and we'll make patch releases. But, we've never had patch releases before, so there are some kinks to work out. Most of the world uses "semantic versioning" or something like it, and we have been saying that to any system which expects semantic versioning it should interpret "Guava release N" as meaning "Guava version 1.N.0". So, the current newest release would be 1.09.0 and this month's release 1.10.0.But this situation is weird, and we may want to consider officially switching over to using those numbers to avoid future confusion. Problem is it would definitely cause plenty of present confusion since 1.10.0 sounds a whole lot less than "9". But on the bright side, this may more clearly make room for the potential patch releases I was just mentioning, which can be 1.10.01, 1.10.02, etc., while we've never had a "Guava release 09... point 1" before.Question: how many of you are stuck on JDK 5 and expect to be so for a while? If you're concerned about being capped at version 1.10.x of Guava indefinitely due to your JDK 5 dependence, let's talk: perhaps we can get enough volunteer interest in maintaining a (near-)full backport project. If we are going to go down that road, though, there are some things we'll need to figure out. How would backport releases be suitably differentiated from regular Guava releases? Does it call for a different project name? Or could it just continue to use patch release numbers under 1.10 -- or what?~~~Next there is the issue of JDK 7! The big problem with JDK 7 is not that Guava developers are itching to use String switch. The issues I'm aware of are:
- If you're using Guava on JDK 7, you'll be very sad that we can't put @SafeVarargs on any of our methods- I am not sure, but it is possible we have some libraries that should implement AutoCloseable and if we can't do that it will likewise make you sad- Numerous methods should really be marked deprecated for JDK 7 users, but not for users of JDK 6. Examples: Objects.equal, Ints.compare, Longs.hashCode, and all the no-arg creation-helper methods like Maps.newHashMap().- Most of all, JDK 7's dramatically overhauled filesystem API calls for a near-complete, incompatible rethinking of our common.io package! We can do this in a new package called common.nio, but we can't even put that into a Guava that still supports JDK 6. Should it thus become Guava's second "splinter project" (the first of which will be guava-testlib)?How might we deal with this? (Possible solution a bit later.)~~~And while we're here, we might as well talk a bit about JDK 8. I believe that the addition of lambdas and virtual extension methods, plus the planned addition of many new interfaces (e.g. Predicate) and many new methods on existing interfaces (e.g. Iterable.filter?) will require a major change to how we look at Guava's place in the world. It will basically render the Guava that we know today at least 50% obsolete! It will require a new, smaller, greatly changed and re-focused Guava which could not possibly be directly compatible with the old. I don't know whether it would make more sense to choose a new project name for that new codebase, or simply bump up to "Guava 2.0.0" and live with the fact that this means violating my oft-repeated promises about backward compatibility in perpetuity.And if we're willing to plan on that "Guava 2.0.0" notion, then we might perhaps as well use Guava 2.0.0 for the JDK 7-based version and Guava 3.0.0 for JDK 8, no?~~~That should be enough to get conversation flowing. Thanks in advance for helping us sort through these issues!