Commit 09e7629
authored
Fix for incorrect error diagnostic on MSGraph existing resource usage (#18160)
Quick fix for #18158
I think the root cause of the issue is that
[ResourceTypeComponents](https://github.com/Azure/bicep/blob/2b1a61d6d6dbba88fb6f9dd798be7d2af5cfd90a/src/Bicep.Core/TypeSystem/Types/ResourceType.cs#L11)
has a property named "ValidParentScopes", which is intended to capture
both writable and readable scopes, but the type loading code was updated
to be more precise about differentiating readable + writable scopes, and
misinterpreted this field to just mean "writable scopes" (see
[here](https://github.com/Azure/bicep/blob/2b1a61d6d6dbba88fb6f9dd798be7d2af5cfd90a/src/Bicep.Core/TypeSystem/Providers/Extensibility/ExtensionResourceTypeFactory.cs#L42))1 parent 2b1a61d commit 09e7629
File tree
4 files changed
+32
-7
lines changed- src
- Bicep.Core.IntegrationTests
- Files/ExtensionTypes
- Bicep.Core.UnitTests/Baselines
- Bicep.Core/TypeSystem/Providers/Extensibility
4 files changed
+32
-7
lines changedLines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
946 | 946 | | |
947 | 947 | | |
948 | 948 | | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
949 | 973 | | |
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 14 | + | |
| 15 | + | |
20 | 16 | | |
21 | 17 | | |
22 | 18 | | |
| 19 | + | |
| 20 | + | |
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
0 commit comments