Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

davishmcclurg
Copy link
Contributor

Gem::Specification#missing_extensions? uses this file to determine if
a gem has properly completed building extensions.

I ran into a couple issues with gems getting bundled but then not being
available when running the jar because missing_extensions? was true.
This change got things working for me, though there may be a better way
to fix the issue.

Here's an example repo that shows the issue and fix: https://github.com/davishmcclurg/warbler-bug
I generated a Rails project under JRuby and added the thrift gem to break
the generated war file. The commits show how to reproduce.

`Gem::Specification#missing_extensions?` uses this file to determine if
a gem has properly completed building extensions.
@kares
Copy link
Member

kares commented Aug 23, 2018

gem_build_complete_path is available (on BasicSpecification) since RGs 2.5, >= for JRuby 9K

would have been interesting to have a test-case for this, please keep the repo around for a while just in case we need to revert and examine - not going deep down the rabbit hole for now

@kares kares merged commit f20a64d into jruby:master Aug 23, 2018
kares added a commit that referenced this pull request Aug 23, 2018
* 'master' of github.com:jruby/warbler:
  Include `gem_build_complete_path` in jar (#439)
  Revert "[fix] gem path reloading when delpoying on 9.2.x ..." (#434)
  [fix] gem path reloading when delpoying on 9.2.x (#433)
@davishmcclurg
Copy link
Contributor Author

@kares the build files included by this may cause issues when switching java versions, since the build complete path includes the java version the gem was built on:

WEB-INF/gems/extensions/universal-java-1.7/2.3.0/thrift-0.11.0.0/gem.build_complete

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.

2 participants