Git Product home page Git Product logo

Comments (3)

kkm000 avatar kkm000 commented on August 15, 2024

Exactly. I am not aware of any existing infrastructure that would let you do that. You can technically do

<PackageReference .... PrivateAssets="All" />

and then package the dll (and FSharp.Core too!) from the build directory into a single nuget, but I do not see what exactly does it achieve.

from fslexyacc.

kkm000 avatar kkm000 commented on August 15, 2024

Note that you need to manually add PrivateAssets="All" to FsLexYacc compilers package always, because otherwise it will be listed as a dependency in the generated NuGet. There is a bug tracking that: NuGet/Home#4125 -- looks like it is marked as fixed, but I have no idea whether it was rolled out. So at the very least, check that the stanza is there.

As for the .Runtime package, I do not really understand what would copying the DLLs achieve, really. Depending on it is a pretty normative practice (it will pull the FSharp.Core transitively, too, and let NuGet unify references in the project using your package. Otherwise, if you package the runtime and Core into your project, you'll likely end with (1) a clash of DLLs copied to its bin directory and (b) no autogenerated binding redirects. So I would advise against that pretty strongly.

Did it answer your question? Can we close this? Or please explain what do you have in mind exactly.

from fslexyacc.

nshibano avatar nshibano commented on August 15, 2024

I'm fine to close this. I posted this because I think this information is useful.

In my opinion, using FsLex.exe and FsYacc.exe as a command line utility, not as library, is more understandable.

The workflow with custom MSBuild XML file is easy to use but not understandable. When it doesn't work as expected, it is difficult to debug, since I have zero knowledge about MSBuild XML.

Also, the FsLexYacc.Runtime is pretty small and embedding it to generated source file will be useful.

But anyway I can manually do it by following above steps. In my projects with this workflow, lexer/parser table .fs source files (generated) and lexer/parser runtime .fs source files (copied from this repository) are only regular F# source files and doesn't create dependency to particular FSharp.Core version. This workflow only requires knowledge about F#.

from fslexyacc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.