-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Whippet #282
base: main
Are you sure you want to change the base?
Use Whippet #282
Conversation
<CurriedNoAttr>GenerateMock</CurriedNoAttr> | ||
<TypeWithInterfaceNoAttr>GenerateMock</TypeWithInterfaceNoAttr> | ||
</MyriadParams> | ||
<WhippetFile>MockExampleNoAttributes.fs</WhippetFile> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the choice to flatten these params, because the contents of this XML node are presented through msbuild only as a string, not as an XML node!
</Compile> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="RestEase" Version="1.6.4"/> | ||
<ProjectReference Include="..\WoofWare.Myriad.Plugins.Attributes\WoofWare.Myriad.Plugins.Attributes.fsproj" /> | ||
<ProjectReference Include="..\WoofWare.Myriad.Plugins\WoofWare.Myriad.Plugins.fsproj" PrivateAssets="all" /> | ||
<PackageReference Include="Myriad.Sdk" Version="0.8.3" PrivateAssets="all" /> | ||
<ProjectReference Include="..\WoofWare.Myriad.Plugins\WoofWare.Myriad.Plugins.fsproj" PrivateAssets="all" WhippetPlugin="true" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now all you need to do is add WhippetPlugin="true"
and that's all the plugin registration done.
@@ -47,6 +47,7 @@ | |||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1"/> | |||
<PackageReference Include="NUnit" Version="4.2.2"/> | |||
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0"/> | |||
<PackageReference Include="RestEase" Version="1.6.4"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dunno why this transitive reference became required.
interface IMyriadGenerator with | ||
member _.ValidInputExtensions = [ ".fs" ] | ||
interface IGenerateRawFromRaw with | ||
member _.GenerateRawFromRaw (context : RawSourceGenerationArgs) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the most basic API on which all other APIs are built. I intend adding optional convenience APIs on top, eventually, but this API shape is how we get the most modular design (which e.g. allows the consumer to freely upgrade Fantomas).
Proof-of-concept of what it looks like to use Whippet instead of Myriad.