[Chapel Merge] Add checking of TOML during `mason add`

Branch: refs/heads/main
Revision: 9e5cd4b
Author: bmcdonald3
Link: Add checking of TOML during `mason add` by bmcdonald3 · Pull Request #20367 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #20367 from bmcdonald3/mason-registry

Add checking of TOML during mason add

[ reviewed by @arezaii ]

Previously, the mason add command would add anything that was
passed to it, regardless of whether or not the package existed.

This PR modifies mason add to check the TOML file of the
package that was mason added prior to adding it to the manifest
file and also adds a check to ensure that the type of the project
that is being added was a mason library.

As of Add 3 distinct mason modes and `mason modules` command by bmcdonald3 · Pull Request #20297 · chapel-lang/chapel · GitHub, the manifest
file has a new type field, and projects with type="library" are
the only type that can be added as a dependency of a project.

Modified Files:
A test/mason/addBadDep.toml

A test/mason/masonAddBadDep.chpl
A test/mason/masonAddBadDep.good
M test/mason/.gitignore
M test/mason/CLEANFILES
M test/mason/mason-modify/masonModifyTest.execopts
M tools/mason/MasonModify.chpl
M tools/mason/MasonSearch.chpl
M tools/mason/MasonUpdate.chpl
M tools/mason/MasonUtils.chpl

Compare: https://github.com/chapel-lang/chapel/compare/a3237af2e178...9e5cd4b76721