Can the dependency on JetBrains.Annotations be removed? #216
-
Since this is such a low level library, it seems a little weird to me that this has a third party dependency. It would be nice to be able to reference this package in our core code, and not be pulling in a version of Annotations dictated by this package. JetBrains themselves seem to recommend not referencing Annotations in open-source code (see How to add section). From a quick scan of the GuardClauses code, it didn't seem to be integral to the functionality. Is it possible that the dependency could be removed? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Yes I think it could be removed. I'll create an issue for now to track it. |
Beta Was this translation helpful? Give feedback.
-
Hi! Thank you. |
Beta Was this translation helpful? Give feedback.
-
I'm a bit confused here. It looks to me like helpful functionality was removed due to a misunderstanding. Rather than remove the annotations, they should have been copied into the source code and marked as The referenced article does not "recommend not referencing Annotations in open-source code" at all. If anything, it gives instructions on how to do it correctly. On the other hand, this article has the statement I believe @FriedLychees misunderstood:
Referencing a binary dependency on
The functionality that was removed is not super critical to the package (the built-in nullability annotations are good enough). But it was nice for those who use Rider and/or ReSharper.
|
Beta Was this translation helpful? Give feedback.
-
Yeah I think I agree. Most of the JetBrains stuff has been happening through community contributions since I don't use ReSharper any longer and am not a Rider user, either. @nseguin42 would you mind creating a new issue (or issues) with specific annotations you would want to see added (back) in and I'll work on that or perhaps we can get community pull requests for them? Maybe it makes sense to include the copy/pasted attribute in the issue description for attributes that should be included in the project. |
Beta Was this translation helpful? Give feedback.
Yes I think it could be removed. I'll create an issue for now to track it.