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

GH-2710 module structure reorganization #3225

Merged
merged 8 commits into from
Jul 27, 2021

Conversation

abrokenjester
Copy link
Contributor

@abrokenjester abrokenjester commented Jul 24, 2021

GitHub issue resolved: #2710

Briefly describe the changes proposed in this PR:

  • rdf4j-util split into several smaller 'common' modules to allow smaller footprint of individual dependencies and easier modular boundaries
  • removed some obsolete code (OpenRDFException, OpenRDFUtil) and migrated some other classes to different packages (RDF4JException, IsolationLevel)
  • added upgrade pointers to release notes

This is quite a large refactor, but it gives us greater flexibility, cleans up a few old things, and sets us up to make followups like #1494 (each package in a single module) easier to achieve.


PR Author Checklist (see the contributor guidelines for more details):

  • my pull request is self-contained
  • I've added tests for the changes I made
  • I've applied code formatting (you can use mvn process-resources to format from the command line)
  • I've squashed my commits where necessary
  • every commit message starts with the issue number (GH-xxxx) followed by a meaningful description of the change

@abrokenjester
Copy link
Contributor Author

Looks like our use of multithreading for the maven build does not agree with the new modular structure. Verified locally that a single-threaded build succeeds. Possibly caused by my relying on transitive dependencies for including libraries like commons-annotations in some places (via rdf4j-model). I'll see if more explicit dependencies can fix this, otherwise may temporarily disable multithreaded builds in our Github actions.

@abrokenjester
Copy link
Contributor Author

abrokenjester commented Jul 24, 2021

  • update BOM and rdf4j-client pom
  • verify rdf4j-util is no longer referenced

@abrokenjester abrokenjester force-pushed the GH-2710-rdf4j-util-reorg branch 3 times, most recently from 7a9fd30 to 7deb0a7 Compare July 25, 2021 05:57
@hmottestad
Copy link
Contributor

hmottestad commented Jul 25, 2021

It's a bit big for me to review.

Does this affect any of the ShaclSail code in any way?

Could you confirm that this builds with the following method?

  1. mvn clean
  2. Delete the org/eclipse/rdf4j folder within your .m2 folder (so that you don't have any cached versions of RDF4J)
  3. Disconnect from the internet
  4. mvn install -DskipTests

import org.eclipse.rdf4j.IsolationLevel;
import org.eclipse.rdf4j.RDF4JException;
import org.eclipse.rdf4j.common.exception.RDF4JException;
import org.eclipse.rdf4j.common.transaction.IsolationLevel;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea to move IsolationLevel and RDF4JException to common

*/
@Deprecated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the method could be removed altogether, instead of just being deprecated ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It probably could, but I didn't want to make that decision in this PR.

@abrokenjester
Copy link
Contributor Author

abrokenjester commented Jul 25, 2021

It's a bit big for me to review.

Yeah, I'd be happy with just checking out the branch and giving it a quick smoke test, eyeballing a few specific changes. I'd like this merged in soon so that we can shake out any problems as we go.

Does this affect any of the ShaclSail code in any way?

A little. There's some refactoring with the exception classes.

Could you confirm that this builds with the following method?

1. mvn clean

2. Delete the org/eclipse/rdf4j folder within your .m2 folder (so that you don't have any cached versions of RDF4J)

3. Disconnect from the internet

4. mvn install -DskipTests

I just ran that (except I used mvn -o rather than physically disconnecting), and it fails, but funnily enough not because of this refactor, but because it can't find the serql parser (obviously have a few dangling dependencies somewhere).

I'll fix those in a separate PR, then rebase this one and try again.

@abrokenjester abrokenjester force-pushed the GH-2710-rdf4j-util-reorg branch from bfa1829 to 5817f22 Compare July 25, 2021 23:23
@abrokenjester
Copy link
Contributor Author

Ran the offline build test again with the dependency fixes merged in, all green.

@abrokenjester
Copy link
Contributor Author

abrokenjester commented Jul 26, 2021

Unless there are major objections I'll merge this tomorrow morning - I'd like to get this in as soon as possible to minimize the risk of merge conflicts. Of course, I'll be on hand to help out on any other PRs that get conflicts because of this.

@abrokenjester abrokenjester merged commit 6711c78 into develop Jul 27, 2021
@abrokenjester abrokenjester deleted the GH-2710-rdf4j-util-reorg branch July 27, 2021 08:16
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.

3 participants