[Chapel Merge] Update compiler/next handling of Location

Branch: refs/heads/main
Revision: 17c4953
Author: aconsroe-hpe
Link: Unavailable
Log Message:

Merge pull request #18799 from aconsroe-hpe/next-fix-incremental-locations-pretty

Update compiler/next handling of Location

reviewed by mppf

  1. Add ID to ErrorMessage

ErrorMessage previously only stored a Location. We'd like to store an
ID so that if a query result is re-used after an AST has moved in a
file (but not changed), the ErrorMessage stored wants a way to get
updated with the current information.

The idea here is to use an explicit update function, passing in the
Context as that is necessary for getting the current location.