[Chapel Merge] dyno: update error messages for missing/bad submod

Branch: refs/heads/main
Revision: 227763f
Author: arezaii
Link: dyno: update error messages for missing/bad submodule names by arezaii · Pull Request #19718 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #19718 from arezaii/dyno-import-include-fixes

dyno: update error messages for missing/bad submodule names

This PR addresses some error messages when an invalid include
statement is encountered. We will now print the line number
and filename when trying to parse an include module from a file whose name
name doesn't match its filename.
The error message printing was also updated to account for empty
filenames and line number equal to -1, such that we won't attempt
to print these values.


  • [x] paratest
  • [x] partest with --dyno (31 vs 33 failures on main)

reviewed by @dlongnecke-cray - thanks!

Signed-off-by: arezaii ahmad.rezaii@hpe.com

Modified Files:
M compiler/include/astlocs.h

M compiler/parser/parser.cpp
M compiler/passes/convert-uast.cpp
M compiler/util/misc.cpp
M test/visibility/submodule-in-file/errors/WrongModule1.good
M test/visibility/submodule-in-file/errors/WrongModule2Wrong.good

Compare: https://github.com/chapel-lang/chapel/compare/eb5474696ef4...227763f22c01