diff --git a/mkn.yaml b/mkn.yaml index 1ccd773..288a63a 100644 --- a/mkn.yaml +++ b/mkn.yaml @@ -3,7 +3,7 @@ name: mkn version: master property: - DATE: 15-SEP-2024 + DATE: 29-SEP-2024 parent: bin mode: none diff --git a/src/maiken/setup.cpp b/src/maiken/setup.cpp index ab7267c..be304ce 100644 --- a/src/maiken/setup.cpp +++ b/src/maiken/setup.cpp @@ -28,9 +28,9 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "maiken/github.hpp" -#include "maiken/regex.hpp" #include "maiken/scm.hpp" +#include "maiken/regex.hpp" +#include "maiken/github.hpp" namespace maiken { void sub_initializer(Application const& app, std::vector const& nodes) { @@ -40,13 +40,15 @@ void sub_initializer(Application const& app, std::vector const& node auto const process = [&](auto n) { if (n[STR_SUB] && n[STR_SUB].IsScalar()) { - for (auto const& line : - mkn::kul::cli::asArgs(Properties::RESOLVE(app, n[STR_SUB].Scalar()))) { - auto pInfo = ProjectInfo::PARSE_LINE(line); - mkn::kul::Dir local{pInfo.local}; - if (!local) - SCMGetter::GET(local, pInfo.scm) - ->co(local.path(), SCMGetter::REPO(local, pInfo.scm), pInfo.version); + auto const lines = mkn::kul::String::LINES(n[STR_SUB].Scalar()); + for (auto const& input_line : lines) { + for (auto const& line : mkn::kul::cli::asArgs(Properties::RESOLVE(app, input_line))) { + auto pInfo = ProjectInfo::PARSE_LINE(line); + mkn::kul::Dir local{pInfo.local}; + if (!local) + SCMGetter::GET(local, pInfo.scm) + ->co(local.path(), SCMGetter::REPO(local, pInfo.scm), pInfo.version); + } } } }; diff --git a/src/settings.cpp b/src/settings.cpp index 244a800..b6b0259 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -149,33 +149,32 @@ mkn::kul::yaml::Validator maiken::Settings::validator() const { for (auto const& s : Compilers::INSTANCE().keys()) masks.push_back(NodeValidator(s, {}, 0, NodeType::STRING)); - return Validator({ - NodeValidator("super"), NodeValidator("property", {NodeValidator("*")}, 0, NodeType::MAP), - NodeValidator("inc"), NodeValidator("path"), - NodeValidator("local", - {NodeValidator("repo"), NodeValidator("mod-repo"), NodeValidator("debugger")}, - 0, NodeType::MAP), - NodeValidator("remote", {NodeValidator("repo"), NodeValidator("mod-repo")}, 0, - NodeType::MAP), - NodeValidator("env", - {NodeValidator("name", 1), NodeValidator("value", 1), NodeValidator("mode")}, - 0, NodeType::NON), - NodeValidator("file", - {NodeValidator("type", 1), NodeValidator("compiler", 1), - NodeValidator("linker"), NodeValidator("archiver")}, - 1, NodeType::LIST), + return Validator( + {NodeValidator("super"), NodeValidator("property", {NodeValidator("*")}, 0, NodeType::MAP), + NodeValidator("inc"), NodeValidator("path"), + NodeValidator("local", + {NodeValidator("repo"), NodeValidator("mod-repo"), NodeValidator("debugger")}, + 0, NodeType::MAP), + NodeValidator("remote", {NodeValidator("repo"), NodeValidator("mod-repo")}, 0, + NodeType::MAP), + NodeValidator("env", + {NodeValidator("name", 1), NodeValidator("value", 1), NodeValidator("mode")}, + 0, NodeType::NON), + NodeValidator("file", + {NodeValidator("type", 1), NodeValidator("compiler", 1), + NodeValidator("linker"), NodeValidator("archiver")}, + 1, NodeType::LIST), #if defined(_MKN_WITH_MKN_RAM_) && defined(_MKN_WITH_IO_CEREAL_) - NodeValidator("dist", - {NodeValidator("port"), - NodeValidator("nodes", - {NodeValidator("host", 1), NodeValidator("port", 1), - NodeValidator("user"), NodeValidator("pass")}, - 0, NodeType::LIST)}, - 0, NodeType::MAP), + NodeValidator("dist", + {NodeValidator("port"), + NodeValidator("nodes", + {NodeValidator("host", 1), NodeValidator("port", 1), + NodeValidator("user"), NodeValidator("pass")}, + 0, NodeType::LIST)}, + 0, NodeType::MAP), #endif // _MKN_WITH_MKN_RAM_ && _MKN_WITH_IO_CEREAL_ - NodeValidator("compiler", {NodeValidator("mask", masks, 0, NodeType::MAP)}, 0, - NodeType::MAP) - }); + NodeValidator("compiler", {NodeValidator("mask", masks, 0, NodeType::MAP)}, 0, + NodeType::MAP)}); } void maiken::Settings::write(mkn::kul::File const& file) KTHROW(mkn::kul::Exit) { @@ -310,13 +309,11 @@ void maiken::Settings::POST_CONSTRUCT() { for (auto const& line : lines) { auto copy = decltype(root[STR_ENV]){line}; auto ev = maiken::Settings::PARSE_ENV_NODE(copy, settings); - appVars.envVar(ev.name(), ev.toString()); mkn::kul::env::SET(ev.name(), ev.toString().c_str()); } } else { for (auto const& c : root[STR_ENV]) { auto ev = maiken::Settings::PARSE_ENV_NODE(c, settings); - appVars.envVar(ev.name(), ev.toString()); mkn::kul::env::SET(ev.name(), ev.toString().c_str()); } }