Navigation Menu

Skip to content
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

VERSION doesn't contain the current version #2206

Closed
chrisseaton opened this issue Nov 16, 2014 · 15 comments
Closed

VERSION doesn't contain the current version #2206

chrisseaton opened this issue Nov 16, 2014 · 15 comments

Comments

@chrisseaton
Copy link
Contributor

VERSION seems to currently contain 9.0.0.0.dev-SNAPSHOT, but for example mvn -Pdist produces jruby-dist-9.0.0.0.dev-bin.tar.gz, without the -SNAPSHOT part. What's really crazy is that jruby-dist-9.0.0.0.dev-bin.tar.gz contains a directory called... jruby-9.0.0.0.dev-SNAPSHOT. Just to add to the confusion, mvn -Pcomplete produces jruby-complete-9.0.0.0.dev-SNAPSHOT.jar.

This makes it impossible to automate any tool that depends on being able to find the correct output from the build system.

@chrisseaton
Copy link
Contributor Author

I propose we forget all about .dev, and move to the Maven convention of just using SNAPSHOT, so it should be 9.0.0.0-SNAPSHOT, everywhere, and then in the future 9.0.0.0-rc1, again without .dev.

@headius
Copy link
Member

headius commented Nov 17, 2014

@chrisseaton I like your suggestion but it might have an impact on Ruby installers if our head snapshots no longer have .dev in them. @mpapis?

@donv
Copy link
Member

donv commented Nov 17, 2014

RubyGems versions may not include dashes (-). This means that any JRuby version must either conform to this or be translated when releasing the jruby-jars-*.gem.

Consistency and predictability in versioning is desired.

@headius
Copy link
Member

headius commented Nov 17, 2014

@donv For consistency and predictability, are you saying you prefer the .dev number since it is what we have used in the past?

@donv
Copy link
Member

donv commented Nov 17, 2014

For me and my projects, the consistency inside each version across packages and the predictability of future versions is more important than keeping backwards consistency.

@mkristian
Copy link
Member

@chrisseaton the name of the dist tar is not following maven conventions and I "renamed" the file in maven/jruby-dist/target to have NO snapshot it the name. probably if you unpack it has the SNAPSHOT in the directory name - not sure though might have changed this as well.

in general it is much easier to stick to the maven conventions - any divergence is just error prone as we have seen it with jruby-dist and jruby-jars in the past. jruby-jars is a gem and as gem you can not have the '-' in the name - but converting the '-' to '.' is allowed on the rubygems side.

with the 1.7.x branch we use maven convention for quite some time now - except jruby-jars where -SNAPSHOT in the version gets converted to ".dev" for the gem.

there was a short time when there was a snapshot repository for jruby artifacts on ci.jruby.org which I used even on maven project on travis.

not having SNAPSHOT in the maven version means there is not way to get a public snapshot of jruby artifacts online anymore, since maven will treat it as a released version and never checks for updated version online anymore.

@mpapis
Copy link
Contributor

mpapis commented Nov 17, 2014

RVM does not automatically use the .dev / SNAPSHOT releases so renaming should have no impact on RVM

@mpapis
Copy link
Contributor

mpapis commented Nov 17, 2014

as for naming conventions it is a good practice to make the top directory in archive / package to have the same name as the archive / package without extension

@chrisseaton
Copy link
Contributor Author

I think my problem is not really the difference between SNAPSHOT and dev, it's that I have no idea why certain files use certain version numbers and others use another.

Maybe the solution would be for someone to add some info to BUILDING.md that explains carefully what the version number plan for JRuby is, and what files should have what names. My problem is when .dev and SNAPSHOT seem to randomly appear and disappear in various combinations every few weeks. That breaks things like my script to bundle Graal into a JRuby distribution.

I'd do that myself but it looks like I don't understand all the various restrictions that we have, so I'd need someone else to do me the favour, if anyone who knows it all has the time.

@mkristian
Copy link
Member

the last changes come by merging the jruby-1_7 into master and some of the
"version" hacks disappeared.

for me it looks like the biggest concern was the RVM which apparently can
handle 9.0.0.0-SNAPSHOT

unless there are other objections I will move to 9.0.0.0-SNAPSHOT and
remove the remaining naming hacks (with exception of the jruby-jars gem)

if something else is needed I do need to know how the naming for the
various files should look like !

@chrisseaton
Copy link
Contributor Author

Perhaps as well as documentation of what we think version numbers should be, what we could really do with is some tests that checks that this is the case. For example, if Travis tried building jruby-dist and checked the filename, then untarred it and checked the filename of the resulting folder, it would have found this regression.

If @mkristian has time to write down what his intention is for the version number and names of various files, I can write the test suite.

@mkristian mkristian mentioned this issue Nov 17, 2014
@mkristian
Copy link
Member

@chrisseaton see the PR above - I split is up in 4 commits allow cherry-picking what is needed/wanted

the rule is simple: all artifacts have the version from the file VERSION for both the local build

/test/target/jruby-tests-9.0.0.0-SNAPSHOT.jar
./maven/jruby-stdlib/target/jruby-stdlib-9.0.0.0-SNAPSHOT.jar
./maven/jruby-jars/pkg/jruby-jars-9.0.0.0.snapshot.gem
./maven/jruby-jars/lib/jruby-core-9.0.0.0-SNAPSHOT.jar
./maven/jruby-jars/lib/jruby-stdlib-9.0.0.0-SNAPSHOT.jar
./maven/jruby-complete/target/jruby-complete-9.0.0.0-SNAPSHOT.jar
./maven/jruby/target/jruby-9.0.0.0-SNAPSHOT.jar
./maven/jruby-noasm/target/jruby-noasm-9.0.0.0-SNAPSHOT.jar
./maven/jruby-dist/target/jruby-dist-9.0.0.0-SNAPSHOT-bin.tar.gz
./maven/jruby-dist/target/jruby-dist-9.0.0.0-SNAPSHOT-src.tar.gz
./maven/jruby-dist/target/jruby-dist-9.0.0.0-SNAPSHOT-src.zip
./maven/jruby-dist/target/jruby-dist-9.0.0.0-SNAPSHOT-bin.zip
./core/target/jruby-core-9.0.0.0-SNAPSHOT-noasm.jar
./core/target/jruby-core-9.0.0.0-SNAPSHOT.jar
./core/target/jruby-core-9.0.0.0-SNAPSHOT-complete.jar

as well on the maven local repository (in my case it is under /usr/local/repository):

/usr/local/repository/org/jruby/jruby-dist/9.0.0.0-SNAPSHOT/jruby-dist-9.0.0.0-SNAPSHOT-bin.zip
/usr/local/repository/org/jruby/jruby-dist/9.0.0.0-SNAPSHOT/jruby-dist-9.0.0.0-SNAPSHOT-src.zip
/usr/local/repository/org/jruby/jruby-dist/9.0.0.0-SNAPSHOT/jruby-dist-9.0.0.0-SNAPSHOT.pom
/usr/local/repository/org/jruby/jruby-dist/9.0.0.0-SNAPSHOT/jruby-dist-9.0.0.0-SNAPSHOT-bin.tar.gz
/usr/local/repository/org/jruby/jruby-complete/9.0.0.0-SNAPSHOT/jruby-complete-9.0.0.0-SNAPSHOT.jar
/usr/local/repository/org/jruby/jruby-complete/9.0.0.0-SNAPSHOT/jruby-complete-9.0.0.0-SNAPSHOT.pom
/usr/local/repository/org/jruby/jruby-tests/9.0.0.0-SNAPSHOT/jruby-tests-9.0.0.0-SNAPSHOT.pom
/usr/local/repository/org/jruby/jruby-tests/9.0.0.0-SNAPSHOT/jruby-tests-9.0.0.0-SNAPSHOT.jar
/usr/local/repository/org/jruby/jruby-artifacts/9.0.0.0-SNAPSHOT/jruby-artifacts-9.0.0.0-SNAPSHOT.pom
/usr/local/repository/org/jruby/jruby-stdlib/9.0.0.0-SNAPSHOT/jruby-stdlib-9.0.0.0-SNAPSHOT.pom
/usr/local/repository/org/jruby/jruby-stdlib/9.0.0.0-SNAPSHOT/jruby-stdlib-9.0.0.0-SNAPSHOT.jar
/usr/local/repository/org/jruby/jruby-core/9.0.0.0-SNAPSHOT/jruby-core-9.0.0.0-SNAPSHOT-complete.jar
/usr/local/repository/org/jruby/jruby-core/9.0.0.0-SNAPSHOT/jruby-core-9.0.0.0-SNAPSHOT-noasm.jar
/usr/local/repository/org/jruby/jruby-core/9.0.0.0-SNAPSHOT/jruby-core-9.0.0.0-SNAPSHOT.pom
/usr/local/repository/org/jruby/jruby-core/9.0.0.0-SNAPSHOT/jruby-core-9.0.0.0-SNAPSHOT.jar.lastUpdated
/usr/local/repository/org/jruby/jruby-core/9.0.0.0-SNAPSHOT/jruby-core-9.0.0.0-SNAPSHOT.jar
/usr/local/repository/org/jruby/jruby/9.0.0.0-SNAPSHOT/jruby-9.0.0.0-SNAPSHOT.pom
/usr/local/repository/org/jruby/jruby/9.0.0.0-SNAPSHOT/jruby-9.0.0.0-SNAPSHOT.jar
/usr/local/repository/org/jruby/jruby-parent/9.0.0.0-SNAPSHOT/jruby-parent-9.0.0.0-SNAPSHOT.pom
/usr/local/repository/org/jruby/jruby-noasm/9.0.0.0-SNAPSHOT/jruby-noasm-9.0.0.0-SNAPSHOT.jar
/usr/local/repository/org/jruby/jruby-noasm/9.0.0.0-SNAPSHOT/jruby-noasm-9.0.0.0-SNAPSHOT.pom

@donv
Copy link
Member

donv commented Nov 18, 2014

Please make sure that development versions are sorted before beta releases, prereleases and release candidates. Especially the jruby-jars-*.gem files.

@chrisseaton
Copy link
Contributor Author

I think we've got a grip on it now, and I've written tests to ensure it's all consistent on every build.

@chrisseaton
Copy link
Contributor Author

I've added this test to Travis, so we're now checking the names of files and directories in archives on every commit and we should see any problems immediately.

https://github.com/jruby/jruby/blob/master/test/check_versions.sh

@enebo enebo added this to the JRuby 9.0.0.0 milestone Dec 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants