Skip to content

Conversation

@deivid-rodriguez
Copy link
Contributor

Avoid using method deprecated in recent bundler versions.

I also added MacOS to the CI because I can't reproduce the CI issues locally and I'm using MacOS, so I want to double check whether it could be related to the OS somehow.

@deivid-rodriguez
Copy link
Contributor Author

Ok, I can repro test failures now, will work on this.

@deivid-rodriguez
Copy link
Contributor Author

I built takari/polyglot-maven#236 locally with the idea of using it here to see if that fixes the CI, but got the following error:

[ERROR] Failed to execute goal de.saumya.mojo:gem-maven-plugin:2.0.0-1:initialize (default) on project polyglot-ruby: Execution default of goal de.saumya.mojo:gem-maven-plugin:2.0.0-1:initialize failed: Unable to load the mojo 'initialize' in the plugin 'de.saumya.mojo:gem-maven-plugin:2.0.0-1' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: de/saumya/mojo/gem/InitializeMojo has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Could it be that gem-maven-plugin:2.0.0-1 has actually dropped support for Java 8 while adding support for Java 11? Does that make sense?

@kares
Copy link
Member

kares commented Oct 31, 2021

@deivid-rodriguez that is actually correct - seems that the parent (for gem-maven-plugin) is compiling with 11 (not sure why)

@deivid-rodriguez
Copy link
Contributor Author

It was because of an incorrect change I made that somehow sneaked into the 2.0.0 release. I think it was just an oversight. I was just working on a WIP PR on adding Java 11 support but didn't intend to drop support for java 8 at all. Hopefully we can get the changes in jruby/jruby-maven-plugins#119 released to get support for Java 8 restored!

@deivid-rodriguez
Copy link
Contributor Author

jruby-maven-plugins 2.0.1 was released and I updated takari/polyglot-maven#236 to use it, but even using a locally built polyglot-ruby using that, old dependencies are still being pulled and I'm unsure why. In particular,mavengem-wagon 0.2.1, which brings gem-maven-plugins 1.1.5, which we want to avoid. 🤔

@deivid-rodriguez
Copy link
Contributor Author

deivid-rodriguez commented Nov 2, 2021

I'm pretty sure it's coming from here: https://github.com/torquebox/maven-tools/blob/b52405ed1bb73fec626c631a18ea40045d6b6816/lib/maven/tools/versions.rb#L27-L32.

We most likely also need to bump those dependencies, get a new version out, and then bump polyglot-ruby dependency on it as well.

@deivid-rodriguez
Copy link
Contributor Author

I created another PR for maven-tools: jruby/maven-tools#34. That one was tricky because building maven-tools locally was using the broken latest release of maven-tools. To fix this chicken-and-egg issue, I migrated maven-tools to use a plain pom.xml file instead of a Mavenfile.

@deivid-rodriguez
Copy link
Contributor Author

I will verify it later, but I think now once takari/polyglot-maven#237 is merged and released and we bump the polyglot-ruby dependency here, we'll have a green CI.

@deivid-rodriguez
Copy link
Contributor Author

It tested locally against a locally built version of polyglot-ruby including takari/polyglot-maven#237, and it's all green 🎉.

So we just need to wait for takari/polyglot-maven#237 to be released.

Minitest plugins cause unrelated globally installed gems to interfere:

```
✗ rm -rf pkg && ruby -Ilib:test spec/ruby_maven_spec.rb --name="/pack the gem/"
/Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/specification.rb:2239:in `raise_if_conflicts': Unable to activate railties-6.0.4.1, because activesupport-6.1.4.1 conflicts with activesupport (= 6.0.4.1) (Gem::ConflictError)
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/specification.rb:1370:in `activate'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems.rb:221:in `rescue in try_activate'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems.rb:214:in `try_activate'
	from <internal:/Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:153:in `rescue in require'
	from <internal:/Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:149:in `require'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.0.4.1/lib/minitest/rails_plugin.rb:4:in `<top (required)>'
	from <internal:/Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:103:in `block in load_plugins'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:97:in `each'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:97:in `load_plugins'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:126:in `run'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:68:in `block in autorun'
/Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/specification.rb:2239:in `raise_if_conflicts': Unable to activate railties-6.0.4.1, because activesupport-6.1.4.1 conflicts with activesupport (= 6.0.4.1) (Gem::ConflictError)
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/specification.rb:1370:in `activate'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems.rb:215:in `try_activate'
	from <internal:/Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:153:in `rescue in require'
	from <internal:/Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:149:in `require'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.0.4.1/lib/minitest/rails_plugin.rb:4:in `<top (required)>'
	from <internal:/Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:103:in `block in load_plugins'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:97:in `each'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:97:in `load_plugins'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:126:in `run'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:68:in `block in autorun'
<internal:/Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:148:in `require': cannot load such file -- rails/test_unit/reporter (LoadError)
	from <internal:/Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:148:in `require'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/railties-6.0.4.1/lib/minitest/rails_plugin.rb:4:in `<top (required)>'
	from <internal:/Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/Users/deivid/.rbenv/versions/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:103:in `block in load_plugins'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:97:in `each'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:97:in `load_plugins'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:126:in `run'
	from /Users/deivid/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:68:in `block in autorun'
```
@deivid-rodriguez
Copy link
Contributor Author

polyglot-ruby 0.4.8 has been released and I updated ruby-maven to use it, but now CI fails sometimes and passes others. I'll try figure out why.

Instead of relying on `CatchStdout` or passing the log file parameter to
mvn.
@deivid-rodriguez
Copy link
Contributor Author

deivid-rodriguez commented Nov 7, 2021

Alright, so test errors didn't suggest any issues with this library. Tests were running mvn commands and checking different things being included in the output, however, the log file where the output was being saved (passed through the -l parameter to mvn) sometimes was not getting generated for some reason (my guess is some issue with mvn itself).

Since passing -l or using the CatchStdout class that would change $stdout and $stderr were being used inconsistently, I switched both to a more standard approach of using minitest methods capture_subprocess_io or capture_io and now everything is green 🎉.

@headius With the changes in this PR, there should no longer be any issues when releasing version 3.3.13. Let me know!

@headius
Copy link
Member

headius commented Nov 22, 2021

Thanks so much for the footwork here, @deivid-rodriguez! I will merge this.

@headius headius merged commit ef96c08 into jruby:master Nov 22, 2021
@headius
Copy link
Member

headius commented Nov 22, 2021

@mkristian Are you still out there? We still are willing to help take over maintenance if we can get a tour and all the appropriate push rights.

@mkristian
Copy link
Member

@headius I am still out there and did help @deivid-rodriguez as much I could the recent weeks. but we also can schedule some meeting so I give you guys some tour !

@deivid-rodriguez deivid-rodriguez deleted the no_bundler_warnings branch November 22, 2021 17:58
@deivid-rodriguez
Copy link
Contributor Author

Thanks @headius and @mkristian!

@headius You are an owner of this gem as per https://rubygems.org/gems/ruby-maven, so you should be all good for releasing. I don't think releasing this gem needs anything to be pushed to maven servers, in case you're lacking some push rights there.

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

Successfully merging this pull request may close these issues.

4 participants