Compare commits

...

4 Commits

Author SHA1 Message Date
Patrick Stevens
d1dde56d06 Fix filter bug (#322) 2025-11-10 19:31:33 +00:00
dependabot[bot]
c14a63b6e3 Bump FsCheck from 3.3.1 to 3.3.2 and WoofWare.PrattParser (#319)
* Bump FsCheck from 3.3.1 to 3.3.2

---
updated-dependencies:
- dependency-name: FsCheck
  dependency-version: 3.3.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump Nerdbank.GitVersioning from 3.8.118 to 3.9.50

---
updated-dependencies:
- dependency-name: Nerdbank.GitVersioning
  dependency-version: 3.9.50
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump WoofWare.PrattParser from 0.2.5 to 0.3.1

---
updated-dependencies:
- dependency-name: WoofWare.PrattParser
  dependency-version: 0.3.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Deps

* Accommodate new API

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Smaug123 <3138005+Smaug123@users.noreply.github.com>
2025-11-10 18:09:48 +00:00
patrick-conscriptus[bot]
d448865b85 Automated commit (#318)
Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
2025-11-09 00:48:06 +00:00
patrick-conscriptus[bot]
ee7aaea2d1 Automated commit (#316)
Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
2025-11-02 00:48:09 +00:00
7 changed files with 33 additions and 15 deletions

View File

@@ -10,7 +10,7 @@
<WarnOn>FS3388,FS3559</WarnOn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.8.118" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.9.50" PrivateAssets="all" />
</ItemGroup>
<PropertyGroup Condition="'$(GITHUB_ACTION)' != ''">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>

View File

@@ -108,7 +108,8 @@ module internal Lexer =
i <- i + 1
| _ ->
yield Token.single TokenType.Not startI 1
i <- i + 1
// Don't advance i here - we only consumed the '!' character
()
| Token.SingleChar token, State.Awaiting ->
i <- i + 1
yield token
@@ -162,7 +163,7 @@ module internal ParsedFilter =
match token.Type with
| TokenType.QuotedString ->
// +1 and -1, because the trivia contains the initial and terminal quote mark
// +1 to skip the initial quote; len includes the initial quote but excludes the terminal quote
inputString.Substring (start + 1, len - 1)
|> unescape
|> ParsedFilter.String
@@ -196,7 +197,12 @@ module internal ParsedFilter =
ConsumeBeforeInitialToken = false
ConsumeAfterFinalToken = false
BoundaryTokens = [ TokenType.CloseParen ]
Construct = List.exactlyOne
Construct =
fun l ->
match List.tryExactlyOne l with
| None -> failwith "expected exactly one token in stream"
| Some None -> failwith "expected parens to have contents"
| Some (Some x) -> x
}
let parse (s : string) : ParsedFilter =

View File

@@ -54,7 +54,7 @@
<EmbeddedResource Include="version.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="WoofWare.PrattParser" Version="0.2.5" />
<PackageReference Include="WoofWare.PrattParser" Version="0.3.1" />
<PackageReference Update="FSharp.Core" Version="6.0.1" />
<PackageReference Include="WoofWare.DotnetRuntimeLocator" Version="0.1.12" />
<PackageReference Include="Myriad.SDK" Version="0.8.3" PrivateAssets="all" />

View File

@@ -123,3 +123,15 @@ module TestFilter =
[<TestCaseSource(nameof xmlExamples)>]
let ``XML examples`` (example : string, expected : Filter) =
Filter.parse example |> shouldEqual expected
let negationExamples =
[
"!Name=foo", Filter.Not (Filter.Name (Match.Exact "foo"))
"!FullyQualifiedName=bar", Filter.Not (Filter.FullyQualifiedName (Match.Exact "bar"))
"!TestCategory=baz", Filter.Not (Filter.TestCategory (Match.Exact "baz"))
]
|> List.map TestCaseData
[<TestCaseSource(nameof negationExamples)>]
let ``Negation examples`` (example : string, expected : Filter) =
Filter.parse example |> shouldEqual expected

View File

@@ -18,7 +18,7 @@
<ItemGroup>
<PackageReference Include="ApiSurface" Version="5.0.2" />
<PackageReference Include="FsCheck" Version="3.3.1" />
<PackageReference Include="FsCheck" Version="3.3.2" />
<PackageReference Include="FsUnit" Version="7.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
<PackageReference Include="NUnit" Version="4.3.2" />

6
flake.lock generated
View File

@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1761349956,
"narHash": "sha256-tH3wHnOJms+U4k/rK2Nn1RfBrhffX92jLP/2VndSn0w=",
"lastModified": 1762361079,
"narHash": "sha256-lz718rr1BDpZBYk7+G8cE6wee3PiBUpn8aomG/vLLiY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "02f2cb8e0feb4596d20cc52fda73ccee960e3538",
"rev": "ffcdcf99d65c61956d882df249a9be53e5902ea5",
"type": "github"
},
"original": {

View File

@@ -21,8 +21,8 @@
},
{
"pname": "FsCheck",
"version": "3.3.1",
"hash": "sha256-k65ksdOSOGz+meRUUND+yuqJtm5ChaKuaxmRIdKzx2Y="
"version": "3.3.2",
"hash": "sha256-3ydyTGpqySynjbcWbmFVeCBnT3KDH3miPSJYJlyxrGs="
},
{
"pname": "fsharp-analyzers",
@@ -211,8 +211,8 @@
},
{
"pname": "Nerdbank.GitVersioning",
"version": "3.8.118",
"hash": "sha256-Hmyy0ZKOmwN4zIhI4+MqoN8geZNc1sd033aZJ6APrO8="
"version": "3.9.50",
"hash": "sha256-BiBfXwr8ob2HTaFk2L5TwAgtvd/EPoqudSI9nhAjQPI="
},
{
"pname": "Newtonsoft.Json",
@@ -361,8 +361,8 @@
},
{
"pname": "WoofWare.PrattParser",
"version": "0.2.5",
"hash": "sha256-6+74AMxVIBa5rYO34Hlm02zPtRSvpcvUA6cqeYB3WoQ="
"version": "0.3.1",
"hash": "sha256-y1m9gTNH1ECDHSFpjWBDkJz7uAQmzp64eGIW3d7hoZQ="
},
{
"pname": "WoofWare.Whippet.Fantomas",