Skip to content

Remove comment in packages.config causing powershell parsing error - #41036

Merged
Ben Hillis (benhillis) merged 1 commit into
masterfrom
user/oneblue/rm-comment
Jul 9, 2026
Merged

Ben Hillis (benhillis) merged 1 commit into
masterfrom
user/oneblue/rm-comment

Conversation

@OneBlue

Copy link
Copy Markdown
Collaborator

Summary of the Pull Request

This change removes the comment in packages.config. Configuring cmake with that comment it places gives:

make .
-- Building for: Visual Studio 18 2026
-- The C compiler identification is MSVC 19.51.36246.0
-- The CXX compiler identification is MSVC 19.51.36246.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/18/Enterprise/VC/Tools/MSVC/14.51.36231/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/18/Enterprise/VC/Tools/MSVC/14.51.36231/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- No platform specified, defaulting to 'x64' based on host architecture.
-- Using the multi-header code from C:/Users/piboulay/repos/wsl/_deps/x64/nlohmannjson-src/include/
All packages listed in packages.config are already installed.
Cannot index into a null array.
At line:1 char:156
+ ... pace'} | % {$packages.add($_.id, $_.Attributes['version'].Value) }; $ ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

-- Loading user configuration
Successfully processed 1 files; Failed processing 0 files
User configuration done
-- Configuring done (10.8s)
-- Generating done (0.6s)
-- Build files have been written to: C:/Users/piboulay/repos/wsl

The configuration still succeeds, but we might as well remove this. It's probably not worth adding complexity to the parsing script to support comments either

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

@OneBlue
Blue (OneBlue) requested a review from a team as a code owner July 9, 2026 00:50
Copilot AI review requested due to automatic review settings July 9, 2026 00:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes an XML comment from packages.config to prevent a PowerShell-based packages.config parsing step (used during CMake configure) from throwing Cannot index into a null array, while keeping NuGet restore/configure behavior unchanged.

Changes:

  • Removed a TODO XML comment line from packages.config that was being interpreted as a node by the PowerShell Select-Xml pipeline.
  • Eliminated the noisy configure-time PowerShell exception without adding extra parsing complexity.
@benhillis
Ben Hillis (benhillis) merged commit 20423b2 into master Jul 9, 2026
12 checks passed
@benhillis
Ben Hillis (benhillis) deleted the user/oneblue/rm-comment branch July 9, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants