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

Ship JRuby ext pre-built #22

Open
headius opened this issue Nov 10, 2016 · 7 comments · May be fixed by #25
Open

Ship JRuby ext pre-built #22

headius opened this issue Nov 10, 2016 · 7 comments · May be fixed by #25

Comments

@headius
Copy link

headius commented Nov 10, 2016

Currently, interception builds a small "event hook" extension for JRuby at install time. This is unnecessary and limits deployment of JRuby.

Many people that use JRuby do not have the javac compiler present, such as in production environments. And there's no reason they need it; once compiled, JVM bytecode can be shipped anywhere with a compatible JVM and run directly. This is how JRuby works and many JRuby-based application deployments as well.

Because interception does not ship a pre-built jar for the JRuby ext, it is more difficult to deploy a JRuby "fat jar" that contains all dependencies. This is largely because you can't just fetch the gem and include it; you have to also build some of its contents.

I would recommend that interception not build the JRuby ext on install, but instead release a -java gem that has the ext pre-built. This is how all other JRuby extensions are shipped.

@ConradIrwin
Copy link
Owner

Thanks @headius. I haven't done much on this project for a while, but will add it to the TODO list (and/or appeal for anyone else watching the project to jump in and do this!)

stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
@stdedos
Copy link
Collaborator

stdedos commented Oct 1, 2024

Hello there! I tried to spike a CI at https://github.com/stdedos/interception/tree/ci/build-gems - but I am lacking the various ruby tidbits missing.

I'd be nice if someone would build on top of that 🙏

stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 1, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 2, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 2, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 2, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 2, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 2, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
@stdedos
Copy link
Collaborator

stdedos commented Oct 2, 2024

For now, it is just tests failing (but the failures are not immediately obvious, because of continue-on-error: true)

Let me know what you think 🙏

@headius
Copy link
Author

headius commented Oct 2, 2024

Hey good to see some interest in this one!

I noticed that the logic includes a TracePoint implementation. I suspect that probably works on JRuby, since we support most of the TracePoint API. Maybe we can eliminate the JRuby extension altogether?

@headius
Copy link
Author

headius commented Oct 2, 2024

I remove the JRuby extension in #24 and use the TracePoint version of the logic.

stdedos added a commit to stdedos/interception that referenced this issue Oct 4, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
stdedos added a commit to stdedos/interception that referenced this issue Oct 4, 2024
Use Github-Actions to build gems for **all conceivable versions**.

Fixes ConradIrwin#22

Signed-off-by: Stavros Ntentos <[email protected]>
@stdedos
Copy link
Collaborator

stdedos commented Oct 4, 2024

Apart from the tests, CI "by itself" seems working.

I'd appreciate attention to:

  • fix the tests,
  • deciding if upstream would be interested in the commit, and
  • "somehow checking" if the correct thing is done

Trying to test this locally (again, I don't know exactly what I'm doing), it doesn't seem to work:

$ bin/gem install ./interception-0.5.gem 
Building native extensions. This could take a while...
ERROR:  Error installing ./interception-0.5.gem:
	ERROR: Failed to build gem native extension.

    current directory: /p/build/.r-gems/9.4.6.0/gems/interception-0.5/ext
/p/b/bin/jruby -I uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib extconf.rb
extconf failedBad file descriptor - /bin/sh

Gem files will remain installed in /p/build/.r-gems/9.4.6.0/gems/interception-0.5 for inspection.
Results logged to /p/build/.r-gems/9.4.6.0/extensions/universal-java-21/3.1.0/interception-0.5/gem_make.out

This is the jruby-head from https://github.com/stdedos/interception/actions/runs/11178801848 artifacts

@stdedos
Copy link
Collaborator

stdedos commented Oct 14, 2024

@ConradIrwin I guess I have no PR yet 😅

But if you have time to spare, checkout the code (and/or check a/some packaged artifact whether it's suitable-for-publish ruby)

@stdedos stdedos linked a pull request Oct 14, 2024 that will close this issue
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 a pull request may close this issue.

3 participants