Skip to content

[Bug Fix] Handling of Automatic Type Registration#675

Merged
pbhal merged 3 commits intomainfrom
users/purunjaybhal/bugFix
Jun 3, 2025
Merged

[Bug Fix] Handling of Automatic Type Registration#675
pbhal merged 3 commits intomainfrom
users/purunjaybhal/bugFix

Conversation

@pbhal
Copy link
Contributor

@pbhal pbhal commented Jun 2, 2025

Deep type registration

  1. ReSettings.AutoRegisterInputType now auto‐discovers generic, array, and nullable element types (e.g. List<List>, T?[]).
  2. All base classes and interfaces (e.g. IEnumerable) are included automatically.

Improved JSON/JToken handling

  1. No longer need to manually add JObject/JToken/JArray to CustomTypes. Rules using input["foo"][0]["bar"] compile and run out of the box.

  2. Use Convert.ToString(...) (instead of .ToString()) on JTokens to avoid “Enumerable.ToString” conflicts.

Nullable comparisons fixed

  1. Expressions like decimal? d < 20 now return false instead of throwing.

Defaults tweaked

  1. UseFastExpressionCompiler defaults to false when custom types are present; re‐enable explicitly if needed.

Unit test coverage

  1. New tests cover nested JSON rules, custom‐type provider edge cases, and nullable comparison.

@pbhal pbhal enabled auto-merge (squash) June 2, 2025 22:44
@pbhal pbhal changed the title [Bug Fix] Graceful Handling of Automatic Type Registration [Bug Fix] Handling of Automatic Type Registration Jun 2, 2025
@pbhal pbhal disabled auto-merge June 2, 2025 22:51
@pbhal
Copy link
Contributor Author

pbhal commented Jun 2, 2025

@pbhal please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree company="Microsoft"

@pbhal
Copy link
Contributor Author

pbhal commented Jun 2, 2025

#667

@pbhal pbhal enabled auto-merge (squash) June 2, 2025 23:01
@pbhal pbhal disabled auto-merge June 2, 2025 23:05
@pbhal pbhal requested a review from nabeel-mehdi June 2, 2025 23:18
@pbhal pbhal self-assigned this Jun 2, 2025
@pbhal pbhal enabled auto-merge (squash) June 2, 2025 23:26
@pbhal pbhal merged commit 71d59dc into main Jun 3, 2025
4 checks passed
@pbhal pbhal deleted the users/purunjaybhal/bugFix branch June 3, 2025 04:03
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.

2 participants