You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -182,6 +183,66 @@ To regenerate test projects after making changes:
182
183
./eng/scripts/Generate.ps1
183
184
```
184
185
186
+
## Validating Changes Against the Azure Generator
187
+
188
+
When making changes to the TypeSpec HTTP Client C# package, it's important to validate that your changes work correctly with the Azure generator that depends on this package. Follow these steps to test your changes:
189
+
190
+
### 1. Create a Fork of azure-sdk-for-net
191
+
192
+
Create a fork of the [azure-sdk-for-net repository](https://github.com/Azure/azure-sdk-for-net):
193
+
194
+
1. Navigate to https://github.com/Azure/azure-sdk-for-net
195
+
2. Click the "Fork" button to create your own fork
Run the generator publish pipeline to create dev artifacts from your changes:
206
+
207
+
1. Navigate to the [Generator Publish Pipeline](https://dev.azure.com/azure-sdk/internal/_build?definitionId=6871)
208
+
2. Click "Run pipeline"
209
+
3. In the source branch field, provide your PR reference in the format `refs/pull/123/merge` (replace `123` with your actual PR number)
210
+
4. Run the pipeline - this will publish the generator dev artifacts to the dotnet dev nuget feed
211
+
212
+
### 3. Update Package Versions in Azure Generator
213
+
214
+
In your azure-sdk-for-net fork, update the generator package versions to use your dev artifacts:
215
+
216
+
1. Navigate to the azure generator directory in your fork
217
+
2. Run the BumpMTG script with your PR ID:
218
+
219
+
```powershell
220
+
.\eng\scripts\BumpMTG.ps1 -PrId 123
221
+
```
222
+
223
+
Replace `123` with the PR ID you used in step 2.
224
+
225
+
This script will update the NuGet package versions of the generator to point to your dev artifacts.
226
+
227
+
### 4. Build the Azure Generator
228
+
229
+
Build the azure generator with your updated dependencies:
230
+
231
+
```bash
232
+
npm ci && npm run clean && npm run build
233
+
```
234
+
235
+
### 5. Validate Your Changes
236
+
237
+
Now you can validate your changes by:
238
+
239
+
-**Running tests**: Execute the test suite to ensure no regressions
240
+
-**Regenerating test libraries**: Use the generator to regenerate existing test libraries and verify the output
241
+
-**Testing new features**: If you added new functionality, test it with relevant TypeSpec definitions
242
+
-**Checking integration**: Ensure the integration between your changes and the Azure generator works as expected
243
+
244
+
This validation process helps ensure that your changes to the TypeSpec HTTP Client C# package are compatible with the downstream Azure generator. If breaking changes are expected, you can prepare the required changes to the Azure Generator ahead of time to reduce the time it will take to fix and upgrade the Azure Generator once your changes merge and are consumed by the Azure Generator.
0 commit comments