def METHOD_NAME(path, apply_updates):
    decode_exception_type = json.decoder.JSONDecodeError
    try:
        with open(path, "r") as json_file:
            json_data = json.load(json_file)
        jsonschema.validate(json_data, manifest_schema)
    except (jsonschema.exceptions.ValidationError, decode_exception_type) as e:
        raise ManifestValidationError("error parsing manifest JSON:", str(e)) from e
    specs = entries_to_specs(json_data["specs"])
    tty.debug("{0}: {1} specs read from manifest".format(path, str(len(specs))))
    compilers = list()
    if "compilers" in json_data:
        compilers.extend(compiler_from_entry(x) for x in json_data["compilers"])
    tty.debug("{0}: {1} compilers read from manifest".format(path, str(len(compilers))))
    # Filter out the compilers that already appear in the configuration
    compilers = spack.compilers.select_new_compilers(compilers)
    if apply_updates and compilers:
        spack.compilers.add_compilers_to_config(compilers, init_config=False)
    if apply_updates:
        for spec in specs.values():
            spack.store.STORE.db.add(spec, directory_layout=None)