chapel-lang / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
1.77k stars 416 forks source link

Improve mason error checking for mason registries #13345

Open ben-albrecht opened 5 years ago

ben-albrecht commented 5 years ago

Add more careful checks to mason when accessing a registry, and provide a helpful error message if a file or directory is not found.

The motivating use-case is when a user is modifying a local registry by hand, and makes a mistake.

One known example of error checking being insufficient is if a user forgets to put the bricks (packages) within the Bricks/ directory. In this case, mason emits a generic error message, with no indication about what file is causing an issue:

error in listdir(): No such file or directory
ben-albrecht commented 5 years ago

Relatedly, https://github.com/chapel-lang/chapel/pull/12846 aims to improve listdir() error messages in general, but I never got around to finishing that up.

ankushbhardwxj commented 4 years ago

@ben-albrecht Which command should be modified to add the error message ?

ben-albrecht commented 4 years ago

I believe this error occurs during a mason update when the registry is missing certain expected files / directories, such as a Bricks directory. I can try to come up with a more precise reproducer if you are unable to reproduce the error.