Remove edition field

This commit is contained in:
Eelco Dolstra 2020-10-26 17:59:36 +01:00
parent 1e66d146a3
commit b875b8f45c

View file

@ -196,11 +196,6 @@ static Flake getFlake(
expectType(state, tAttrs, vInfo, Pos(foFile, state.symbols.create(flakeFile), 0, 0)); expectType(state, tAttrs, vInfo, Pos(foFile, state.symbols.create(flakeFile), 0, 0));
auto sEdition = state.symbols.create("edition"); // FIXME: remove soon
if (vInfo.attrs->get(sEdition))
warn("flake '%s' has deprecated attribute 'edition'", lockedRef);
if (auto description = vInfo.attrs->get(state.sDescription)) { if (auto description = vInfo.attrs->get(state.sDescription)) {
expectType(state, tString, *description->value, *description->pos); expectType(state, tString, *description->value, *description->pos);
flake.description = description->value->string.s; flake.description = description->value->string.s;
@ -229,8 +224,7 @@ static Flake getFlake(
throw Error("flake '%s' lacks attribute 'outputs'", lockedRef); throw Error("flake '%s' lacks attribute 'outputs'", lockedRef);
for (auto & attr : *vInfo.attrs) { for (auto & attr : *vInfo.attrs) {
if (attr.name != sEdition && if (attr.name != state.sDescription &&
attr.name != state.sDescription &&
attr.name != sInputs && attr.name != sInputs &&
attr.name != sOutputs) attr.name != sOutputs)
throw Error("flake '%s' has an unsupported attribute '%s', at %s", throw Error("flake '%s' has an unsupported attribute '%s', at %s",