Commit c58458f
authored
fix: Drop unknown-section/key/requirement guards from
Fixes #512.
`mops publish` rejected `[moc]`, `[canisters]`, `[build]`, and `[lint]`
sections in `mops.toml` even though all four are documented and used by
other mops commands.
The check was one of three publish-only typo guards (top-level sections,
`[package].*` keys, `[requirements].*` keys) — all dropped, because:
- They drifted from the docs/types every time a new section shipped
(#512 was the result).
- No other command complains about unknown keys, so typos silently work
everywhere except publish.
- The `[requirements]` guard was already broken — `return` inside
`forEach` only printed a red message and continued.
Backend `validateConfig.mo` still enforces the real schema (unknown
requirements, length caps, "not supported yet" fields, dependency
rules), so no real protection is lost. All other publish validations are
untouched.
## Test plan
- [ ] `mops publish` succeeds with `[moc]`, `[canisters]`, `[build]`,
`[lint]` sections
- [ ] Backend still rejects unknown `[requirements]` entries
- [ ] Other publish validations (local/GitHub deps, disabled `package.*`
fields) still firemops publish (#513)1 parent caa48ce commit c58458f
2 files changed
Lines changed: 1 addition & 48 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 50 | | |
67 | 51 | | |
68 | 52 | | |
| |||
97 | 81 | | |
98 | 82 | | |
99 | 83 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | 84 | | |
124 | 85 | | |
125 | 86 | | |
| |||
222 | 183 | | |
223 | 184 | | |
224 | 185 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | 186 | | |
235 | 187 | | |
236 | 188 | | |
| |||
0 commit comments