myriad icon indicating copy to clipboard operation
myriad copied to clipboard

How to use this goodness from my project?

Open Zaid-Ajaj opened this issue 6 years ago • 4 comments

I am looking around the repo and I not entirely sure how to use this in my project.

I see that Myriad.Sdk is available as a nuget package which I I can install and add to my project's (.fsproj) file, along with that I give it the input file that contains the type definitions and the path of the output file where the generated code will be located.

However, what confuses me is where do I write the code that converts the input file and generates the output file?

Zaid-Ajaj avatar Jun 07 '19 14:06 Zaid-Ajaj

I haven't had time to dig into this either and would love to know. I want to generate some F# code!

ctaggart avatar Jun 07 '19 18:06 ctaggart

https://github.com/7sharp9/myriad/blob/master/test/Myriad.IntegrationTests/Myriad.IntegrationTests.fsproj#L14-L17

The input is specified as <MyriadFile>..\..\src\Example\Library.fs</MyriadFile> the output file is <Compile Include="Generated2.fs" >

7sharp9 avatar Jun 07 '19 18:06 7sharp9

How do you specify the file that is going the transform, the creation of the AST?

I just made another pass through https://7sharp9.github.io/2019/04/24/2019-04-24-applied-metaprogramming-with-myriad/ but am too tired right now to thing straight. This is very exciting though!

ctaggart avatar Jun 07 '19 18:06 ctaggart

Sorry Ive not replied I never got notifications.

Transforms are not pluggable yet, all this needs is an extra proper to two in the config so you can specify a dll to do the transform.

7sharp9 avatar Oct 01 '19 11:10 7sharp9

Closing as this is an old issue with no real resolution apart from reading the docs that exist and the examples.

7sharp9 avatar Apr 05 '23 21:04 7sharp9