Title: "Failed to compare two elements in the array." in combination with Pwsh 7.5.0 · Issue #131 · PoshCode/ModuleBuilder · GitHub
Open Graph Title: "Failed to compare two elements in the array." in combination with Pwsh 7.5.0 · Issue #131 · PoshCode/ModuleBuilder
X Title: "Failed to compare two elements in the array." in combination with Pwsh 7.5.0 · Issue #131 · PoshCode/ModuleBuilder
Description: I have a Git repo in Azure DevOps where we develop our own Powershell Module. Since this week our build agents are updated with Pwsh 7.5.0 and now our tests are failing on the code coverage part. The building and testing is relying on th...
Open Graph Description: I have a Git repo in Azure DevOps where we develop our own Powershell Module. Since this week our build agents are updated with Pwsh 7.5.0 and now our tests are failing on the code coverage part. T...
X Description: I have a Git repo in Azure DevOps where we develop our own Powershell Module. Since this week our build agents are updated with Pwsh 7.5.0 and now our tests are failing on the code coverage part. T...
Opengraph URL: https://github.com/PoshCode/ModuleBuilder/issues/131
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\"Failed to compare two elements in the array.\" in combination with Pwsh 7.5.0","articleBody":"I have a Git repo in Azure DevOps where we develop our own Powershell Module.\n\nSince this week our build agents are updated with Pwsh 7.5.0 and now our tests are failing on the code coverage part.\n\nThe building and testing is relying on the [Sampler Project](https://github.com/gaelcolas/Sampler/blob/718a354ee15152ef8329b5e2598e9936f79e43f2/.build/tasks/JaCoCo.coverage.build.ps1#L384) which on its part is relying on the [Convert-LineNumber](https://github.com/PoshCode/ModuleBuilder/blob/0ade8f4a8c3bf4dfdb2364bdc38051c7418d52d4/Source/Public/ConvertTo-SourceLineNumber.ps1).\n\n```\nERROR: Exception calling \"BinarySearch\" with \"2\" argument(s): \"Failed to compare two elements in the array.\"\nAt C:\\Users\\xxxxx\\Git\\MyModule\\output\\RequiredModules\\Sampler\\0.118.2\\tasks\\JaCoCo.coverage.build.ps1:385 char:23\n+ … edCommands | Convert-LineNumber -ErrorAction 'Stop' -PassThru | Out-N … \n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \nAt C:\\Users\\xxxxx\\Git\\MyModule\\output\\RequiredModules\\Sampler\\0.118.2\\tasks\\JaCoCo.coverage.build.ps1:246 char:1\n+ task Convert_Pester_Coverage { \n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \nBuild FAILED. 16 tasks, 1 errors, 0 warnings 00:02:55.2719609\nConvertTo-SourceLineNumber: C:\\Users\\xxxxx\\Git\\MyModule\\output\\RequiredModules\\Sampler\\0.118.2\\tasks\\JaCoCo.coverage.build.ps1:385:23\nLine | \n 385 | … edCommands | Convert-LineNumber -ErrorAction 'Stop' -PassThru | Out-N … \n | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n | Exception calling \"BinarySearch\" with \"2\" argument(s): \"Failed to compare two elements in the array.\"\n\n```\n\nThere are 2 things I can do to prevent the Sample build not to fail (I can test/reproduce it locally):\n1. Disable CodeCoverage by setting the threshold to '0'\n2. Change my Pwsh version back from 7.5.0 to an older version like 7.4.x or earlier.\n\n\nIf someone could have a look at this? That would be great. I didn't see anything that triggered me.","author":{"url":"https://github.com/bijlm","@type":"Person","name":"bijlm"},"datePublished":"2025-01-30T16:37:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":19},"url":"https://github.com/131/ModuleBuilder/issues/131"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:024ef924-5b54-1549-5d5b-ff49d1e4b6dc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DB92:374375:38D67:50C0E:69787D85 |
| html-safe-nonce | 233c3b1767ceeb3968263dd829eec3115849d753b4e6ff44627dff3b06e6a675 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjkyOjM3NDM3NTozOEQ2Nzo1MEMwRTo2OTc4N0Q4NSIsInZpc2l0b3JfaWQiOiI3ODEzODEwOTg2NjUyNTY0ODY5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5f9c1cdcf12ed08b9f0ec970cbeda8300e1d6f0bfb2bf6fa6e3619effc0fc647 |
| hovercard-subject-tag | issue:2821296793 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PoshCode/ModuleBuilder/131/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7e5bb48a0d4943ea0b75e2fae5a30ec9f72cbf5b146342daba3bba97d7bc9551/PoshCode/ModuleBuilder/issues/131 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7e5bb48a0d4943ea0b75e2fae5a30ec9f72cbf5b146342daba3bba97d7bc9551/PoshCode/ModuleBuilder/issues/131 |
| og:image:alt | I have a Git repo in Azure DevOps where we develop our own Powershell Module. Since this week our build agents are updated with Pwsh 7.5.0 and now our tests are failing on the code coverage part. T... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bijlm |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2981c597c945c1d90ac6fa355ce7929b2f413dfe7872ca5c435ee53a24a1de50 |
| turbo-cache-control | no-preview |
| go-import | github.com/PoshCode/ModuleBuilder git https://github.com/PoshCode/ModuleBuilder.git |
| octolytics-dimension-user_id | 5641451 |
| octolytics-dimension-user_login | PoshCode |
| octolytics-dimension-repository_id | 18412121 |
| octolytics-dimension-repository_nwo | PoshCode/ModuleBuilder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 18412121 |
| octolytics-dimension-repository_network_root_nwo | PoshCode/ModuleBuilder |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 520b65a872113b919c1bbdb03834a50af15859fd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width