HodorNV / ALOps

ALOps
59 stars 24 forks source link

Alops_DisableParallelCompile seems not to work #443

Closed fvet closed 2 years ago

fvet commented 3 years ago

Describe the bug Having tested #410 , it does not provide the expected result. We still get the error below, after setting Alops_DisableParallelCompile to true.

##[error]\app\src\report\CMRLayoutShipment.Report.al(8,18): error AL0445: The file './Layouts/CMRLayoutNL.rdlc' is opened in another application. Close the application to be able to compile.

the output Output before setting the Alops_DisableParallelCompile PARALLEL compilation is still active. (OK)

2021-10-22T13:58:43.1814070Z ##[command]& C:\bcartifacts.cache\sandbox\18.1.24822.31431\VSIX\extension\bin\alc.exe /?
2021-10-22T13:58:43.2908600Z   * PARALLEL
2021-10-22T13:58:43.2913856Z   * MAXDEGREEOFPARALLELISM
2021-10-22T13:58:43.2918867Z   * ASSEMBLYPROBINGPATHS
2021-10-22T13:58:43.2923425Z *** Start ALC.EXE / Compile AL Extension
2021-10-22T13:58:43.2993948Z ##[command]& C:\bcartifacts.cache\sandbox\18.1.24822.31431\VSIX\extension\bin\alc.exe /packagecachepath:"C:\DockerInstallation\Agent\_work\255\s\app\.ALOPSCache" /project:"C:\DockerInstallation\Agent\_work\255\s\app" /out:"C:\DockerInstallation\Agent\_work\255\a\Rainbow Logistics IT_Rainbow Logistics General_18.0.0.18170_sandbox_18.1_nl_refsheads2307.app" /fullpaths /analyzer:"C:\bcartifacts.cache\sandbox\18.1.24822.31431\VSIX\extension\bin\Analyzers\Microsoft.Dynamics.Nav.CodeCop.dll","C:\bcartifacts.cache\sandbox\18.1.24822.31431\VSIX\extension\bin\Analyzers\Microsoft.Dynamics.Nav.UICop.dll" /ruleset:"C:\DockerInstallation\Agent\_work\255\s\app\.vscode\nvt.ruleset.json" /parallel+ /maxDegreeOfParallelism:2 /assemblyprobingpaths:"C:\Windows\assembly","C:\Windows\Microsoft.NET\assembly","C:\bcartifacts.cache\sandbox\18.1.24822.31431\platform\Test Assemblies\Mock Assemblies","C:\bcartifacts.cache\sandbox\18.1.24822.31431\platform\LegacyDlls\program files\Microsoft Dynamics NAV\180\RoleTailored Client","C:\bcartifacts.cache\sandbox\18.1.24822.31431\platform\ServiceTier\program files\Microsoft Dynamics NAV\180\Service"

Output after setting the Alops_DisableParallelCompile PARALLEL compilation is no longer active. (OK)

Although i suppose MAXDEGREEOFPARALLELISM is still resulting in the above compilation error?

Specifies the maximum number of concurrent tasks the compiler should use when compiling the project.

Which is still set to 2.

Should Alops_DisableParallelCompile not disable the MAXDEGREEOFPARALLELISM as well?

2021-10-22T15:09:06.9480561Z *** Detect ALC.EXE Features.
2021-10-22T15:09:06.9486187Z ##[command]& C:\bcartifacts.cache\sandbox\18.1.24822.31431\VSIX\extension\bin\alc.exe /?
2021-10-22T15:09:07.0567673Z   * MAXDEGREEOFPARALLELISM
2021-10-22T15:09:07.0574534Z   * ASSEMBLYPROBINGPATHS
2021-10-22T15:09:07.0578682Z *** Start ALC.EXE / Compile AL Extension
2021-10-22T15:09:07.0584494Z ##[command]& C:\bcartifacts.cache\sandbox\18.1.24822.31431\VSIX\extension\bin\alc.exe /packagecachepath:"C:\DockerInstallation\Agent\_work\255\s\app\.ALOPSCache" /project:"C:\DockerInstallation\Agent\_work\255\s\app" /out:"C:\DockerInstallation\Agent\_work\255\a\Navitrans_Navitrans 365 NL_18.4.0.18182_sandbox_18.1_nl.app" /fullpaths /analyzer:"C:\bcartifacts.cache\sandbox\18.1.24822.31431\VSIX\extension\bin\Analyzers\Microsoft.Dynamics.Nav.CodeCop.dll","C:\bcartifacts.cache\sandbox\18.1.24822.31431\VSIX\extension\bin\Analyzers\Microsoft.Dynamics.Nav.UICop.dll" /ruleset:"C:\DockerInstallation\Agent\_work\255\s\app\.vscode\nvt.ruleset.json" /maxDegreeOfParallelism:2 /assemblyprobingpaths:"C:\Windows\assembly","C:\Windows\Microsoft.NET\assembly","C:\bcartifacts.cache\sandbox\18.1.24822.31431\platform\Test Assemblies\Mock Assemblies","C:\bcartifacts.cache\sandbox\18.1.24822.31431\platform\LegacyDlls\program files\Microsoft Dynamics NAV\180\RoleTailored Client","C:\bcartifacts.cache\sandbox\18.1.24822.31431\platform\ServiceTier\program files\Microsoft Dynamics NAV\180\Service"
waldo1001 commented 2 years ago

Hm, makes sense. We'll take that one out as well.

Do know, last week, I heard of a compiler-bug that might have something to do with this issue as well. So a new version could also solve this - not sure though..

fvet commented 2 years ago

v1.446

/maxDegreeOfParallelism:2 is no longer added when Alops_DisableParallelCompile is enabled

fvet commented 2 years ago

@waldo1001 Reopend, since we're still struggling with this ...

If I would enable Alops_DisableParallelCompile , the /parallel and /maxDegreeOfParallelism properties are no longer added to alc.exe.

However, reading through this (https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-al-extension-configuration), seems like parallelis enabled by default.

image

Wouldn't it make sense when enabling Alops_DisableParallelCompile, that you explicity add /parallel- to alc.exe.

image

Only then it seems to work.

waldo1001 commented 2 years ago

Sorry - I forgot about this issue. We will pick it up.

fvet commented 2 years ago

@waldo1001 Any ETA on this? This is still blocking the build of one of our extensions :(

waldo1001 commented 2 years ago

We have a hotfix ready, we'll try to push it this weekend!

waldo1001 commented 2 years ago

We didn't make it pervious weekend - but we're testing as we speak - it should be ok now (including other feature requests as well).

fvet commented 2 years ago

@waldo1001 Could it be release notes have not been updated yet? While the new release seems to be live already ...

image

waldo1001 commented 2 years ago

Release notes have been updated - thanks for the reminder ;-).

Can you confirm the issue is solved?

fvet commented 2 years ago

@jcoe-nvt Can you please check and confim?

jcoe-nvt commented 2 years ago

The solution seems to work. You can close this issue.