Commit 6bbd293
committed
fix: keep a global's canonical token visible across case-mode changes
IsGlobalOptionAliasHidden checked membership in HiddenAliases using
the currently active comparer, with no distinction between the
canonical token and an alias. A global registered under case-sensitive
parsing with canonical --tenant and a case-distinct hidden alias
--TENANT (a legal registration at that point) had its canonical token
incorrectly classified as hidden the moment parsing switched to
case-insensitive, because "--tenant" then compares equal to the
already-hidden "--TENANT" under the new comparer.
GlobalOptionBuilder.HiddenAlias's own contract promises the canonical
token stays visible; only Hidden() on the whole definition may retract
it. The canonical-identity check must use Ordinal specifically: using
the effective (now case-insensitive) comparer for it would also exempt
the "--TENANT" alias string itself from its own HiddenAliases
membership, undoing the fix for the entry the caller actually asked to
hide.1 parent 910cef0 commit 6bbd293
2 files changed
Lines changed: 33 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
260 | 271 | | |
261 | | - | |
| 272 | + | |
| 273 | + | |
262 | 274 | | |
263 | 275 | | |
264 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
282 | 302 | | |
283 | 303 | | |
284 | 304 | | |
| |||
0 commit comments