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

Partial fix #2623: posixlib sys/socket sendto() & recvfrom() now succeed on Linux & Windows using IPv6 #2705

Merged

Conversation

LeeTibbert
Copy link
Contributor

@LeeTibbert LeeTibbert commented Jul 1, 2022

This PR introduces a binary change and is intended for the next Scala Native version which changes the major version number.

As per the title, the the two posixlib sys/socket sendto() & recvfrom() methods now succeed when using IPv6.
The new test suite Udp6SocketTest.scala exercises those methods using IPv6. Lessons learned from
Udp6SocketTest.scala were applied to the existing IPv4 UdpSocketTest.scala.

Issue #2626 remains. I hope to address it a PR after this one has merged.
Proof-of-concept code is working on macOS.

Running the tests on BSD based systems, macOS & FreeBSD, is disabled
until Issue #2226 is fixed.

This PR supersedes WIP PR #2632.

Rationale:

Posix specifies the name and type of elements of a structure. The order is not
specified so Scala Native can use any order it chooses. Common & civilized
practice is to follow the order in the posix spec. Linux, macOs, FreeBSD, and
Windows all follow this practice.

Scala Native now follows suite. This reduces cognitive load and WT? factor on
the severely limited number of developers using Scala Native with IPv6.

@LeeTibbert LeeTibbert added this to the 0.5.0 milestone Jul 1, 2022
@LeeTibbert LeeTibbert changed the title Partial fix #2623: posixlib sys/socket sendto() & recvfrom() now succeed on Linux & Windows using IPv6 WIP: Partial fix #2623: posixlib sys/socket sendto() & recvfrom() now succeed on Linux & Windows using IPv6 Jul 15, 2022
@LeeTibbert
Copy link
Contributor Author

Broken by recent 32 bit merge. Needs attention when I am rested.

…m() now succeed on Linux & Windows using IPv6
@LeeTibbert LeeTibbert force-pushed the PR_posix_SysSocket_IPv6_I2623_V2 branch from d492991 to f203500 Compare July 15, 2022 15:54
@LeeTibbert LeeTibbert force-pushed the PR_posix_SysSocket_IPv6_I2623_V2 branch from abe6720 to 8953bcb Compare July 16, 2022 01:54
@LeeTibbert LeeTibbert changed the title WIP: Partial fix #2623: posixlib sys/socket sendto() & recvfrom() now succeed on Linux & Windows using IPv6 Partial fix #2623: posixlib sys/socket sendto() & recvfrom() now succeed on Linux & Windows using IPv6 Jul 16, 2022
@LeeTibbert
Copy link
Contributor Author

This PR is now ready for review. It has been modified to respond to
recent 32-bit changes. All good now.

The new Udp6SocketTest is not run on either linux-arm or linux-x64.
IPv6 is reported as present on those systems, but any attempt to
use it, even locally, causes failure. The configuration is too deeply
hidden in Docker & qemu layers for me to access or to explain
to an administrator who could. The Art of the Possible.

@WojciechMazur WojciechMazur merged commit b8e4dcc into scala-native:main Jul 16, 2022
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.

None yet

2 participants