Commit 982a3fe
authored
feat(make): support local formula path and improve test coverage (#104)
* feat(make): support local file patterns for llar make
Add support for local filesystem patterns (., ./path, ./path@ver) in
`llar make`, enabling CI workflows within the llarhub repository to build
local formulas while resolving dependencies from the remote store.
Key changes:
- Extract Store interface from concrete struct in repo package
- Add overlayStore to serve local modules with remote fallback
- Add modlocal package for local module discovery via versions.json
- Update parseModuleArg to detect and validate local patterns
- Split runMake into local/remote branches with overlay composition
* docs: add local formula build examples to README
Add documentation examples demonstrating how to build local formulas using `llar make` command with local paths. This clarifies the usage of the tool for building formulas from local directories.
* fix(overlay): implement LockModule with local lock file for local modules
* docs: clarify unsupported parent directory module patterns
Add documentation note explaining that `..` and `../path` patterns are not supported for local module imports. Users should use `.` instead, which automatically walks up from the current directory to find the nearest `versions.json` file, eliminating the need for manual parent directory navigation.
* test(make): add local libpng e2e fixtures and test
* test(make): switch local-remote e2e to cjson with remote zlib
* test(make): switch mixed-source e2e to local demo repo + remote zlib
* test(make): log captured llar output in mixed-source e2e
* test(make): clarify in-process stdout capture rationale
* test(make): expand parseModuleArg path edge cases
* fix(make): disable local ./... pattern for now
* fix(repo): unify overlay locking by module path
* fix(make): enforce local pattern validity rules
* refactor(modlocal): move pattern validation into Resolve
* test(modlocal): expand local pattern edge-case coverage
* modules: validate remote module paths in load pipeline
* feat(make): align local patterns with Go-style paths1 parent 0b1b75a commit 982a3fe
20 files changed
Lines changed: 1573 additions & 72 deletions
File tree
- cmd/llar/internal
- testdata
- formulas
- MeteorsLiu/llarzdepdemo
- 1.0.0
- test/liba
- 1.0.0
- sources/test/liba
- doc
- internal
- build
- formula/repo
- modules
- modlocal
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
25 | 40 | | |
26 | 41 | | |
27 | 42 | | |
| |||
37 | 52 | | |
38 | 53 | | |
39 | 54 | | |
40 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
41 | 59 | | |
42 | 60 | | |
43 | 61 | | |
44 | | - | |
45 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
46 | 81 | | |
47 | | - | |
| 82 | + | |
48 | 83 | | |
49 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
50 | 96 | | |
51 | 97 | | |
52 | 98 | | |
53 | | - | |
54 | 99 | | |
55 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
56 | 121 | | |
57 | 122 | | |
58 | 123 | | |
59 | 124 | | |
60 | 125 | | |
61 | 126 | | |
62 | 127 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | 128 | | |
73 | 129 | | |
74 | 130 | | |
| |||
77 | 133 | | |
78 | 134 | | |
79 | 135 | | |
80 | | - | |
81 | 136 | | |
82 | 137 | | |
83 | 138 | | |
| |||
93 | 148 | | |
94 | 149 | | |
95 | 150 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | 151 | | |
106 | 152 | | |
107 | 153 | | |
| |||
131 | 177 | | |
132 | 178 | | |
133 | 179 | | |
134 | | - | |
135 | 180 | | |
136 | 181 | | |
137 | 182 | | |
138 | 183 | | |
139 | 184 | | |
140 | | - | |
141 | | - | |
142 | 185 | | |
143 | 186 | | |
144 | 187 | | |
| |||
149 | 192 | | |
150 | 193 | | |
151 | 194 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
157 | 217 | | |
158 | 218 | | |
159 | | - | |
| 219 | + | |
160 | 220 | | |
161 | 221 | | |
162 | 222 | | |
| |||
0 commit comments