Skip to content

fix(Tool): Fix eqx dump for non-Cosmos#481

Merged
bartelink merged 3 commits into
masterfrom
fix-dump
Feb 4, 2026
Merged

fix(Tool): Fix eqx dump for non-Cosmos#481
bartelink merged 3 commits into
masterfrom
fix-dump

Conversation

@bartelink
Copy link
Copy Markdown
Collaborator

Fixes bug introduced in #473 (assumption of Cosmos in a member val )
via #479 thanks to @njlr

Copilot AI review requested due to automatic review settings February 4, 2026 14:58
@bartelink
Copy link
Copy Markdown
Collaborator Author

Sorry, yet more of me not paying proper attention and/or trying to repro things

I broke this in #473 with some code which went through heavy duty testing, but only on Cosmos DB

Until I merge and release, you can validate this fix via:

dotnet run --project tools/Equinox.Tool dump test-931fb60dbee14e3dbc106386614de2ca dynamo

Copy link
Copy Markdown

Copilot AI left a comment

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 fixes a bug where the eqx dump command failed when using non-Cosmos stores (specifically Dynamo) due to eager evaluation of Cosmos-specific arguments. The fix adds the Last attribute to store type parameters and refactors the Cosmos argument initialization to be lazy. Additionally, the tool's target framework is upgraded from .NET 6.0 to .NET 8.0.

Changes:

  • Added Last attribute to Cosmos and Dynamo store parameters in DumpParameters to fix argument parsing
  • Refactored CosmosArgs from eager member val to lazy evaluation within Connect() method
  • Upgraded target framework from net6.0 to net8.0

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tools/Equinox.Tool/Program.fs Fixed DumpParameters to add Last attribute and refactored CosmosArgs initialization to be lazy
tools/Equinox.Tool/Equinox.Tool.fsproj Updated target framework from net6.0 to net8.0 with corresponding comment update

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/Equinox.Tool/Program.fs
Comment thread tools/Equinox.Tool/Equinox.Tool.fsproj Outdated
Comment thread tools/Equinox.Tool/Equinox.Tool.fsproj Outdated
| [<AltCommandLine "-E"; Unique >] EventsOnly
| [<CliPrefix(CliPrefix.None)>] Cosmos of ParseResults<Store.Cosmos.Parameters>
| [<CliPrefix(CliPrefix.None)>] Dynamo of ParseResults<Store.Dynamo.Parameters>
| [<CliPrefix(CliPrefix.None); Last>] Cosmos of ParseResults<Store.Cosmos.Parameters>
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Last does not appear to make a functional difference, but there's no reason for Cosmos or Dynamo to be different (chances are all can be safely removed but leaving for another day)

@bartelink bartelink changed the title fix(Tool): Fix broken dump for non-Cosmos fix(Tool): Fix eqx dump for non-Cosmos Feb 4, 2026
@bartelink bartelink merged commit ccebb14 into master Feb 4, 2026
5 checks passed
@bartelink
Copy link
Copy Markdown
Collaborator Author

@njlr Uploaded https://www.nuget.org/packages/Equinox.Tool/4.1.2

@njlr
Copy link
Copy Markdown
Contributor

njlr commented Feb 4, 2026

@njlr Uploaded https://www.nuget.org/packages/Equinox.Tool/4.1.2

Works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants