19279, "bradcray", "Using types moved from 'SysBasic' to 'Sys' breaks when both modules are used", "2022-02-18T20:47:21Z"
In Move C Types into a new CTypes module by bradcray · Pull Request #19262 · chapel-lang/chapel · GitHub, @mppf pointed out that my move of types like socklen_t
from SysBasic
to Sys
breaks programs that use both since I relied on a proc ... type
to implement the warning that the type had moved. Specifically, a program like:
use Sys;
use SysBasic;
var x: socklen_t;
results in:
$CHPL_HOME/modules/standard/Sys.chpl:258: error: symbol socklen_t is multiply defined
$CHPL_HOME/modules/standard/SysBasic.chpl:78: note: also defined as a function here (and possibly elsewhere)
This is arguably less of an issue for types that moved from SysBasic
to CTypes
since existing programs would not use both modules since CTypes
had not existed before this point, and would hopefully move over to CTypes
and stop using SysBasic
(unless they relied on other elements of SysBasic
in which case they'd need to use an only
clause to get at them in order to not hit this same issue).