Simplify package by using LoadHook instead of mutators

This was not previously possible due to LoadHooks being run after the
module was registered.

Bug: 155462403
Test: m nothing
Change-Id: Ia8383b9d1272bb12c8a83948753a0e4b0d98a650
This commit is contained in:
Paul Duffin
2020-05-01 11:57:12 +01:00
parent bd1f870df3
commit cdfcec98bb
3 changed files with 12 additions and 149 deletions

View File

@@ -20,7 +20,7 @@ var packageTests = []struct {
}`),
},
expectedErrors: []string{
`top/Blueprints:3:10: mutated field name cannot be set in a Blueprint file`,
`top/Blueprints:3:10: unrecognized property "name"`,
`top/Blueprints:4:16: unrecognized property "visibility"`,
},
},
@@ -50,7 +50,7 @@ var packageTests = []struct {
}`),
},
expectedErrors: []string{
`module "//top": package {...} specified multiple times`,
`module "//top" already defined`,
},
},
}