Skip to content

Fix/split package conflict - #161

Open
Jo4sDev wants to merge 2 commits into
jwdeveloper:masterfrom
Jo4sDev:fix/split-package-conflict
Open

Jo4sDev wants to merge 2 commits into
jwdeveloper:masterfrom
Jo4sDev:fix/split-package-conflict

Conversation

@Jo4sDev

@Jo4sDev Jo4sDev commented Sep 12, 2026

Copy link
Copy Markdown

Problem & Motivation

When consuming this library in a modular Java project (module-info.java), the Java Platform Module System (JPMS) introduced in Java 9+ throws compilation errors due to package overlap:

  • Ambiguity of Origin: Because the API and Client modules shared identical package names, non-modular applications resolved classes implicitly via classpath. However, in a modular project, the JVM cannot resolve which module owns a shared package namespace.
  • Split Package Rule Violation: JPMS strictly forbids two distinct modules from exporting or containing the exact same package path, completely blocking compilation in downstream modular projects.

Solution

To resolve this, the base package paths have been refactored to explicitly separate both modules:

  • API: io.github.jwdeveloper.tiktok.api.*
  • Client: io.github.jwdeveloper.tiktok.client.*

⚠️ Breaking Change Warning: While this update introduces breaking package-name changes that may cause merge conflicts with active development branches, it is a necessary structural fix to allow any project using modern Java Modular Architecture (module-info.java) to consume this library.

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.

1 participant