IntentArchitect / Support

A repository dedicated to handling issues and support queries
3 stars 0 forks source link

V4 of Intent modules compatability #13

Closed jpseini closed 1 year ago

jpseini commented 1 year ago

Ask a question

Are version 4.* of the Intent modules backwards compatible?

The situation: We have an existing application - in V3 and V4 of Intent Architect, the Software Factory will run without any issue. If all Intent modules are updated to use the latest, some modules (listed below) get updated to version 4.*. This causes the following error to occur in the SF:

System.Exception: Error occurred in Template: TFG.Modules.WebApi.Program [System.Collections.Generic.List`1[Intent.Modelers.Services.Api.ServiceModel]]
 ---> System.TypeLoadException: Could not load type 'Intent.Modelers.Services.CQRS.Api.OperationExtensionModelExtensions' from assembly 'Intent.Modules.Modelers.Services.CQRS, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null'.
   at TFG.Modules.WebApi.Templates.Program.ProgramTemplate.<>c.<TransformText>b__0_0(OperationModel x)
   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
   at TFG.Modules.WebApi.Templates.Program.ProgramTemplate.TransformText() in C:\Development\Git\DA\Intent Architect\TFG.Modules\TFG.Modules.WebApi\Templates\Program\ProgramTemplate.tt:line 140
   at Intent.Modules.Common.Templates.IntentTemplateBase.RunTemplate() in /home/vsts/work/1/s/Modules/Intent.Modules.Common/Templates/IntentTemplateBase.cs:line 189
   at Intent.Modules.Common.CSharp.Templates.CSharpTemplateBase`1.RunTemplate() in /home/vsts/work/1/s/Modules/Intent.Modules.Common.CSharp/Templates/CSharpTemplateBase.cs:line 176
   at Intent.SoftwareFactory.Templates.TemplateOutput.GenerateOutput() in D:\AzureDevOpsAgents\IntentProprietaryRepository\_work\1\s\Intent.IntentArchitect\IntentArchitect.SoftwareFactory\Intent.SoftwareFactory\Templates\Outputs\TemplateOutput.cs:line 31
   --- End of inner exception stack trace ---
   at Intent.SoftwareFactory.Templates.TemplateOutput.GenerateOutput() in D:\AzureDevOpsAgents\IntentProprietaryRepository\_work\1\s\Intent.IntentArchitect\IntentArchitect.SoftwareFactory\Intent.SoftwareFactory\Templates\Outputs\TemplateOutput.cs:line 35
   at Intent.SoftwareFactory.Engine.OutputFile..ctor(IOutputTarget project, ITemplateOutput templateOutput, IFileLog existingFileInfo, ISoftwareFactoryEventDispatcher eventDispatcher) in D:\AzureDevOpsAgents\IntentProprietaryRepository\_work\1\s\Intent.IntentArchitect\IntentArchitect.SoftwareFactory\Intent.SoftwareFactory\Engine\Output\OutputFile.cs:line 30
   at Intent.SoftwareFactory.ProcessOrchestration.<>c__DisplayClass18_2.<ExecuteTemplates>b__1() in D:\AzureDevOpsAgents\IntentProprietaryRepository\_work\1\s\Intent.IntentArchitect\IntentArchitect.SoftwareFactory\Intent.SoftwareFactory\ProcessOrchestration.cs:line 385
   at Intent.SoftwareFactory.TaskTracker.StartSubTask(String name, Action action, Nullable`1 subTaskCount) in D:\AzureDevOpsAgents\IntentProprietaryRepository\_work\1\s\Intent.IntentArchitect\IntentArchitect.SoftwareFactory\Intent.SoftwareFactory\ProcessOrchestration.cs:line 468

Rolling back the 3 modules in question to the last 3.* version resolves the above error. The modules in question:

Thanks.

dandrejvv commented 1 year ago

Hi @jpseini, Modules which were compiled for v3 of Intent are still compatible when run under v4 of Intent. But be aware that modules themselves follow semantic versioning in that major version bumps are made when they are not backwards compatible with older versions. The latest Intent.Modelers.Services.CQRS is 4.0.0 and based on the the stack trace above, the exception is likely due to your TFG.Modules.WebApi module having been compiled against a 3.x version of Intent.Modelers.Services.CQRS module which is not "binary" compatible.

garethbaars commented 1 year ago

Hi @jpseini,

Just to add to the above, Module's evolve independently of the Intent Architect client version.

Major version bumps indicate that there are breaking changes with the previous version of the Module.

The Modules that you've mentioned above all have API changes, hence their major version bump.

jpseini commented 1 year ago

Thanks for the feedback @garethbaars and @dandrejvv - understand 100%.

dandrejvv commented 1 year ago

Hi @jpseini. Glad it was helpful.

If you are looking at updating to v4 of the Intent.Modelers.Services.CQRS module (which only runs on Intent Architect v4), you may need to do the following to your custom module:

This should hopefully get you up and running (for other incompatible custom modules, a similar exercise may need to be done). If you run into any issues feel free to reach out to our support channels to assist.