Comments (7)
My suggestion is to use the #warning pragma to display a compile time warning as well as XML documentation on the method.
from riak-dotnet-client.
I was hoping that there'd be some compile-time attribute I could just decorate it with, but it appears such a beast doesn't exist!
I'm not sure how you can get a warning to appear at the call site unless you use something like the ObsoleteAttribute. Easy to do inside CI because we wrote that, but not so much where someone writes client.ListKeys(...);
in their own code.
Thoughts?
from riak-dotnet-client.
One option is to use PostSharp, but I'm not sure I'm keen on the idea of pulling an AOP utility in and increasing build times just for the sake of getting this coverage. We may just have to spit out text to the debugger and console and have docs in the XML tags.
from riak-dotnet-client.
Given the choice between AOP and using #if DEBUG to emit
Console.WriteLine("DANGER, WILL ROBINSON"), I'll fly to Brisbane to
convince you why #if DEBUG is less of a PITA. The ObsoleteAttribute doesn't
seem to be picked up correctly in MonoDevelop 3.0.4.7, either, so some kind
of forcible emit is going to be better. The ConditionalAttribute1 may
present a solid approach, too.
Jeremiah Peschka
Founder, Brent Ozar Unlimited
On Sat, Nov 10, 2012 at 2:14 PM, OJ Reeves [email protected] wrote:
One option is to use PostSharp, but I'm not sure I'm keen on the idea of
pulling an AOP utility in and increasing build times just for the sake of
getting this coverage. We may just have to spit out text to the debugger
and console and have docs in the XML tags.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-10260554.
from riak-dotnet-client.
Pack your bags and book your ticket, because #if DEBUG
and ConditionalAttribute
are compiled out in release mode builds. We ship release builds to Nuget.
Unless you're suggesting shipping debug builds via Nuget (which we won't be doing :)) we're going to have to look at something else. To be honest, I don't think conditional stuff is required. We output stuff to debug/console/whatever when the user calls those APIs no matter what. If devs keep those calls in after pushing to production then they're going to have bigger issues than stray output to a console.
Cheers man.
from riak-dotnet-client.
Damn you and your logic!
Let's just throw an Exception instead. Or trace/debug/console write on each
call.
Jeremiah Peschka, Managing Director, Brent Ozar PLF, LLC
Microsoft SQL Server MVP
On Nov 10, 2012, at 7:19 PM, OJ Reeves [email protected] wrote:
Pack your bags and book your ticket, because #if DEBUG and
ConditionalAttribute are compiled out in release mode builds. We ship
release builds to Nuget.
Unless you're suggesting shipping debug builds via Nuget (which we won't be
doing :)) we're going to have to look at something else. To be honest, I
don't think conditional stuff is required. We output stuff to
debug/console/whatever when the user calls those APIs no matter what. If
devs keep those calls in after pushing to production then they're going to
have bigger issues than stray output to a console.
Cheers man.
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/49#issuecomment-10262786.
from riak-dotnet-client.
Trace/Debug/Console write done on each call.
from riak-dotnet-client.
Related Issues (20)
- Issue with health check / node selection HOT 2
- No results found yields IsSuccess == false HOT 1
- Compiling under Mono breaks stuff HOT 1
- Default value for deletedvclock
- RiakClient.Delete Bug HOT 5
- Riak TS support
- Nodes are not marked Offline for a failed GET request HOT 10
- Riak client does not support the use of a load balancer HOT 14
- The "externalLoadBalancer" doesn't take multiple-load balancer scenarios into account HOT 2
- RiakClient.Delete issue [JIRA: CLIENTS-898] HOT 3
- Don't lose original error when returning "ClusterOffline"
- Update riak_pb submodule when tagged
- Optional fields with default values in PB messages
- Upon save/update failure - no way to get Id
- Target .NET Standard
- Revamp publish process
- Riak TS - when rpberrorresp is returned, text is unavailable HOT 1
- Fluent connection configuration ? HOT 2
- System.configuration could not be resolved HOT 1
- Add warning and safety mechanism to prevent unintentional list [buckets | keys] operations
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 riak-dotnet-client.