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

Restore JRuby support #44

Open
headius opened this issue Nov 10, 2017 · 17 comments
Open

Restore JRuby support #44

headius opened this issue Nov 10, 2017 · 17 comments

Comments

@headius
Copy link

headius commented Nov 10, 2017

We need RedCloth to work on JRuby, since it is used by many applications. Support for JRuby was removed around April 2016 during work on CVE-2012-6684.

What can we do to help restore it?

@headius
Copy link
Author

headius commented Nov 10, 2017

Link #31

@joshuasiler
Copy link
Contributor

We don't have any maintainers that currently use JRuby or have incentive to learn about it. If you wish to become a maintainer, then great! Please submit a PR with your updates and we can get them incorporated.

@dometto
Copy link

dometto commented Sep 14, 2019

Seems this was closed a little abruptly. What would be needed to restore JRuby support?

@headius
Copy link
Author

headius commented Jan 10, 2020

@dometto It looks like they removed it because none of the current maintainers use JRuby. So, I guess we need to put together a PR that restores support and get someone added that can maintain it (with someone from JRuby team as a backup, perhaps).

@mohits
Copy link
Contributor

mohits commented Mar 3, 2020

OK, just a small update here. If we update the installed version of RedCloth-4.2.9-java with the new versions of the files in:
/lib/redcloth/formatters/*.rb
functionally, it runs same as 4.3.2

I will try to see what it takes to get it to work properly so that I can suggest what needs to be done. Maybe, then with some help from @headius or others in the JRuby team, we can have an option for RedCloth to work on JRuby also.

(Noted, of couse, that we do need to solve the maintainers issue for this and for Windows)

@headius
Copy link
Author

headius commented Mar 3, 2020

So really no changes at all were needed to reinstate JRuby support? Well that's great, and a little disappointing that support was dropped without contacting anyone from JRuby. 😢

@joshuasiler What is the overhead of maintaining the JRuby support? It seems like it hasn't changed in years (like most of this library), and the only JRuby-specific code is generated by Ragel. We'd be happy to include RedCloth head in the JRuby CI, and hopefully get someone from the community to help out... but what really needs to be done?

@mohits Once you get the basics working I'd say to submit a PR or point us at your branch so we can help finish it. We have people report that RedCloth doesn't work fairly often, so I'm excited to get it back up and going again on JRuby!

@joshuasiler
Copy link
Contributor

The overhead of maintaining JRuby support would be first to have a maintainer interested in maintaining JRuby support. That person could then scope the updates required and make changes as required. If someone has interest, please let me know and we can open up commit access.

@joshuasiler joshuasiler reopened this Mar 3, 2020
@mohits
Copy link
Contributor

mohits commented Mar 4, 2020

@joshuasiler, @headius

Let me go over this either today or latest by the weekend and see if I can set up and manage things the correct way (I probably need a Linux VM to check a few things, alongside my Windows setup). I use both Windows and JRuby, so I'm keen to have this working.

Assuming it all looks good and is proprly done, maybe, I can volunteer to support as maintainer for both the platforms. Of the 22 open issues, that would help us close 5 if these items are handled, and both platforms would be good to go again.

Thanks for your support thus far and for your patience.

@headius
Copy link
Author

headius commented Mar 5, 2020

@mohits Thank you! ❤️

@mohits
Copy link
Contributor

mohits commented Mar 8, 2020

Hi @headius and @joshuasiler

Some updates on this. I have been able to set up the environment to build the JRuby fat gem using the setup for 4.2.9. With that in place, I have been able to build up from v4.3.2-stable to bring back JRuby fat gem support. The branch is at:https://github.com/mohits/redcloth/tree/br_4.3.2_add-Jruby

On my setup (RVM on Linux VM with Ruby 2.7.0 and JRuby 9.2.11.0 and all necessary gems installed as mentioned in the guide), this does work and builds the gems.

It's not perfect yet (things have changed since the gems were last built, I guess) and I had to patch rake to get it to build with a new OpenJDK but it is progress. For now, I commented out Windows since I'm not sure if we need to support older Ruby on Windows. With the new setups, Ruby on Windows >= 2.4 will properly build the native extension anyway.

I still need to explore a bit more :-)

@bartkamphorst
Copy link

Curious to hear where things stand on this currently, @mohits ! On behalf of gollum-users, thanks for working on redcloth JRuby support!

@dometto
Copy link

dometto commented Jan 31, 2021

@mohits seconding @bartkamphorst's request and thanks :)

@headius
Copy link
Author

headius commented Feb 1, 2021

I pinged @mohits on Twitter to stop by and let us know status. It may just need a little help to push it over the line!

@mohits
Copy link
Contributor

mohits commented Jan 23, 2024

I hope to get back to this in February after I set up the VM that I was using for testing that things work fine. At the last point, there were only a couple of encoding related tests that were failing. I will ask for help again when I get stuck.

@headius
Copy link
Author

headius commented Jan 23, 2024

JRuby team is standing by to help!

@heliocola
Copy link
Collaborator

@mohits : I would like to work on this first, before the other PR about t.

I took a quick look on this branch you have, but I must say this is not at all my area of expertise.

With that said, if you or @headius can share any documentation and gems that I could look into, I will get this ball rolling.

@headius
Copy link
Author

headius commented Mar 14, 2024

@heliocola Hello! I would love to help guide you and assist where I am able. This is largely a porting exercise, so looking at the native code and comparing it with the Java code should provide a lot of guidance. I am happy to answer any questions along the way or point you to other examples of completed and working JRuby extensions.

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