-
Notifications
You must be signed in to change notification settings - Fork 102
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
Get-D365Module -ExcludeBinaryModules is broken if model references a binary model #753
Comments
Thanks, I can reproduce that on my end. Seems this issue was introduced by the changes for #745 .
|
.... And here I thought the change was an improvement 🤯 I'll do some compare on the changes and see if we can produce a working script. Then you can run it locally and let me know if all scenarios are covered. |
Thanks. initially, it was the problem that this didn't work if you never compiled models(for example, for new VMs) The standard full compile somehow resolves this problem(if you run a full compile, modules will be compiled in the correct order)
|
Just an idea. Maybe instead of fixing Get-D365Module -ExcludeBinaryModules you can create a powershell script that compiles a solution(the same what Build server does). The compile in this case is happening in the correct order. This is a log from the build server that does this(I have no idea how to put it to PowerShell) ` ` |
Just a note - it seems other functions are broken with the latest changes. For example if I execute DEVExternalIntegration references binary SDSRel, so this situation should not cause the exception |
I played around with this a bit. To reproduce the scenario, I created two modules, AAABinary and AAANonBinary. The contents are very simple, AAABinary references ApplicationPlatform and has a runnable class. AAANonBinary references AAABinary and has a class that inherits from the runnable class in AAANonBinary. So the dependency order is I was not able to reproduce the issue when running
As a first step, I added a try/catch to the
There is a scenario where this might still cause issues. Assume the following dependency order: |
Thanks @FH-Inway . Catch loop should at least return behaviour to the original state. can you release these changes? I can't tell how important is your AAANonBinary1,AAANonBinary2 sample, I need to test it, but just an idea - maybe to resolve such problem add an optional parameter, where the user may specify what model to choose first? |
0.7.2 is on its way. Take it for a spin, and lets nail this son of a gun... |
I think this issue can be closed now. |
Updated to the latest version and found out that Get-D365Module -ExcludeBinaryModules generates an error if a model contains a reference to a binary model
When running, it generates the following exception:
Exception calling "ListModulesInDependencyOrder" with "0" argument(s): "Module reference 'SDSRel' in model 'DEVExternalIntegration' cannot be located. This is an indication that model store is in a broken state."
We have a DEVExternalIntegration model(with a code) that references SDSRel, and SDSRel is a binary model
The expected result - this should not cause any exception.
The text was updated successfully, but these errors were encountered: