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

Make the Sort module an official standard module #25586

Merged
merged 10 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/rst/meta/modules/packages/Sort.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. TODO: remove this stub file after Chapel 2.3

Sort
====

The Sort module documentation has been moved to the :ref:`standard library documentation <std-sort>`.
7 changes: 7 additions & 0 deletions doc/rst/meta/modules/standard.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ default:
A subset of the Math symbols <standard/Math>


Algorithms
----------
.. toctree::
:maxdepth: 1

Sort <standard/Sort>

Data Structures
---------------

Expand Down
2 changes: 1 addition & 1 deletion modules/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ MODULES_TO_DOCUMENT = \
standard/Reflection.chpl \
standard/Regex.chpl \
standard/Set.chpl \
standard/Sort.chpl \
standard/Subprocess.chpl \
standard/Time.chpl \
standard/Types.chpl \
Expand Down Expand Up @@ -146,7 +147,6 @@ PACKAGES_TO_DOCUMENT = \
packages/ReplicatedVar.chpl \
packages/Search.chpl \
packages/Socket.chpl \
packages/Sort.chpl \
packages/SortedMap.chpl \
packages/SortedSet.chpl \
packages/TOML.chpl \
Expand Down
10 changes: 10 additions & 0 deletions modules/internal/fixInternalDocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,13 @@ file=CTypes.rst
replace "class:: c_ptr" "type:: c_ptr" $file # also gets c_ptrConst
replace "record:: c_array" "type:: c_array" $file
## End of CTypes ##


# TODO Remove this after Chapel 2.3 when doc/rst/meta/modules/packages/Sort.rst is removed
## Sort ##
file=Sort.rst
echo ".. _std-sort:" >> $file.tmp
echo "" >> $file.tmp
cat $file >> $file.tmp
mv $file.tmp $file
## End of Sort ##
1 change: 1 addition & 0 deletions modules/packages/Sort.chpl → modules/standard/Sort.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ comparator to the initializer of the module-defined
writeln(Array);

*/
@unstable("The Sort module interface is unstable")
module Sort {

private use List;
Expand Down
2 changes: 1 addition & 1 deletion test/modules/bradc/printModStuff/foo.good
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Parsing module files:
$CHPL_HOME/modules/standard/IO.chpl
$CHPL_HOME/modules/standard/MemMove.chpl
$CHPL_HOME/modules/standard/List.chpl
$CHPL_HOME/modules/packages/Sort.chpl
$CHPL_HOME/modules/standard/Sort.chpl
$CHPL_HOME/modules/packages/RangeChunk.chpl
$CHPL_HOME/modules/packages/Search.chpl
$CHPL_HOME/modules/packages/CopyAggregation.chpl
Expand Down
4 changes: 2 additions & 2 deletions test/types/tuple/errors/indexHetTuple.good
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$CHPL_HOME/modules/internal/ChapelTuple.chpl:nnnn: In method 'this':
$CHPL_HOME/modules/internal/ChapelTuple.chpl:nnnn: error: invalid access of non-homogeneous tuple by runtime value
$CHPL_HOME/modules/packages/Sort.chpl:nnnn: called as ((real(64),int(64))).this(i: int(64)) from function 'msbRadixSortParamLastStartBit'
$CHPL_HOME/modules/packages/Sort.chpl:nnnn: called as msbRadixSortParamLastStartBit(Data: [domain(1,int(64),one)] (real(64),int(64)), comparator: ContrivedComparator) from function 'twoArrayRadixSort'
$CHPL_HOME/modules/standard/Sort.chpl:nnnn: called as ((real(64),int(64))).this(i: int(64)) from function 'msbRadixSortParamLastStartBit'
$CHPL_HOME/modules/standard/Sort.chpl:nnnn: called as msbRadixSortParamLastStartBit(Data: [domain(1,int(64),one)] (real(64),int(64)), comparator: ContrivedComparator) from function 'twoArrayRadixSort'
indexHetTuple.chpl:35: called as twoArrayRadixSort(Data: [domain(1,int(64),one)] (real(64),int(64)), comparator: ContrivedComparator)
1 change: 0 additions & 1 deletion test/unstable/packageModules.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import RecordParser;
import ReplicatedVar;
import Search;
import Socket;
import Sort;
import SortedMap;
import SortedSet;
import TOML;
Expand Down
1 change: 0 additions & 1 deletion test/unstable/packageModules.good
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ packageModules.chpl:XX: warning: RecordParser is unstable
packageModules.chpl:XX: warning: ReplicatedVar is unstable
packageModules.chpl:XX: warning: Search is unstable
packageModules.chpl:XX: warning: Socket is unstable
packageModules.chpl:XX: warning: Sort is unstable
packageModules.chpl:XX: warning: SortedMap is unstable
packageModules.chpl:XX: warning: SortedSet is unstable
packageModules.chpl:XX: warning: TOML is unstable
Expand Down
1 change: 1 addition & 0 deletions test/unstable/sortModule.chpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use Sort;
1 change: 1 addition & 0 deletions test/unstable/sortModule.good
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sortModule.chpl:1: warning: The Sort module interface is unstable