Removed bloom.json fallback

This commit is contained in:
Nav
2023-05-24 19:36:58 +01:00
parent ba03833325
commit dde17b0666
2 changed files with 4 additions and 24 deletions

View File

@@ -250,22 +250,10 @@ namespace Bloom
auto configFile = QFile(QString::fromStdString(Services::PathService::projectConfigPath())); auto configFile = QFile(QString::fromStdString(Services::PathService::projectConfigPath()));
if (!configFile.exists()) { if (!configFile.exists()) {
// Try looking for the old bloom.json config file throw Exception(
configFile.setFileName(QString::fromStdString(Services::PathService::projectDirPath()) + "/bloom.json"); "Bloom configuration file (bloom.yaml) not found. Working directory: "
+ Services::PathService::projectDirPath()
if (configFile.exists()) { );
Logger::warning(
"The recommended project configuration file format changed from JSON to YAML in Bloom v0.11.0."
" Bloom could not find a bloom.yaml configuration file, but did find bloom.json. Please convert"
" bloom.json to YAML format and rename to \"bloom.yaml\". There are numerous online JSON -> YAML"
" converters. For now, bloom.json will be used in the absence of bloom.yaml."
);
} else {
throw InvalidConfig(
"Bloom configuration file (bloom.yaml) not found. Working directory: " + Services::PathService::projectDirPath()
);
}
} }
if (!configFile.open(QIODevice::ReadOnly | QIODevice::Text)) { if (!configFile.open(QIODevice::ReadOnly | QIODevice::Text)) {

View File

@@ -31,14 +31,6 @@ namespace Bloom
* For more on project configuration, see Bloom documentation at https://bloom.oscillate.io/docs/configuration * For more on project configuration, see Bloom documentation at https://bloom.oscillate.io/docs/configuration
*/ */
/*
* Initially, we used the JSON format for project configuration files, but this was changed in version 0.11.0.
* See https://github.com/navnavnav/Bloom/issues/50 for more.
*
* Because JSON is a subset of YAML, we can (and do) fallback to bloom.json in the absence of bloom.yaml.
* See Application::loadProjectConfiguration() for more.
*/
/** /**
* Configuration relating to a specific target. * Configuration relating to a specific target.
* *