From 7ef393a28d702708e667bed3b3da64cc274c914b Mon Sep 17 00:00:00 2001 From: Patrick Stevens <3138005+Smaug123@users.noreply.github.com> Date: Wed, 7 Feb 2024 01:27:57 +0000 Subject: [PATCH] Split attributes into their own assembly (#86) --- .github/workflows/dotnet.yaml | 40 ++++++++++--- CHANGELOG.md | 6 ++ README.md | 13 +++- .../Attributes.fs | 58 ++++++++++++++++++ .../SurfaceBaseline.txt | 16 +++++ .../Test/TestSurface.fs | 26 ++++++++ ...Ware.Myriad.Plugins.Attributes.Test.fsproj | 25 ++++++++ .../WoofWare.Myriad.Plugins.Attributes.fsproj | 38 ++++++++++++ .../version.json | 7 +++ WoofWare.Myriad.Plugins.Test/TestSurface.fs | 2 +- .../WoofWare.Myriad.Plugins.Test.fsproj | 2 +- .../HttpClientGenerator.fs | 7 --- .../InterfaceMockGenerator.fs | 8 --- WoofWare.Myriad.Plugins/JsonParseGenerator.fs | 17 ------ .../JsonSerializeGenerator.fs | 17 ------ .../RemoveOptionsGenerator.fs | 7 --- WoofWare.Myriad.Plugins/SurfaceBaseline.txt | 12 ---- .../WoofWare.Myriad.Plugins.fsproj | 4 ++ WoofWare.Myriad.Plugins/version.json | 4 +- WoofWare.Myriad.sln | 12 ++++ flake.nix | 4 +- nix/deps.nix | 59 ++++++++++++++++++- 22 files changed, 296 insertions(+), 88 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 WoofWare.Myriad.Plugins.Attributes/Attributes.fs create mode 100644 WoofWare.Myriad.Plugins.Attributes/SurfaceBaseline.txt create mode 100644 WoofWare.Myriad.Plugins.Attributes/Test/TestSurface.fs create mode 100644 WoofWare.Myriad.Plugins.Attributes/Test/WoofWare.Myriad.Plugins.Attributes.Test.fsproj create mode 100644 WoofWare.Myriad.Plugins.Attributes/WoofWare.Myriad.Plugins.Attributes.fsproj create mode 100644 WoofWare.Myriad.Plugins.Attributes/version.json diff --git a/.github/workflows/dotnet.yaml b/.github/workflows/dotnet.yaml index 1c88a63..e11e9d6 100644 --- a/.github/workflows/dotnet.yaml +++ b/.github/workflows/dotnet.yaml @@ -142,23 +142,37 @@ jobs: run: nix develop --command dotnet build --no-restore --configuration Release - name: Pack run: nix develop --command dotnet pack --configuration Release - - name: Upload NuGet artifact + - name: Upload NuGet artifact (plugin) uses: actions/upload-artifact@v4 with: - name: nuget-package + name: nuget-package-plugin path: WoofWare.Myriad.Plugins/bin/Release/WoofWare.Myriad.Plugins.*.nupkg + - name: Upload NuGet artifact (attributes) + uses: actions/upload-artifact@v4 + with: + name: nuget-package-attribute + path: WoofWare.Myriad.Plugins.Attributes/bin/Release/WoofWare.Myriad.Plugins.Attributes.*.nupkg expected-pack: needs: [nuget-pack] runs-on: ubuntu-latest steps: - - name: Download NuGet artifact + - name: Download NuGet artifact (plugin) uses: actions/download-artifact@v4 with: - name: nuget-package + name: nuget-package-plugin + path: packed-plugin - name: Check NuGet contents # Verify that there is exactly one nupkg in the artifact that would be NuGet published - run: if [[ $(find . -maxdepth 1 -name 'WoofWare.Myriad.Plugins.*.nupkg' -printf c | wc -c) -ne "1" ]]; then exit 1; fi + run: if [[ $(find packed-plugin -maxdepth 1 -name 'WoofWare.Myriad.Plugins.*.nupkg' -printf c | wc -c) -ne "1" ]]; then exit 1; fi + - name: Download NuGet artifact (attributes) + uses: actions/download-artifact@v4 + with: + name: nuget-package-attribute + path: packed-attribute + - name: Check NuGet contents + # Verify that there is exactly one nupkg in the artifact that would be NuGet published + run: if [[ $(find packed-attribute -maxdepth 1 -name 'WoofWare.Myriad.Plugins.Attributes.*.nupkg' -printf c | wc -c) -ne "1" ]]; then exit 1; fi all-required-checks-complete: needs: [check-dotnet-format, check-nix-format, build, build-nix, linkcheck, flake-check, analyzers, nuget-pack, expected-pack] @@ -178,9 +192,17 @@ jobs: with: extra_nix_config: | access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - - name: Download NuGet artifact + - name: Download NuGet artifact (plugin) uses: actions/download-artifact@v4 with: - name: nuget-package - - name: Publish to NuGet - run: nix develop --command dotnet nuget push "WoofWare.Myriad.Plugins.*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json + name: nuget-package-plugin + path: packed-plugin + - name: Publish to NuGet (plugin) + run: nix develop --command dotnet nuget push "packed-plugin/WoofWare.Myriad.Plugins.*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json + - name: Download NuGet artifact (attribute) + uses: actions/download-artifact@v4 + with: + name: nuget-package-attribute + path: packed-attribute + - name: Publish to NuGet (attribute) + run: nix develop --command dotnet nuget push "packed-attribute/WoofWare.Myriad.Plugins.Attributes.*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8d19437 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,6 @@ +Notable changes are recorded here. + +# WoofWare.Myriad.Plugins 1.4 -> 2.0 + +This transition split the attributes (e.g. `[]`) into their own assembly, WoofWare.Myriad.Plugins.Attributes. +The new assembly has minimal dependencies, so you may safely use it from your own code. diff --git a/README.md b/README.md index ca0a271..3d935a0 100644 --- a/README.md +++ b/README.md @@ -337,13 +337,20 @@ For example, [PureGymDto.fs](./ConsumePlugin/PureGymDto.fs) is a real-world set * In your `.fsproj` file, define a helper variable so that subsequent steps don't all have to be kept in sync: ```xml - 1.3.5 + 2.0.1 ``` -* Take a reference on `WoofWare.Myriad.Plugins`: +* Take a reference on `WoofWare.Myriad.Plugins.Attributes` (which has no other dependencies), to obtain access to the attributes which the generator will recognise: ```xml - + + + ``` +* Take a reference (with private assets, to prevent these from propagating to your own assembly) on `WoofWare.Myriad.Plugins`, to obtain the plugins which Myriad will run, and on `Myriad.Sdk`, to obtain the Myriad binary itself: + ```xml + + + ``` * Point Myriad to the DLL within the NuGet package which is the source of the plugins: diff --git a/WoofWare.Myriad.Plugins.Attributes/Attributes.fs b/WoofWare.Myriad.Plugins.Attributes/Attributes.fs new file mode 100644 index 0000000..1e2546d --- /dev/null +++ b/WoofWare.Myriad.Plugins.Attributes/Attributes.fs @@ -0,0 +1,58 @@ +namespace WoofWare.Myriad.Plugins + +open System + +/// Attribute indicating a record type to which the "Remove Options" Myriad +/// generator should apply during build. +/// The purpose of this generator is to strip the `option` modifier from types. +type RemoveOptionsAttribute () = + inherit Attribute () + +/// Attribute indicating an interface type for which the "Generate Mock" Myriad +/// generator should apply during build. +/// This generator creates a record which implements the interface, +/// but where each method is represented as a record field, so you can use +/// record update syntax to easily specify partially-implemented mock objects. +type GenerateMockAttribute () = + inherit Attribute () + +/// Attribute indicating a record type to which the "Add JSON serializer" Myriad +/// generator should apply during build. +/// The purpose of this generator is to create methods (possibly extension methods) of the form +/// `{TypeName}.toJsonNode : {TypeName} -> System.Text.Json.Nodes.JsonNode`. +/// +/// If you supply isExtensionMethod = true, you will get extension methods. +/// These can only be consumed from F#, but the benefit is that they don't use up the module name +/// (since by default we create a module called "{TypeName}"). +type JsonSerializeAttribute (isExtensionMethod : bool) = + inherit Attribute () + + /// The default value of `isExtensionMethod`, the optional argument to the JsonSerializeAttribute constructor. + static member DefaultIsExtensionMethod = false + + /// Shorthand for the "isExtensionMethod = false" constructor; see documentation there for details. + new () = JsonSerializeAttribute JsonSerializeAttribute.DefaultIsExtensionMethod + +/// Attribute indicating a record type to which the "Add JSON parse" Myriad +/// generator should apply during build. +/// The purpose of this generator is to create methods (possibly extension methods) of the form +/// `{TypeName}.jsonParse : System.Text.Json.Nodes.JsonNode -> {TypeName}`. +/// +/// If you supply isExtensionMethod = true, you will get extension methods. +/// These can only be consumed from F#, but the benefit is that they don't use up the module name +/// (since by default we create a module called "{TypeName}"). +type JsonParseAttribute (isExtensionMethod : bool) = + inherit Attribute () + + /// The default value of `isExtensionMethod`, the optional argument to the JsonParseAttribute constructor. + static member DefaultIsExtensionMethod = false + + /// Shorthand for the "isExtensionMethod = false" constructor; see documentation there for details. + new () = JsonParseAttribute JsonParseAttribute.DefaultIsExtensionMethod + +/// Attribute indicating a record type to which the "create HTTP client" Myriad +/// generator should apply during build. +/// This generator is intended to replicate much of the functionality of RestEase, +/// i.e. to stamp out HTTP REST clients from interfaces defining the API. +type HttpClientAttribute () = + inherit Attribute () diff --git a/WoofWare.Myriad.Plugins.Attributes/SurfaceBaseline.txt b/WoofWare.Myriad.Plugins.Attributes/SurfaceBaseline.txt new file mode 100644 index 0000000..2e08fdf --- /dev/null +++ b/WoofWare.Myriad.Plugins.Attributes/SurfaceBaseline.txt @@ -0,0 +1,16 @@ +WoofWare.Myriad.Plugins.GenerateMockAttribute inherit System.Attribute +WoofWare.Myriad.Plugins.GenerateMockAttribute..ctor [constructor]: unit +WoofWare.Myriad.Plugins.HttpClientAttribute inherit System.Attribute +WoofWare.Myriad.Plugins.HttpClientAttribute..ctor [constructor]: unit +WoofWare.Myriad.Plugins.JsonParseAttribute inherit System.Attribute +WoofWare.Myriad.Plugins.JsonParseAttribute..ctor [constructor]: bool +WoofWare.Myriad.Plugins.JsonParseAttribute..ctor [constructor]: unit +WoofWare.Myriad.Plugins.JsonParseAttribute.DefaultIsExtensionMethod [static property]: [read-only] bool +WoofWare.Myriad.Plugins.JsonParseAttribute.get_DefaultIsExtensionMethod [static method]: unit -> bool +WoofWare.Myriad.Plugins.JsonSerializeAttribute inherit System.Attribute +WoofWare.Myriad.Plugins.JsonSerializeAttribute..ctor [constructor]: bool +WoofWare.Myriad.Plugins.JsonSerializeAttribute..ctor [constructor]: unit +WoofWare.Myriad.Plugins.JsonSerializeAttribute.DefaultIsExtensionMethod [static property]: [read-only] bool +WoofWare.Myriad.Plugins.JsonSerializeAttribute.get_DefaultIsExtensionMethod [static method]: unit -> bool +WoofWare.Myriad.Plugins.RemoveOptionsAttribute inherit System.Attribute +WoofWare.Myriad.Plugins.RemoveOptionsAttribute..ctor [constructor]: unit \ No newline at end of file diff --git a/WoofWare.Myriad.Plugins.Attributes/Test/TestSurface.fs b/WoofWare.Myriad.Plugins.Attributes/Test/TestSurface.fs new file mode 100644 index 0000000..4a68e62 --- /dev/null +++ b/WoofWare.Myriad.Plugins.Attributes/Test/TestSurface.fs @@ -0,0 +1,26 @@ +namespace WoofWare.Myriad.Plugins.Attributes.Test + +open NUnit.Framework +open WoofWare.Myriad.Plugins +open ApiSurface + +[] +module TestSurface = + let assembly = typeof.Assembly + + [] + let ``Ensure API surface has not been modified`` () = ApiSurface.assertIdentical assembly + + (* + [] + let ``Check version against remote`` () = + MonotonicVersion.validate assembly "WoofWare.Myriad.Plugins.Attributes" + *) + + [] + let ``Update API surface`` () = + ApiSurface.writeAssemblyBaseline assembly + + [] + let ``Ensure public API is fully documented`` () = + DocCoverage.assertFullyDocumented assembly diff --git a/WoofWare.Myriad.Plugins.Attributes/Test/WoofWare.Myriad.Plugins.Attributes.Test.fsproj b/WoofWare.Myriad.Plugins.Attributes/Test/WoofWare.Myriad.Plugins.Attributes.Test.fsproj new file mode 100644 index 0000000..ac31fae --- /dev/null +++ b/WoofWare.Myriad.Plugins.Attributes/Test/WoofWare.Myriad.Plugins.Attributes.Test.fsproj @@ -0,0 +1,25 @@ + + + + net8.0 + + false + true + + + + + + + + + + + + + + + + + + diff --git a/WoofWare.Myriad.Plugins.Attributes/WoofWare.Myriad.Plugins.Attributes.fsproj b/WoofWare.Myriad.Plugins.Attributes/WoofWare.Myriad.Plugins.Attributes.fsproj new file mode 100644 index 0000000..1194989 --- /dev/null +++ b/WoofWare.Myriad.Plugins.Attributes/WoofWare.Myriad.Plugins.Attributes.fsproj @@ -0,0 +1,38 @@ + + + + netstandard2.0 + true + Patrick Stevens + Copyright (c) Patrick Stevens 2024 + Attributes to accompany the WoofWare.Myriad.Plugins source generator, so that you need take no runtime dependencies to use them. + git + https://github.com/Smaug123/WoofWare.Myriad + MIT + README.md + myriad;fsharp;source-generator;source-gen;json + true + FS3559 + WoofWare.Myriad.Plugins.Attributes + logo.png + + + + + + + + True + \ + + + True + \ + + + + + + + + diff --git a/WoofWare.Myriad.Plugins.Attributes/version.json b/WoofWare.Myriad.Plugins.Attributes/version.json new file mode 100644 index 0000000..9c50a89 --- /dev/null +++ b/WoofWare.Myriad.Plugins.Attributes/version.json @@ -0,0 +1,7 @@ +{ + "version": "2.0", + "publicReleaseRefSpec": [ + "^refs/heads/main$" + ], + "pathFilters": null +} \ No newline at end of file diff --git a/WoofWare.Myriad.Plugins.Test/TestSurface.fs b/WoofWare.Myriad.Plugins.Test/TestSurface.fs index 4ec7782..4805643 100644 --- a/WoofWare.Myriad.Plugins.Test/TestSurface.fs +++ b/WoofWare.Myriad.Plugins.Test/TestSurface.fs @@ -6,7 +6,7 @@ open ApiSurface [] module TestSurface = - let assembly = typeof.Assembly + let assembly = typeof.Assembly [] let ``Ensure API surface has not been modified`` () = ApiSurface.assertIdentical assembly diff --git a/WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj b/WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj index 7117bd7..4a99cdf 100644 --- a/WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj +++ b/WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj @@ -27,7 +27,7 @@ - + diff --git a/WoofWare.Myriad.Plugins/HttpClientGenerator.fs b/WoofWare.Myriad.Plugins/HttpClientGenerator.fs index 24bf0d3..bebaaa8 100644 --- a/WoofWare.Myriad.Plugins/HttpClientGenerator.fs +++ b/WoofWare.Myriad.Plugins/HttpClientGenerator.fs @@ -8,13 +8,6 @@ open Fantomas.FCS.SyntaxTrivia open Fantomas.FCS.Xml open Myriad.Core -/// Attribute indicating a record type to which the "create HTTP client" Myriad -/// generator should apply during build. -/// This generator is intended to replicate much of the functionality of RestEase, -/// i.e. to stamp out HTTP REST clients from interfaces defining the API. -type HttpClientAttribute () = - inherit Attribute () - [] module internal HttpClientGenerator = open Fantomas.FCS.Text.Range diff --git a/WoofWare.Myriad.Plugins/InterfaceMockGenerator.fs b/WoofWare.Myriad.Plugins/InterfaceMockGenerator.fs index 307c2dc..12e0060 100644 --- a/WoofWare.Myriad.Plugins/InterfaceMockGenerator.fs +++ b/WoofWare.Myriad.Plugins/InterfaceMockGenerator.fs @@ -6,14 +6,6 @@ open Fantomas.FCS.SyntaxTrivia open Fantomas.FCS.Xml open Myriad.Core -/// Attribute indicating an interface type for which the "Generate Mock" Myriad -/// generator should apply during build. -/// This generator creates a record which implements the interface, -/// but where each method is represented as a record field, so you can use -/// record update syntax to easily specify partially-implemented mock objects. -type GenerateMockAttribute () = - inherit Attribute () - [] module internal InterfaceMockGenerator = open Fantomas.FCS.Text.Range diff --git a/WoofWare.Myriad.Plugins/JsonParseGenerator.fs b/WoofWare.Myriad.Plugins/JsonParseGenerator.fs index 6d1c56b..5f9a9eb 100644 --- a/WoofWare.Myriad.Plugins/JsonParseGenerator.fs +++ b/WoofWare.Myriad.Plugins/JsonParseGenerator.fs @@ -7,23 +7,6 @@ open Fantomas.FCS.SyntaxTrivia open Fantomas.FCS.Xml open Myriad.Core -/// Attribute indicating a record type to which the "Add JSON parse" Myriad -/// generator should apply during build. -/// The purpose of this generator is to create methods (possibly extension methods) of the form -/// `{TypeName}.jsonParse : System.Text.Json.Nodes.JsonNode -> {TypeName}`. -/// -/// If you supply isExtensionMethod = true, you will get extension methods. -/// These can only be consumed from F#, but the benefit is that they don't use up the module name -/// (since by default we create a module called "{TypeName}"). -type JsonParseAttribute (isExtensionMethod : bool) = - inherit Attribute () - - /// If changing this, *adjust the documentation strings* - static member internal DefaultIsExtensionMethod = false - - /// Shorthand for the "isExtensionMethod = false" constructor; see documentation there for details. - new () = JsonParseAttribute JsonParseAttribute.DefaultIsExtensionMethod - type internal JsonParseOutputSpec = { ExtensionMethods : bool diff --git a/WoofWare.Myriad.Plugins/JsonSerializeGenerator.fs b/WoofWare.Myriad.Plugins/JsonSerializeGenerator.fs index 75320b3..d9e80ee 100644 --- a/WoofWare.Myriad.Plugins/JsonSerializeGenerator.fs +++ b/WoofWare.Myriad.Plugins/JsonSerializeGenerator.fs @@ -7,23 +7,6 @@ open Fantomas.FCS.SyntaxTrivia open Fantomas.FCS.Xml open Myriad.Core -/// Attribute indicating a record type to which the "Add JSON serializer" Myriad -/// generator should apply during build. -/// The purpose of this generator is to create methods (possibly extension methods) of the form -/// `{TypeName}.toJsonNode : {TypeName} -> System.Text.Json.Nodes.JsonNode`. -/// -/// If you supply isExtensionMethod = true, you will get extension methods. -/// These can only be consumed from F#, but the benefit is that they don't use up the module name -/// (since by default we create a module called "{TypeName}"). -type JsonSerializeAttribute (isExtensionMethod : bool) = - inherit Attribute () - - /// If changing this, *adjust the documentation strings* - static member internal DefaultIsExtensionMethod = false - - /// Shorthand for the "isExtensionMethod = false" constructor; see documentation there for details. - new () = JsonSerializeAttribute JsonSerializeAttribute.DefaultIsExtensionMethod - type internal JsonSerializeOutputSpec = { ExtensionMethods : bool diff --git a/WoofWare.Myriad.Plugins/RemoveOptionsGenerator.fs b/WoofWare.Myriad.Plugins/RemoveOptionsGenerator.fs index 6d04e91..cd23521 100644 --- a/WoofWare.Myriad.Plugins/RemoveOptionsGenerator.fs +++ b/WoofWare.Myriad.Plugins/RemoveOptionsGenerator.fs @@ -1,17 +1,10 @@ namespace WoofWare.Myriad.Plugins -open System open Fantomas.FCS.Syntax open Fantomas.FCS.SyntaxTrivia open Fantomas.FCS.Xml open Myriad.Core -/// Attribute indicating a record type to which the "Remove Options" Myriad -/// generator should apply during build. -/// The purpose of this generator is to strip the `option` modifier from types. -type RemoveOptionsAttribute () = - inherit Attribute () - [] module internal RemoveOptionsGenerator = open Fantomas.FCS.Text.Range diff --git a/WoofWare.Myriad.Plugins/SurfaceBaseline.txt b/WoofWare.Myriad.Plugins/SurfaceBaseline.txt index 4c59f9d..8e2d6b3 100644 --- a/WoofWare.Myriad.Plugins/SurfaceBaseline.txt +++ b/WoofWare.Myriad.Plugins/SurfaceBaseline.txt @@ -1,22 +1,10 @@ -WoofWare.Myriad.Plugins.GenerateMockAttribute inherit System.Attribute -WoofWare.Myriad.Plugins.GenerateMockAttribute..ctor [constructor]: unit -WoofWare.Myriad.Plugins.HttpClientAttribute inherit System.Attribute -WoofWare.Myriad.Plugins.HttpClientAttribute..ctor [constructor]: unit WoofWare.Myriad.Plugins.HttpClientGenerator inherit obj, implements Myriad.Core.IMyriadGenerator WoofWare.Myriad.Plugins.HttpClientGenerator..ctor [constructor]: unit WoofWare.Myriad.Plugins.InterfaceMockGenerator inherit obj, implements Myriad.Core.IMyriadGenerator WoofWare.Myriad.Plugins.InterfaceMockGenerator..ctor [constructor]: unit -WoofWare.Myriad.Plugins.JsonParseAttribute inherit System.Attribute -WoofWare.Myriad.Plugins.JsonParseAttribute..ctor [constructor]: bool -WoofWare.Myriad.Plugins.JsonParseAttribute..ctor [constructor]: unit WoofWare.Myriad.Plugins.JsonParseGenerator inherit obj, implements Myriad.Core.IMyriadGenerator WoofWare.Myriad.Plugins.JsonParseGenerator..ctor [constructor]: unit -WoofWare.Myriad.Plugins.JsonSerializeAttribute inherit System.Attribute -WoofWare.Myriad.Plugins.JsonSerializeAttribute..ctor [constructor]: bool -WoofWare.Myriad.Plugins.JsonSerializeAttribute..ctor [constructor]: unit WoofWare.Myriad.Plugins.JsonSerializeGenerator inherit obj, implements Myriad.Core.IMyriadGenerator WoofWare.Myriad.Plugins.JsonSerializeGenerator..ctor [constructor]: unit -WoofWare.Myriad.Plugins.RemoveOptionsAttribute inherit System.Attribute -WoofWare.Myriad.Plugins.RemoveOptionsAttribute..ctor [constructor]: unit WoofWare.Myriad.Plugins.RemoveOptionsGenerator inherit obj, implements Myriad.Core.IMyriadGenerator WoofWare.Myriad.Plugins.RemoveOptionsGenerator..ctor [constructor]: unit \ No newline at end of file diff --git a/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj b/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj index 70154a3..2630e66 100644 --- a/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj +++ b/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj @@ -46,4 +46,8 @@ + + + + diff --git a/WoofWare.Myriad.Plugins/version.json b/WoofWare.Myriad.Plugins/version.json index 4e26454..958fb13 100644 --- a/WoofWare.Myriad.Plugins/version.json +++ b/WoofWare.Myriad.Plugins/version.json @@ -1,7 +1,7 @@ { - "version": "1.4", + "version": "2.0", "publicReleaseRefSpec": [ "^refs/heads/main$" ], "pathFilters": null -} \ No newline at end of file +} diff --git a/WoofWare.Myriad.sln b/WoofWare.Myriad.sln index 9e86b83..61d3d2b 100644 --- a/WoofWare.Myriad.sln +++ b/WoofWare.Myriad.sln @@ -6,6 +6,10 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WoofWare.Myriad.Plugins", " EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WoofWare.Myriad.Plugins.Test", "WoofWare.Myriad.Plugins.Test\WoofWare.Myriad.Plugins.Test.fsproj", "{EBFFA5D3-7F74-4824-8795-B6194E6FE0CB}" EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WoofWare.Myriad.Plugins.Attributes", "WoofWare.Myriad.Plugins.Attributes\WoofWare.Myriad.Plugins.Attributes.fsproj", "{17548737-9BAB-4B1E-B680-76D47C343AAC}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WoofWare.Myriad.Plugins.Attributes.Test", "WoofWare.Myriad.Plugins.Attributes\Test\WoofWare.Myriad.Plugins.Attributes.Test.fsproj", "{26DC0C94-85F2-45B4-8FA1-1B27201F7AFB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -24,5 +28,13 @@ Global {EBFFA5D3-7F74-4824-8795-B6194E6FE0CB}.Debug|Any CPU.Build.0 = Debug|Any CPU {EBFFA5D3-7F74-4824-8795-B6194E6FE0CB}.Release|Any CPU.ActiveCfg = Release|Any CPU {EBFFA5D3-7F74-4824-8795-B6194E6FE0CB}.Release|Any CPU.Build.0 = Release|Any CPU + {17548737-9BAB-4B1E-B680-76D47C343AAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {17548737-9BAB-4B1E-B680-76D47C343AAC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {17548737-9BAB-4B1E-B680-76D47C343AAC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {17548737-9BAB-4B1E-B680-76D47C343AAC}.Release|Any CPU.Build.0 = Release|Any CPU + {26DC0C94-85F2-45B4-8FA1-1B27201F7AFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {26DC0C94-85F2-45B4-8FA1-1B27201F7AFB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {26DC0C94-85F2-45B4-8FA1-1B27201F7AFB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {26DC0C94-85F2-45B4-8FA1-1B27201F7AFB}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/flake.nix b/flake.nix index e750d89..0ce2fc2 100644 --- a/flake.nix +++ b/flake.nix @@ -54,8 +54,8 @@ src = ./nix/fetchDeps.sh; pname = pname; binPath = pkgs.lib.makeBinPath [pkgs.coreutils dotnet-sdk (pkgs.nuget-to-nix.override {inherit dotnet-sdk;})]; - projectFiles = toString ["./WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj" "./ConsumePlugin/ConsumePlugin.fsproj"]; - testProjectFiles = ["./WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj"]; + projectFiles = toString ["./WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj" "./ConsumePlugin/ConsumePlugin.fsproj" "./WoofWare.Myriad.Plugins.Attributes/WoofWare.Myriad.Plugins.Attributes.fsproj"]; + testProjectFiles = ["./WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj" "./WoofWare.Myriad.Plugins.Attributes/Test/Woofware.Myriad.Plugins.Attributes.Test.fsproj"]; rids = pkgs.lib.concatStringsSep "\" \"" runtimeIds; packages = dotnet-sdk.packages; storeSrc = pkgs.srcOnly { diff --git a/nix/deps.nix b/nix/deps.nix index 693c2f9..f2cfd8c 100644 --- a/nix/deps.nix +++ b/nix/deps.nix @@ -13,8 +13,8 @@ }) (fetchNuGet { pname = "ApiSurface"; - version = "4.0.27"; - sha256 = "sha256-slhnqGc/oCX1PTndYbEn1Z0ImsUKd8mfTUBejz50NSg="; + version = "4.0.28"; + sha256 = "1gg0dqbgbb8aqn2lxi5gf2wq969kgskby5wph6m2b3hdkz7265ak"; }) (fetchNuGet { pname = "coverlet.collector"; @@ -36,6 +36,11 @@ version = "2.16.6"; sha256 = "176rwky6b5rk8dzldiz4068p7m9c5y9ygzbhadrs14jkl94pc56n"; }) + (fetchNuGet { + pname = "FSharp.Core"; + version = "4.3.4"; + sha256 = "1sg6i4q5nwyzh769g76f6c16876nvdpn83adqjr2y9x6xsiv5p5j"; + }) (fetchNuGet { pname = "FSharp.Core"; version = "6.0.1"; @@ -116,11 +121,21 @@ version = "8.0.0"; sha256 = "0055f69q3hbagqp8gl3nk0vfn4qyqyxsxyy7pd0g7wm3z28byzmx"; }) + (fetchNuGet { + pname = "Microsoft.CodeCoverage"; + version = "17.6.0"; + sha256 = "02s98d8nwz5mg4mymcr86qdamy71a29g2091xg452czmd3s3x2di"; + }) (fetchNuGet { pname = "Microsoft.CodeCoverage"; version = "17.8.0"; sha256 = "173wjadp3gan4x2jfjchngnc4ca4mb95h1sbb28jydfkfw0z1zvj"; }) + (fetchNuGet { + pname = "Microsoft.NET.Test.Sdk"; + version = "17.6.0"; + sha256 = "1bnwpwg7k72z06027ip4yi222863r8sv14ck9nj8h64ckiw2r256"; + }) (fetchNuGet { pname = "Microsoft.NET.Test.Sdk"; version = "17.8.0"; @@ -236,6 +251,11 @@ version = "8.0.1"; sha256 = "198576cdkl72xs29zznff9ls763p8pfr0zji7b74dqxd5ga0s3bd"; }) + (fetchNuGet { + pname = "Microsoft.NETCore.Platforms"; + version = "1.1.0"; + sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; + }) (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.1"; @@ -261,11 +281,21 @@ version = "8.0.0"; sha256 = "1gdx7n45wwia3yvang3ls92sk3wrymqcx9p349j8wba2lyjf9m44"; }) + (fetchNuGet { + pname = "Microsoft.TestPlatform.ObjectModel"; + version = "17.6.0"; + sha256 = "1rz22chnis11dwjrqrcvvmfw80fi2a7756a7ahwy6jlnr250zr61"; + }) (fetchNuGet { pname = "Microsoft.TestPlatform.ObjectModel"; version = "17.8.0"; sha256 = "0b0i7lmkrcfvim8i3l93gwqvkhhhfzd53fqfnygdqvkg6np0cg7m"; }) + (fetchNuGet { + pname = "Microsoft.TestPlatform.TestHost"; + version = "17.6.0"; + sha256 = "16vpicp4q2kbpgr3qwpsxg7srabxqszx23x6smjvvrvz7qmr5v8i"; + }) (fetchNuGet { pname = "Microsoft.TestPlatform.TestHost"; version = "17.8.0"; @@ -286,6 +316,16 @@ version = "3.6.133"; sha256 = "1cdw8krvsnx0n34f7fm5hiiy7bs6h3asvncqcikc0g46l50w2j80"; }) + (fetchNuGet { + pname = "NETStandard.Library"; + version = "2.0.0"; + sha256 = "1bc4ba8ahgk15m8k4nd7x406nhi0kwqzbgjk2dmw52ss553xz7iy"; + }) + (fetchNuGet { + pname = "NETStandard.Library"; + version = "2.0.3"; + sha256 = "1fn9fxppfcg4jgypp2pmrpr6awl3qz1xmnri0cygpkwvyx27df1y"; + }) (fetchNuGet { pname = "Newtonsoft.Json"; version = "13.0.1"; @@ -306,6 +346,11 @@ version = "6.8.0"; sha256 = "0x03p408smkmv1gv7pmvsia4lkn0xaj4wfrkl58pjf8bbv51y0yw"; }) + (fetchNuGet { + pname = "NuGet.Frameworks"; + version = "5.11.0"; + sha256 = "0wv26gq39hfqw9md32amr5771s73f5zn1z9vs4y77cgynxr73s4z"; + }) (fetchNuGet { pname = "NuGet.Frameworks"; version = "6.5.0"; @@ -331,11 +376,21 @@ version = "6.8.0"; sha256 = "1sd25h46fd12ng780r02q4ijcx1imkb53kj1y2y7cwg5myh537ks"; }) + (fetchNuGet { + pname = "NUnit"; + version = "3.13.3"; + sha256 = "0wdzfkygqnr73s6lpxg5b1pwaqz9f414fxpvpdmf72bvh4jaqzv6"; + }) (fetchNuGet { pname = "NUnit"; version = "4.0.1"; sha256 = "0jgiq3dbwli5r70j0bw7021d69r7bhr58s8kphlpjmf7k47l5pcd"; }) + (fetchNuGet { + pname = "NUnit3TestAdapter"; + version = "4.2.1"; + sha256 = "0gildh4xcb6gkxcrrgh5a1j7lq0a7l670jpbs71akl5b5bgy5gc3"; + }) (fetchNuGet { pname = "NUnit3TestAdapter"; version = "4.5.0";