-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable using live ref pack in source generator unit tests #60605
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer Issue DetailsCurrently, source generator unit tests either directly reference implementation assemblies or use a non-live ref pack. To enable using live ref assemblies in source generator unit tests, we should add infrastructure to zip the live ref assemblies, include in the Helix payload, and unzip / resolve against in the unit tests
|
As the targeting pack (ref pack) is only needed for building and not running, why would we need that on a Helix machine? Do we actually build on Helix now? |
The ref pack is needed to add to a Roslyn So yes, in a sense we're building code on Helix now, just as part of tests that hook into our customer's compilation experience. |
Can you just use the live built targeting pack nuget package? That's the common path that our customers use as well. We should be able to build the targeting pack package as part of the libraries build as there are no dependencies on the runtime. |
Using the package is actually more annoying than using the zip. We’d still need to upload it to Helix since it wouldn’t be on a feed yet, and we’d need to calculate the version to restore. Additionally, we would need to continue to override the NUGET_PACKAGES environment variable to a new value every run since each local build has the same version (7.0.0-dev). Using a zip of the ref assemblies is actually significantly easier. |
Currently, source generator unit tests either directly reference implementation assemblies or use a non-live ref pack. To enable using live ref assemblies in source generator unit tests, we should add infrastructure to zip the live ref assemblies, include in the Helix payload, and unzip / resolve against in the unit tests
The text was updated successfully, but these errors were encountered: