Link: Split the Math module into two parts, one of which is included by default by lydia-duncan · Pull Request #19849 · chapel-lang/chapel · GitHub
Merge pull request #19849 from lydia-duncan/mathSplit
Split the Math module into two parts, one of which is included by default
[reviewed by @bmcdonald3]
This change splits the Math module into two modules: AutoMath and Math.
The former will continue to be used by default and still contains most of the
symbols in the module. The latter will now require a use statement or import
statement in order to access the symbols within it, and at this time only
logBasePow2 (AutoMath will contain a version of
them that is deprecated and calls these versions under the covers, so that
users relying on them being included by default will get a warning message
instead of just a resolution failure). There were some other symbols that
probably can also be moved, but I never got an explicit acknowledgment so
I will handle them in a separate PR in order to get explicit approval while not
holding up the other symbols.
Note that this does not add deprecation warnings in the Math module,
though qualified access of symbols that previously were in it will now fail.
This is in part due to #19813, but once that is fixed, and the final sorting of
all the Math symbols is determined, we should do so.
Relates to #18990 but does not fully address it yet.
Updates BigInteger's references to symbols that now live in AutoMath to
explicitly name it.
Updates several tests that were relying on:
- Math being the location on symbols they are accessing via explicit naming
(that now live in AutoMath): these tests now use AutoMath as the module
- Math being included by default: these tests now have an explicit use of
the Math module in order to access the symbols that are in it.
Also updates the script used to generate the tests that live in
test/library/standard/Math/promotion so that it can handle tests that require
an explicit use and ones that don't. Commits the updated version of the
log1p test as generated by this updated script.
Adds two tests of the deprecation warning when trying to access the
moved functions without a use or import of the Math module.
Passed a full paratest with futures. Double checked the built docs.
Modified Files: A modules/standard/AutoMath.chpl