Skip to content

fix Conversions setting to allow a local overide to specify Conversion.Default when the Global value is set to somthing else#813

Closed
stocksr wants to merge 2 commits intoSteveDunn:mainfrom
stocksr:RS-fix-config
Closed

fix Conversions setting to allow a local overide to specify Conversion.Default when the Global value is set to somthing else#813
stocksr wants to merge 2 commits intoSteveDunn:mainfrom
stocksr:RS-fix-config

Conversation

@stocksr
Copy link

@stocksr stocksr commented Jul 9, 2025

Fixes #810

Adds a new "Unspecifed" member to the Conversions Enum and uses that rather than Default
Adds unit tests for the new behavour and the previously broken behavour.

I have kept the "Conversions.Default" member for backwards compatibility - as any change to that causes a huge chunk of test fails. However I think it could be removed in the next major version.

@SteveDunn
Copy link
Owner

Thanks very much for the PR - great work. I'll check back in a few hours to take a further look. Thanks again!


public static bool IsValidFlags(this Conversions value) => (int) value >= 0 && (int) value < _maxConversion;

public static bool IsValidFlags(this Conversions value) => (int) value >= -1 && (int) value < _maxConversion;
Copy link
Owner

Choose a reason for hiding this comment

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

I think this should remain as >=0 as this check is done after config is merged. Nothing should remain unspecified after merging as that's when the defaults are applied. An unspecified value might mean we've forgotten to handle the default.

Copy link
Author

Choose a reason for hiding this comment

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

I changed this as without my change I was getting hundreds of VOG011 diagnostic warnings from the tests.

Is this the wrong place to fix that?

Copy link
Owner

Choose a reason for hiding this comment

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

Oh, I see. When I get chance, I'll pull down this branch and take a look.

Copy link
Owner

Choose a reason for hiding this comment

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

Apologies for the delay, I hope to have a bit of time at the weekend to catch up on things. Appreciate your PR!

Copy link
Author

Choose a reason for hiding this comment

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

👋 - any updates?

Copy link
Owner

Choose a reason for hiding this comment

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

So sorry for the extremely long delay! I'm on it now!

Copy link
Owner

Choose a reason for hiding this comment

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

I checked out this PR and pushed, but for some reason, it created a new PR
#871

@SteveDunn
Copy link
Owner

Closing this as it has now been merged in PR #871
Thanks very much for the bug report and PR - much appreciated - and apologies again for the very slow response!

@SteveDunn SteveDunn closed this Dec 19, 2025
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.

When setting VogenDefaults conversions it is not possible to revert back to the defaults on a specific instance.

2 participants