Comments (4)
Hi @isaacabraham - This is by design - CLIEvent only applies to property members, see See 8.13.10 of http://fsharp.org/specs/language-spec/. Perhaps add a suggestion at http://fslang.uservoice.com to suggest that the attribute also applies to module values?
from fsharp.
@dsyme yes, will do - it would certainly be a useful feature for when a module alone would suffice.
It might be worth mentioning this somewhere because I've spoken with a few people that thought that this was the expected behaviour :-)
from fsharp.
I suppose our belief was that "global" static events were very rare in library design. Perhaps not.
In any case please add a link to the user voice entry once you add it.
from fsharp.
Sometimes it's handy if you have a module with some functionality, which are exposed nicely in C# - events round off the story nicely. To be honest, I'd not mind either way - either a compiler warning or error, or to allow it.
Linked to UV request: http://fslang.uservoice.com/forums/245727-f-language/suggestions/6984621-support-for-clievent-on-modules
from fsharp.
Related Issues (20)
- [Automated] PRs inserted in VS build 20240610.19
- IsUnionCaseTester throwing an error
- Tracking issue - improve FSI debugging
- Visual Studio selects the highest version of the sdk installed on the machine when executing scripts in FSI HOT 5
- We should disable the --multiemit[+/-] switch in fsi. HOT 1
- [Automated] PRs inserted in VS build main-35014.15
- Clean - build -pack fails
- [Automated] PRs inserted in VS build feature.debugger.main-35014.68
- F# discriminated unions simple use raises AOT and trimming warnings on publish. HOT 3
- [Automated] PRs inserted in VS build main-35018.33
- Fix or remove legacy VS tests HOT 4
- [Automated] PRs inserted in VS build feature.debugger.main-35020.110
- Module suffix is visible in VS tooltips
- Minimize the number of desktop-only compiler service tests HOT 4
- .NET9.0 mono VMR source-build fails to build "fsharp" on Fedora on s390x HOT 4
- Unify exceptions for out of bounds conditions in core functions HOT 2
- .NET Framework test runs are _super_ slow in CI HOT 2
- F# using lazy keyword raises trimming warnings on publish. HOT 1
- F# using try .. with .. inside sequence expression raises trimming warning on publish. HOT 7
- `PublishTrimmed` or `PublishAot` should imply `ReflectionFree` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fsharp.