Unified Critter Stack Resource Model #2522
Unanswered
jeremydmiller
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This was spawned by a conversation in Discord today about how to reduce the Docker / AWS Lambda images for apps that use Marten but deploy with pre-generated code
Marten & Wolverine share quite a few underpinnings:
They both have some sort of "Optimized Artifact Workflow", but they're configured separately. It would be nice if there was one
single place in applications using both Marten or Wolverine to specify:
AutoCreate
mode, but now more generic for other resourcesFor more context, see:
To get there, I think maybe we could:
JasperFx.Framework
? It's admittedly a little weird that that stuff is in the command line parsing library, and maybe that stuff is useful outside of OaktonIServiceCollection
and/orIHostBuilder
to specify artifact/resource workflow? It's already there, but this time make that used by Marten itself and WolverineDecoupling from JasperFx.Compiler
The JasperFx.Compiler library is the main culprit for bloating the size of published Marten applications because of its dependencies on Roslyn elements. What we'd ideally like to do is to make this dependency only necessary at development time, but not actually be deployed in production with the assumption that teams would pre-generate all the necessary code.
To maybe make this work, here's a first alternative:
IAssemblyGenerator
in place of theAssemblyGenerator
that's currently in the compiler libraryAssemblyGenerator
to the relatively harmlessJasperFx.CodeCompilation
libraryJasperFx.CodeCompilation
know what the realIAssemblyGenerator
is for the timeswhen one of the frameworks needs to compile code on the fly? We could depend on
IAssemblyGenerator
being registered in the container or use pure Reflection to load the realAssemblyGenerator
by string names and fail with descriptive names if it does not exist. The first is more changes. The second is looser coupling.Beta Was this translation helpful? Give feedback.
All reactions