Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 16, 2026

Scala cannot access inherited static members from package-private parent classes. This prevented Scala code from importing NodeIds0, StatusCodes0, etc. directly as a workaround.

fixes #1686

Changes

  • Changed visibility of NodeIds0 through NodeIds5 from package-private to public abstract
  • Changed visibility of StatusCodes0 from package-private to public abstract

Usage

Scala code can now import these classes directly:

import org.eclipse.milo.opcua.stack.core.NodeIds0
import org.eclipse.milo.opcua.stack.core.StatusCodes0

// Access constants from the parent classes
val booleanNodeId = NodeIds0.Boolean
val goodStatus = StatusCodes0.Good

This enables Scala developers to work around language limitations while maintaining the existing Java API unchanged.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • repo.eclipse.org
    • Triggering command: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.17-10/x64/bin/java /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.17-10/x64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.12/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.12/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.12 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.12/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/milo/milo org.codehaus.plexus.classworlds.launcher.Launcher -q spotless:apply (dns block)
    • Triggering command: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.17-10/x64/bin/java /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.17-10/x64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.12/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.12/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.12 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.12/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/milo/milo org.codehaus.plexus.classworlds.launcher.Launcher -q clean compile (dns block)
    • Triggering command: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.17-10/x64/bin/java /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.17-10/x64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.12/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.12/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.12 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.12/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/milo/milo org.codehaus.plexus.classworlds.launcher.Launcher -q spotless:check (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Make inherited NodeIds0 and StatusCodes0 public visibility</issue_title>
<issue_description>See #1685 (comment), where apparently these constants can't be accessed from Scala as-is, and the solution would be to import NodeIds0, NodeIds1, StatusCodes0, etc... directly, but the current package-private visibility prevents it.</issue_description>

<agent_instructions>All the inherited NodeIdsN classes and the StatusCodes0 class should be public visibility instead of package-private.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: kevinherron <340273+kevinherron@users.noreply.github.com>
Copilot AI changed the title [WIP] Make inherited NodeIds0 and StatusCodes0 public visibility Make NodeIds0-5 and StatusCodes0 classes public Jan 16, 2026
Copilot AI requested a review from kevinherron January 16, 2026 14:27
@kevinherron kevinherron marked this pull request as ready for review January 16, 2026 17:35
@kevinherron
Copy link
Contributor

Doesn't seem too bad, auto-complete menu just has the extras in it now:
image

@kevinherron kevinherron merged commit 18d137c into main Jan 19, 2026
6 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.

Make inherited NodeIds0 and StatusCodes0 public visibility

2 participants