[Chapel Merge] Deprecate (some) duplicate symbols defined in OS.P

Branch: refs/heads/main
Revision: 6dfe30f
Author: bradcray
Link: Unavailable
Log Message:

Merge pull request #19831 from bradcray/sysbasic-dep-posix-syms

Deprecate (some) duplicate symbols defined in OS.POSIX

[reviewed by @mppf]

This deprecates some symbols defined in SysBasic (primarily)
and Sys (to an extent) that are now also defined by OS.POSIX
which we're more committed to, going forward. Specifically, it:

  • deprecates the POSIX E* error codes from SysBasic,
    pointing to their OS.POSIX definitions instead (Linux and
    other non-POSIX cases are left as-is for now)
  • moves the existing documentation for these symbols from
    SysBasic to OS.POSIX.
  • deprecates Sys.O_*, pointing to OS.POSIX instead
  • deprecates fd_set(), sys_fd_clr(), sys_fd_isset(),
    sys_fd_set(), sys_fd_zero() pointing to their OS.POSIX
    equivalents
  • has IO.chpl no longer public use SysBasic; on the
    argument that our user-facing interfaces shouldn't require
    the user to access these symbols (and maybe even if they
    do, they should have to use OS.POSIX or SysBasic to
    get access to them rather than having them automatically
    be there. This could be considered a breaking change, but
    we're hoping it wouldn't be for anything that uses the
    main user-facing interfaces.

It also adds test/deprecated tests to help us remember
to remove the deprecation warnings later.

The following files no longer seemed to need SysBasic:

  • modules/internal/ChapelRange.chpl
  • modules/internal/DefaultAssociative.chpl
  • modules/internal/DefaultRectangular.chpl
  • modules/packages/LinkedLists.chpl
  • modules/standard/Regex.chpl

The following modules and tests required new import statements
to get at SysBasic symbols that they had automatic access to
previously, where syserr was the most commonly needed symbol,
followed by ENOERR and EEOF. Some of them also added new
use/import of OS.POSIX to get at the POSIX symbols:

  • modules/internal/BytesStringCommon.chpl
  • modules/internal/String.chpl
  • modules/packages/Buffers.chpl: only needs syserr and ENOERR
  • modules/packages/Curl.chpl
  • modules/packages/HDFS.chpl
  • modules/packages/Socket.chpl
  • modules/packages/ZMQ.chpl
  • modules/standard/ChapelIO.chpl (also removed some seemingly dead variables)
  • modules/standard/FileSystem.chpl
  • modules/standard/Path.chpl
  • modules/standard/Subprocess.chpl
  • modules/standard/Sys.chpl
  • modules/standard/SysError.chpl
  • test/extern/ferguson/extern-default-init.chpl
  • test/io/ferguson/inteof.chpl
  • test/io/ferguson/remote-error/error.chpl
  • test/io/ferguson/remote-error/error2.chpl
  • test/io/sungeun/ioerror.chpl
  • test/studies/lulesh/bradc/tests/lulesh-eof.chpl
  • test/studies/ssca2/graphio/SSCA2_RMAT_graph_generator.chpl
  • test/studies/ssca2/main/SSCA2_Modules/io_RMAT_graph.chpl

Changed from using sys_fd_zero to FD_ZERO to avoid deprecation
warnings:

  • modules/packages/Curl.chpl

Updated tests sensitive to modules used:

  • test/compflags/ferguson/print-module-resolution.good: We now get
    to OS.POSIX along a different route
  • test/modules/sungeun/init/printModuleInitOrder.good: OS.POSIX are
    now initialized before we are able to print initialized modules, so they
    got removed from the output...

Also updated some other tests w.r.t. eliminating dead variables which
didn't seem to be used or needed.

Modified Files:
A test/deprecated/posixErrors.chpl

A test/deprecated/posixErrors.good
A test/deprecated/sys-fd.chpl
A test/deprecated/sys-fd.good
A test/deprecated/sys-o_.chpl
A test/deprecated/sys-o_.good
M modules/internal/BytesStringCommon.chpl
M modules/internal/ChapelRange.chpl
M modules/internal/DefaultAssociative.chpl
M modules/internal/DefaultRectangular.chpl
M modules/internal/String.chpl
M modules/packages/Buffers.chpl
M modules/packages/Curl.chpl
M modules/packages/HDFS.chpl
M modules/packages/LinkedLists.chpl
M modules/packages/Socket.chpl
M modules/packages/ZMQ.chpl
M modules/standard/ChapelIO.chpl
M modules/standard/FileSystem.chpl
M modules/standard/IO.chpl
M modules/standard/OS.chpl
M modules/standard/Path.chpl
M modules/standard/Regex.chpl
M modules/standard/Subprocess.chpl
M modules/standard/Sys.chpl
M modules/standard/SysBasic.chpl
M modules/standard/SysError.chpl
M test/compflags/ferguson/print-module-resolution.good
M test/extern/ferguson/extern-default-init.chpl
M test/io/ferguson/inteof.chpl
M test/io/ferguson/remote-error/error.chpl
M test/io/ferguson/remote-error/error2.chpl
M test/io/sungeun/ioerror.chpl
M test/library/standard/IO/advance.chpl
M test/modules/sungeun/init/printModuleInitOrder.good
M test/modules/sungeun/init/printModuleInitOrder.na-none.good
M test/release/examples/benchmarks/miniMD/helpers/initMD.chpl
M test/release/examples/primers/fileIO.chpl
M test/studies/lulesh/bradc/tests/lulesh-eof.chpl
M test/studies/ssca2/graphio/SSCA2_RMAT_graph_generator.chpl
M test/studies/ssca2/main/SSCA2_Modules/io_RMAT_graph.chpl

Compare: https://github.com/chapel-lang/chapel/compare/8a69dea50eb9...6dfe30fbe39c