Commit a78cba8
committed
fix(new): resolve namespaced packages in --template fetch
`mcpp new --template llmapi` failed with `fetch 'llmapi@0.2.6' failed`:
the index lookup finds pkgs/l/llmapi.lua by bare filename, but the
namespace stayed "" while the descriptor declares namespace="mcpplibs"
(legacy name="mcpplibs.llmapi") — and xlings resolves install targets
by the descriptor's qualified name.
fetch_template_package now derives the structured (namespace, shortName)
from the descriptor fields via the new pm::compat::descriptor_coordinates
helper instead of trusting the filename hit. Root-index packages (imgui)
keep namespace "" and still install by bare name; legacy embedded/dotted
names and canonical namespace fields all normalize to the same
coordinates. Covered by unit tests in test_pm_compat.1 parent 84dd1b5 commit a78cba8
3 files changed
Lines changed: 113 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1068 | 1068 | | |
1069 | 1069 | | |
1070 | 1070 | | |
1071 | | - | |
1072 | 1071 | | |
1073 | 1072 | | |
1074 | 1073 | | |
1075 | | - | |
1076 | 1074 | | |
1077 | 1075 | | |
1078 | 1076 | | |
| |||
1083 | 1081 | | |
1084 | 1082 | | |
1085 | 1083 | | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
1086 | 1096 | | |
1087 | 1097 | | |
1088 | | - | |
| 1098 | + | |
1089 | 1099 | | |
1090 | 1100 | | |
1091 | 1101 | | |
1092 | 1102 | | |
1093 | | - | |
| 1103 | + | |
1094 | 1104 | | |
1095 | | - | |
| 1105 | + | |
1096 | 1106 | | |
1097 | 1107 | | |
1098 | 1108 | | |
| |||
1101 | 1111 | | |
1102 | 1112 | | |
1103 | 1113 | | |
1104 | | - | |
| 1114 | + | |
1105 | 1115 | | |
1106 | 1116 | | |
1107 | 1117 | | |
| |||
1123 | 1133 | | |
1124 | 1134 | | |
1125 | 1135 | | |
1126 | | - | |
| 1136 | + | |
1127 | 1137 | | |
1128 | 1138 | | |
1129 | 1139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
76 | 117 | | |
77 | 118 | | |
78 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
0 commit comments