haskell / haskell-wiki-configuration

Issue tracking for Haskell Wiki
https://wiki.haskell.org/
4 stars 4 forks source link

Move <haskell/> and <hask/> aliases for syntax highlighting into a new extension - remove related logic from LocalSettings.php #38

Closed taezaz closed 1 year ago

taezaz commented 1 year ago

Related Issue: https://github.com/haskell/haskell-wiki-configuration/issues/30

taezaz commented 1 year ago

@hgolden

Tested locally with Mediawiki 1.31 an the SyntaxHighlight_GeSHi extension that is included with this version.

Potential issues:

  1. There are no unit tests. That being said - I've checked the "SyntaxHighlight_GeSHi" tests and they don't seem to be doing much either and I thought it might be a bit excessive to write a test for this, but if you think it's worth adding them anyway, let me know.
  2. I've tried to add "SyntaxHighlight_GeSHi" as a dependency in extension.json, but couldn't manage to get Mediawiki to detect that it's installed. I checked the documentation and it seems that the module needs to register somehow and only then it can be detected. "SyntaxHighlight_GeSHi" doesn't seem to be doing that. So now you can only know based on the titles of the extensions that they're related.

I think both of the issues above are minor given the fact that this extension is created only to clean up LocalSettings.php and will not be distributed to be used by other people.

Will be waiting for your feedback. Thanks! :)

taezaz commented 1 year ago

@hgolden I'd be happy to add the unit tests, but I don't think registering this extension for public use is worth the effort. It's a normal practice to write extensions just for your own use as that's a useful way to encapsulate behavior specific to your website.

In addition to that, public extensions have a large number of prerequisites that need to be satisfied. They need to be maintained and their users supported. Also, Mediawiki states that it can take up to two years for an extension to get approved and listed which probably doesn't happen often but still it might potentially require a long-term investment into extension development.

All this makes me conclude that you should only bother publishing extensions if you're passionate about Mediawiki extension development or are in such business which I am not and I don't think this is important for Haskell Wiki future, but correct me if I am wrong.

I don't want to make it seem that I am avoiding the work - I really feel that it's unnecessary. I am very keen on helping the Haskell community and infrastructure, but I do have a limited time for that and I'd rather focus on what I am good at and what I can manage sustainably.

Do you think it will be enough to add unit tests? Do you have any other comments regarding the code?

hgolden commented 1 year ago

@taezaz

Thank you for your thoughtful reply and all the work you have already done!

@hgolden I'd be happy to add the unit tests, but I don't think registering this extension for public use is worth the effort. It's a normal practice to write extensions just for your own use as that's a useful way to encapsulate behavior specific to your website.

I wasn't aware of the work involved. It would be of little benefit, so I agree with your position.

Do you have any other comments regarding the code?

Your code looks fine to me. Thanks again. Once you have added the tests I will merge.

taezaz commented 1 year ago

@hgolden I've added the tests and a small README. Please have a look. Thanks! :)

hgolden commented 1 year ago

I will look in a few days. This morning I had sinus surgery and I'll be out of it for a couple days. Thanks for your prompt work!

taezaz commented 1 year ago

@hgolden Sounds good. Get well soon! :)

hgolden commented 1 year ago

@taezaz, sorry for the delay! It's taken me longer to recover from the surgery than I expected, but I'm better now. I will review your PR tomorrow.

hgolden commented 1 year ago

@taezaz, great! Thanks!