Skip to content

Shading and other code smells #6

Description

@termontwouter

While building MappingLoom and trying it out as a local dependency to make MappingWeaver work on my MacOS, I bumped into the following issues that warrant a clear documentation in the short term, and probably a revision in the long run.

  1. The code calls java.lang.System::load (in be.ugent.idlab.knows.mappingLoom.NativeUtils), which is a restricted method. At least on MacOS, I have to run the JAR with the --enable-native-access=ALL-UNNAMED option to temporarily ignore the restriction.

  2. The code calls sun.misc.Unsafe::objectFieldOffset (through org.apache.pekko.util.Unsafe), which is a deprecated method. This is already solved in Pekko v2, so bumping this dependency will solve it. Until then, running the JAR with the --sun-misc-unsafe-memory-access=allow option temporarily ignores it.

  3. The build uses shading, presumably to fix dependencies. This is not a good practice, however, and unless there are some truly complex issues at hand, dependencies should be resolvable with a good Maven setup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions