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

Upgrade to a modern build tool #266

Open
alexanderankin opened this issue May 29, 2022 · 10 comments
Open

Upgrade to a modern build tool #266

alexanderankin opened this issue May 29, 2022 · 10 comments

Comments

@alexanderankin
Copy link

since this repo comes up as the top hit for java developers trying to use relaxng, it seems like it could benefit from using a modern build tool instead of ant

@ndw
Copy link
Contributor

ndw commented May 29, 2022

I looked into that briefly the last time I was working on it. I quickly concluded that it would probably prove challenging. The repository layout and build systems are a bit...nonstandard.

@alexanderankin
Copy link
Author

yeah i got it to work for compiling just the class files, next step is going tests, which may or may not involve hard coding the services, it looks like ant was creating META-INF files during the build.

@alexanderankin
Copy link
Author

@sideshowbarker
Copy link
Contributor

@ndw - just pushed it here - master...alexanderankin:gradle?expand=1 (compare)

@alexanderankin Will you be opening a pull request with that patch?

@alexanderankin
Copy link
Author

I think there are a couple more milestones for me to hit before its ready, namely: 1) tests and 2) the two jars being put in the same directory as before.

I put a day into it to test feasibility, I can get it over the line if you guys are interested in merging - if yes, ill get back to it this upcoming week.

@sideshowbarker
Copy link
Contributor

I put a day into it to test feasibility, I can get it over the line if you guys are interested in merging - if yes, ill get back to it this upcoming week.

I can’t speak for the other maintainers, but if the patch works and is easy enough to run, then I highly doubt anybody here is going to object to merging it.

One nice thing about build patches is that it’s trivial for anybody to find out if they work or not — they don’t don’t really have a risk of introducing invisible regressions; the build either continues to produce output that runs as expected, or it doesn’t

And as far as the wider community goes, it seems clear there’s significant interest in being able to use a better build system.

That said — and again not attempting to speak for the other maintainers here — I don’t personally feel strongly about the need to replace the current build system. So it’s not a very high priority for me at least. But I’m not very well socialized at all into Java community, so I think my lack of feeling pain with the current build system here is probably not the norm.

And because I’m relatively not very up to speed with other current Java build systems, I wouldn’t be the best person to review any build patches and tests if they required a lot of very-careful scrutiny to make sure there are no regressions.

But as I said, because of the nature of it, I wouldn’t expect build-changes review to be something that requires a super high level of expertise — so probably even I could manage to help with the review.

@alexanderankin
Copy link
Author

still working on this, hit a bit of an issue with services - ant is detecting classes which implement the given interface on the classpath and generating resources, working on resolving that

@alexanderankin
Copy link
Author

alexanderankin commented Jul 9, 2022

Hey, I'm going to hard code some of these service names... I spent quite a while trying to figure out this magic for instance, overwriting the file in what is essentially an xml-encoded bash script...

the shellscript-like xml snippet
   <target name="mod.nvdl.services">
      <mkdir dir="${build.dir}/mod/nvdl/classes/main/META-INF/services"/>
      <delete file="${build.dir}/mod/nvdl/classes/main/META-INF/services/com.thaiopensource.validate.auto.SchemaReceiverFactory"
              quiet="true"
              failonerror="false"/>
      <echo file="${build.dir}/mod/nvdl/classes/main/META-INF/services/com.thaiopensource.validate.auto.SchemaReceiverFactory"
            append="true"
            message="com.thaiopensource.validate.nvdl.NvdlSchemaReceiverFactory${line.separator}"/>
      <echo file="${build.dir}/mod/nvdl/classes/main/META-INF/services/com.thaiopensource.validate.auto.SchemaReceiverFactory"
            append="true"
            message="com.thaiopensource.validate.nrl.NrlSchemaReceiverFactory${line.separator}"/>
      <echo file="${build.dir}/mod/nvdl/classes/main/META-INF/services/com.thaiopensource.validate.auto.SchemaReceiverFactory"
            append="true"
            message="com.thaiopensource.validate.mns.MnsSchemaReceiverFactory${line.separator}"/>
   </target>

which is not actually linkable, its gitignored:

modbuild.xml

generated from here:

<xslt style="build.xsl" in="modules.xml" out="modbuild.xml" force="true">

also the tests are incomprehensible, what does this even do? Any input helps (this is apparently a testng feature):

<testSuite>
<testCase>
<incorrect>
<thisIsJunk/>
</incorrect>
</testCase>
<testCase>

@oliviercailloux
Copy link
Contributor

@alexanderankin Still planning to introduce a PR about this? I think it would have a very positive effect by encouraging more PRs from other developers who might otherwise be discouraged by the build system.

@alexanderankin
Copy link
Author

alexanderankin commented Mar 19, 2023 via email

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

4 participants