fsprojects / Chessie

Railway-oriented programming for .NET
http://fsprojects.github.io/Chessie/
The Unlicense
188 stars 43 forks source link

Using extensions from VB.net #38

Closed kellerd closed 8 years ago

kellerd commented 8 years ago

Forked the repository here: https://github.com/kellerd/Chessie

Tried to get Extensions working in .NET.

Added a test project for it: https://github.com/kellerd/Chessie/tests/Chessie.VisualBasic.Test/Chessie.VisualBasic.Test.vbproj

The easiest fix I found was to add [<assembly: ExtensionAttribute()>] to Assembly.fs and include it into the fs project.

Ran into an issue when using FAKE, where it won't let me add an attribute in your genFSAssemblyInfo section without specifying parameters to the attribute.

I added an issue to FAKE in the mean time, maybe it'll get some traction, to add the feature https://github.com/fsharp/FAKE/issues/1115, before I try to create a PR myself

Original problem: https://github.com/kellerd/Chessie/tree/master

Potential fix: https://github.com/kellerd/Chessie/tree/Intermediatefix

Unless someone has come across this before or has more experience with it.

mexx commented 8 years ago

Hmm, according to the documentation of the ExtensionAttribute, see the Remarks section, it's actually should be automatically done by the compiler. I don't know whether it's worth an issue on visualfsharp.

mexx commented 8 years ago

@dsyme can you have a look at this?

kellerd commented 8 years ago

Looks like @dsyme has done some looking https://github.com/Microsoft/visualfsharp/issues/101

kellerd commented 8 years ago

Have a PR as a work around, guys at FAKE found the option I was missing.