Skip to content

Add F# LINQ expression translation pipeline for Cosmos queries (quotations, pipes/composition, options)#19

Draft
Copilot wants to merge 10 commits into
mainfrom
copilot/implement-linq-translation-methods
Draft

Add F# LINQ expression translation pipeline for Cosmos queries (quotations, pipes/composition, options)#19
Copilot wants to merge 10 commits into
mainfrom
copilot/implement-linq-translation-methods

Conversation

Copy link
Copy Markdown

Copilot AI commented May 23, 2026

  • Confirm StringAssert.Contains(value, substring, message, comparisonType) overload is present in MSTest 3.8.3
  • Replace bare StringAssert.Contains(value, substring, message) calls with StringAssert.Contains(value, substring, message, StringComparison.Ordinal) in tests/Cosmos.Tests/Tests.fs
  • Retain Assert.IsFalse(str.Contains(X, StringComparison.Ordinal), msg) for negative assertions (MSTest 3.8.3 has a circular-call bug in all Assert.DoesNotContain string overloads that causes a stack overflow)
  • Build and run tests — all 6 pass

xperiandri and others added 7 commits May 23, 2026 17:23
* Added detailed project overview, solution structure, library list, and comprehensive F# coding guidelines.
* Included language preferences, nullable reference type handling, class instantiation rules, extension member patterns, naming conventions, and testing requirements.
* Replaced previous brief instructions with a thorough, structured guide.
Copilot AI changed the title [WIP] Implement LINQ translation methods for F# constructs Add F# LINQ expression translation pipeline for Cosmos queries (quotations, pipes/composition, options) May 23, 2026
Copilot AI requested a review from xperiandri May 23, 2026 18:43
Comment on lines +32 to +35
Assert.IsFalse (
translatedText.Contains ("op_ComposeRight", StringComparison.Ordinal),
$"Composition operators should be normalized before Cosmos LINQ translation. Actual: {translatedText}"
)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot StringAssert has overloads with StringComparison.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

StringAssert doesn't have a DoesNotContain method in MSTest 3.8.3 - only Contains, StartsWith, EndsWith, Matches, and DoesNotMatch. For negative string containment checks, the options are:

  1. Assert.IsFalse(str.Contains(x, StringComparison.Ordinal), msg) (current approach)
  2. Assert.DoesNotContain(x, str, StringComparison.Ordinal, msg) (has a circular-call bug causing stack overflow in MSTest 3.8.3)

We're using approach #1 to avoid the MSTest bug while still specifying StringComparison.Ordinal for the comparison.

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.

Handle F# language constructs in LINQ (quotations, pipes, compositions, optional types)

2 participants