-
-
Couldn't load subscription status.
- Fork 25
Avoid conflicts with multiple helper classes from multiple assemblies #443
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
Conversation
Since we were adding the EmbeddedResource helper as a global, project-wide class, if multiple projects happened to use resources, collisions would start to arise, with no way to disambiguate. Since the code in the helper is actually pretty straightforward and will very likely be inlined into the IL in the end anyway, we instead just add its code as part of the resource area being emitted itself. This might result in a slightly larger assembly if there are a ton of areas, but that's a somewhat unlikely scenario. Fixes #442
🧪 Details on Ubuntu 24.04.1 LTS✅ ThisAssemblyTests.ScribanTests.CanRenderModel 🧪 Details on macOS Unix 14.7.2✅ ThisAssemblyTests.ScribanTests.CanRenderModel 🧪 Details on Microsoft Windows 10.0.20348✅ ThisAssemblyTests.ScribanTests.CanRenderModel from dotnet-retest v0.6.3 on .NET 8.0.13 with 💜 |
Since we were adding the EmbeddedResource helper as a global, project-wide class, if multiple projects happened to use resources, collisions would start to arise, with no way to disambiguate.
Since the code in the helper is actually pretty straightforward and will very likely be inlined into the IL in the end anyway, we instead just add its code as part of the resource area being emitted itself. This might result in a slightly larger assembly if there are a ton of areas, but that's a somewhat unlikely scenario.
Fixes #442