Branch: refs/heads/main
Revision: b8b57fffa94affc175ee43d6fc2879af903d7623
Author: jabraham17
Link: Make walkDirs and findFiles throwing iterators, fix copyTree by jabraham17 · Pull Request #28692 · chapel-lang/chapel · GitHub
Log Message:
Make walkDirs and findFiles throwing iterators, fix copyTree (#28692)
This PR continues the work done in
Adjust `FileSystem.listDir` to have error handling by jabraham17 · Pull Request #28679 · chapel-lang/chapel · GitHub to make walkDirs and
findFIles into throwing iterators on error, propagating errors that
could occur from listDir. These changes are only reflected in the
preview edition, no change is made for the current 2.0 edition
I have removed
test/parallel/forall/vass/reciter/forall-reciter-alt.chpl, as it seems
to lock in buggy bevahior for findFiles that is not correct. That bug
is fixed as a byproduct of this PR, so the test is removed.
I have also rewritten walkDirs to not be recursive since recursive
iterators seem to be extremely fragile. While working on this PR I ran
into several asan failures from the recursive iterators. While trying to
create reproducers, I continually hit internal compiler errors. Rather
than fighting that battle, I just rewrote walkDirs to avoid recursion
Additionally, it fixes an error found where copyTree would not copy
hidden files. This fix is applied to the current 2.0 edition
- paratest
[Reviewed by @arifthpe]
Diff:
M doc/rst/technotes/editions.rst
M modules/packages/HDF5.chpl
M modules/standard/FileSystem.chpl
A test/edition/preview/FileSystemIters.chpl
A test/edition/preview/FileSystemIters.compopts
A test/edition/preview/FileSystemIters.good
R100 test/edition/preview/listDir.lastcompopts test/edition/preview/FileSystemIters.lastcompopts
A test/edition/preview/FileSystemIters.new.good
D test/edition/preview/listDir.chpl
D test/edition/preview/listDir.compopts
D test/edition/preview/listDir.good
D test/edition/preview/listDir.new.good
A test/library/standard/FileSystem/filerator/bradc/MyWalkDirs.chpl
A test/library/standard/FileSystem/filerator/bradc/MyWalkDirs.notest
M test/library/standard/FileSystem/filerator/bradc/globberator-zip.chpl
M test/library/standard/FileSystem/filerator/bradc/globberator-zip.good
M test/library/standard/FileSystem/filerator/bradc/globberator.good
A test/library/standard/FileSystem/filerator/bradc/mywalk-par.chpl
A test/library/standard/FileSystem/filerator/bradc/mywalk-par.good
A test/library/standard/FileSystem/filerator/bradc/mywalk-par.prediff
A test/library/standard/FileSystem/filerator/bradc/mywalk.chpl
A test/library/standard/FileSystem/filerator/bradc/mywalk.execopts
M test/library/standard/FileSystem/filerator/bradc/walk-par.good
A test/library/standard/FileSystem/lydia/copyTree/complexSrc/.myHiddenFile
A test/library/standard/FileSystem/lydia/copyTree/complexSrc/hasDirWithFileOnly/theFileIsMINE/.hiddenALLMINE.txt
A test/library/standard/FileSystem/lydia/copyTree/complexSrc/hasFile/.hiddenFile.txt
A test/library/standard/FileSystem/lydia/copyTree/complexSrc/myFile
D test/parallel/forall/vass/reciter/forall-reciter-alt.chpl
D test/parallel/forall/vass/reciter/forall-reciter-alt.good
D test/parallel/forall/vass/reciter/forall-reciter-alt.prediff
https://github.com/chapel-lang/chapel/pull/28692.diff