Branch: refs/heads/main
Revision: 889ce31
Author: lydia-duncan
Link: Replace region argument high bound behavior with more natural encapsulation by lydia-duncan · Pull Request #20784 · chapel-lang/chapel · GitHub
Log Message:
Merge pull request #20784 from lydia-duncan/regionArgFix
Replace region argument high bound behavior with more natural encapsulation
[reviewed by @jeremiah-corrado]
As discussed in #20672, we realized that it made more sense for the region
argument to represent the whole portion of the file being covered, rather
than having the high bound be excluded from the region. This PR adds a
flag per impacted function and a deprecation warning that triggers when
the flag is not set and an explicit high bound is used.
While here, update some documentation that had gotten out of date
(both w.r.t. the region argument and w.r.t. channels being split into
fileReader and fileWriter types)
Impacts:
- openreader
- file.reader
- file.writer
- file.lines
- channel.seek
Resolves #20672
Resolves Cray/chapel-private#3858
To avoid generating the deprecation warning within the URL package
module, adds an argument to file.readerHelper and file.writerHelper
indicating that the call came from that source, so that the new behavior
is just used as part of the implementation. Also adds an argument to
file.readerHelper in support of openreader so that a user can update
all their calls to openreader without needing to update any calls to
file.reader at the same time (due to openreader's dependence on
file.reader).
Adds a test of all the new warnings and updates test files to set the
appropriate flag and adjust their specified boundaries as appropriate.
Passed a full paratest with futures and checked the built docs
Modified Files:
A test/deprecated/IO/fileReaderHigh.chpl
A test/deprecated/IO/fileReaderHigh.good
A test/deprecated/IO/fileWriterHigh.catfiles
A test/deprecated/IO/fileWriterHigh.chpl
A test/deprecated/IO/fileWriterHigh.cleanfiles
A test/deprecated/IO/fileWriterHigh.good
A test/deprecated/IO/linesHigh.chpl
A test/deprecated/IO/linesHigh.good
A test/deprecated/IO/linesHigh.txt
A test/deprecated/IO/openreaderHigh.chpl
A test/deprecated/IO/openreaderHigh.good
A test/deprecated/IO/seek.txt
A test/deprecated/IO/seekHigh.chpl
A test/deprecated/IO/seekHigh.good
A test/io/diten/testCheckpoint.compopts
A test/library/standard/IO/fileReaderLimited.compopts
A test/library/standard/IO/fileWriterLimited.compopts
A test/library/standard/IO/filereaderBadRegion.compopts
A test/library/standard/IO/linesLimited.compopts
A test/library/standard/IO/openreaderBadRegion2.compopts
A test/library/standard/IO/openreaderLimited.compopts
A test/library/standard/IO/seek.txt
A test/library/standard/IO/seekLowerBound.compopts
A test/library/standard/IO/seekUpperBound.chpl
A test/library/standard/IO/seekUpperBound.compopts
A test/library/standard/IO/seekUpperBound.good
A test/release/examples/primers/fileIO.compopts
A test/studies/shootout/mandelbrot/ferguson/mandelbrot-opt2.compopts
A test/studies/ssca2/test-rmatalt/COMPOPTS
M modules/packages/URL.chpl
M modules/standard/IO.chpl
M test/deprecated/IO/.gitignore
M test/exercises/duplicates/COMPOPTS
M test/exercises/duplicates/forStudents/FileHashing.chpl
M test/io/diten/checkpoint.chpl
M test/library/standard/IO/fileReaderLimited.chpl
M test/library/standard/IO/fileWriterLimited.chpl
M test/library/standard/IO/linesLimited.chpl
M test/library/standard/IO/openreaderLimited.chpl
M test/release/examples/primers/fileIO.chpl
M test/studies/lammps/shemmy/m-lammps.chpl
M test/studies/lammps/shemmy/s-lammps.chpl
M test/studies/shootout/mandelbrot/ferguson/mandelbrot-opt2.chpl
M test/studies/ssca2/main/SSCA2_Modules/io_RMAT_graph.chpl
M test/studies/ssca2/main/SSCA2_main.compopts
M test/studies/ssca2/main/SSCA2_main.ml-compopts
M test/studies/ssca2/main/SSCA2_main.perfcompopts
M test/studies/ssca2/rachels/SSCA2_test.compopts
Compare: https://github.com/chapel-lang/chapel/compare/f6b2dd3a954b...889ce31fac78