Comments (3)
This has a wider impact as it is blocking moving the entity classes in a different assembly than the controller one. This means that the library is enforcing having everything in a single project making the life harder in case of a complex operator.
A potential solution would be to skip generating the OperatorBuilderExtensions, FinalizerRegistrations and ControllerRegistrations in case no IEntityController is found in the current assembly
@robertcoltheart in case your problem is only with the Test project(s), one workaround is adding the below code in (each of) your test project:
<Target Name="DisableAnalyzers" BeforeTargets="CoreCompile">
<ItemGroup>
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'KubeOps.Generator'"/>
</ItemGroup>
</Target>
edited: added fix suggestion
from dotnet-operator-sdk.
@oionut thanks for the workaround!
Is it not possible to use a library with your entities in one project and attach the generator there?
Maybe an idea would be to have some csproj properties to ignore or disable certain parts of the generator. Do you have any suggestions or best practices regarding source generators? It's the first I ever wrote ;-)
from dotnet-operator-sdk.
Hi @buehler. Source generators are new to mee too, unfortunately I cannot suggest a better solution.
from dotnet-operator-sdk.
Related Issues (20)
- [bug]: AdditionalPrinterColumn did not account for general type and format translation HOT 1
- [bug]: Events are not correctly generated in relation with the source entity HOT 2
- [bug]: Mutation WebHook throws JsonDiff ArgumentOutOfRangeException exception HOT 2
- [bug]: Mutation webhook not working HOT 2
- [bug]: System.Int32 is not a valid Kubernetes entity (inconsistently) HOT 1
- [feature]: Provide an option to skip the kubeops CLI during build HOT 2
- [bug]: v8.0.0 requeuing - polling stops completely after some time if status updated HOT 3
- [bug]: Cannot create mutation webhook with built-in resources HOT 1
- [bug]: Too old resource version HOT 3
- [bug]: No retry is performed when the ResourceWatcher fail to watch a resource HOT 12
- [bug]: KubeOps.CLI Tool does not contain the relevant documented functionality HOT 2
- [bug]: Length attribute with maxLength not filled generates incorrect OpenApiSpec
- [docs]: How does remote development work now? HOT 5
- [bug]: For adding Xunit for operators, on adding reference of the operator project shows amibiguous between methods or properties HOT 3
- [feature]: JsonSchema.Net.Generation for openapi schema generation? HOT 5
- [bug]: Nullable causes model binding error in webhooks HOT 5
- The automated release is failing 🚨 HOT 1
- [bug]: Watcher stops watching custom resource after some time HOT 1
- [bug]: SAN in Certificate for Service is incorrect HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotnet-operator-sdk.