Skip to content

Commit 3b4799f

Browse files
[http-client-csharp] add regen preview local validation script (#8819)
This PR adds a new regen preview developer script to aid in testing and validating changes made to the generator. It allows regenerating azure libraries locally using the local artifacts of the generator, helping to see what the regenerated code will look like with the applied changes. contributes to: Azure/azure-sdk-for-net#52234 example run: <img width="539" height="310" alt="image" src="https://github.com/user-attachments/assets/b1151f24-bac6-49b9-84b9-9c4352c0c71e" />
1 parent cf85d97 commit 3b4799f

File tree

6 files changed

+2246
-4
lines changed

6 files changed

+2246
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ packages/*/etc/
217217
# csharp emitter
218218
!packages/http-client-csharp/package-lock.json
219219
packages/http-client-csharp/generator/artifacts/
220+
packages/http-client-csharp/debug/
220221
packages/http-client-csharp/generated-defs/**/*.js
221222
packages/http-client-csharp/generated-defs/**/*.js.map
222223
packages/http-client-csharp/generated-defs/**/*.d.ts

cspell.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ dictionaries:
66
- typescript
77
words:
88
- Adoptium
9+
- Arize
10+
- arizeaiobservabilityeval
911
- agentic
1012
- aiohttp
1113
- alzimmer
@@ -156,11 +158,13 @@ words:
156158
- myname
157159
- mypy
158160
- nanos
161+
- ncpu
159162
- nexted
160163
- nihao
161164
- nint
162165
- NODEFS
163166
- noformat
167+
- nologo
164168
- noopener
165169
- noreferrer
166170
- nosec

packages/http-client-csharp/CONTRIBUTING.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,21 @@ Generate test projects to validate the emitter and generator:
177177

178178
To regenerate test projects after making changes:
179179

180-
1. **Generate projects**:
180+
**Generate projects**:
181181

182-
```bash
183-
./eng/scripts/Generate.ps1
184-
```
182+
```bash
183+
./eng/scripts/Generate.ps1
184+
```
185+
186+
### Regenerating Azure Libraries
187+
188+
To regenerate azure libraries using your local changes, run:
189+
190+
```bash
191+
./eng/scripts/RegenPreview.ps1 <path-to-clone-of-azure-sdk-for-net>
192+
```
193+
194+
This will regenerate all the Azure libraries and allow you to view any potential diffs your changes may cause. For more information on the script's usage, see [RegenPreview](./eng/scripts/docs/RegenPreview.md).
185195

186196
## Validating Changes Against the Azure Generator
187197

0 commit comments

Comments
 (0)