Skip to content

Fix core-websocket-client source directory layout#3757

Merged
georgweiss merged 1 commit intoControlSystemStudio:masterfrom
emilioheredia-source:fix_websocket_client_source_layout
Apr 1, 2026
Merged

Fix core-websocket-client source directory layout#3757
georgweiss merged 1 commit intoControlSystemStudio:masterfrom
emilioheredia-source:fix_websocket_client_source_layout

Conversation

@emilioheredia-source
Copy link
Copy Markdown

The two source files were placed in a JPMS-style dotted directory:

src/main/java/org.phoebus.core.websocket.client/

instead of the standard Maven/Java nested directory:

src/main/java/org/phoebus/core/websocket/client/

Maven compiled the files but output the .class files into a dotted directory that the JVM cannot resolve as a package. The module still produced a valid jar (the jar plugin repackages the classes correctly), so any build that used the cached .m2 jar succeeded. However, builds that compiled against the reactor's target/classes directory directly (e.g. any -pl/--also-make partial build, or a downstream module built in the same reactor run before the jar was installed) would fail with:

package org.phoebus.core.websocket.client does not exist

Fix: move both files to the standard nested directory layout. No changes to package declarations, imports, or any other code.

The two source files were placed in a JPMS-style dotted directory:

  src/main/java/org.phoebus.core.websocket.client/

instead of the standard Maven/Java nested directory:

  src/main/java/org/phoebus/core/websocket/client/

Maven compiled the files but output the .class files into a dotted
directory that the JVM cannot resolve as a package.  The module still
produced a valid jar (the jar plugin repackages the classes correctly),
so any build that used the cached .m2 jar succeeded.  However, builds
that compiled against the reactor's target/classes directory directly
(e.g. any -pl/--also-make partial build, or a downstream module built
in the same reactor run before the jar was installed) would fail with:

  package org.phoebus.core.websocket.client does not exist

Fix: move both files to the standard nested directory layout.
No changes to package declarations, imports, or any other code.
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@emilioheredia-source
Copy link
Copy Markdown
Author

Hi, I work at the Canadian Light Source and recently started compiling and adding little fixes and enhancements to Phoebus, in the hope they can be merged with the oficial Phoebus release, so we won't need to maintain a separated fork. This is the first of a handful of PRs I want to submit for approval, this one dealing with something minor I found while compiling.
Thanks for taking the time to look into this, and thanks for Phoebus. It's currently replacing most other GUI frameworks for EPICS at the CLS, hence the interest. Cheers.
Emilio.
Controls Analyst.
Canadian Light Source.

@emilioheredia-source
Copy link
Copy Markdown
Author

Hi, I just noticed SonarCloud failures, flagged when it analized the PR code, but those are pre-existing issues in WebSocketClientService.java — our commit is a pure file rename with zero content changes (moving from the broken dotted-directory path org.phoebus.core.websocket.client/ to the correct nested path org/phoebus/core/websocket/client/). SonarCloud probably couldn't analyze the file before because the path was unresolvable.
Happy to follow up with a separate PR that addresses the flagged issues (swallowed InterruptedExceptions and logger string concatenation) if that would be useful.
Cheers.

@georgweiss
Copy link
Copy Markdown
Collaborator

@emilioheredia-source, thanks for spotting and fixing this. Obviously it slipped under my radar. Not sure how this happened, I suspect I did not create the directory structure correctly in IntelliJ.

@georgweiss georgweiss merged commit b9019cc into ControlSystemStudio:master Apr 1, 2026
3 of 4 checks passed
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