Code Monkey home page Code Monkey logo

Comments (7)

peschkaj avatar peschkaj commented on July 18, 2024

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.

OJ avatar OJ commented on July 18, 2024

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.

OJ avatar OJ commented on July 18, 2024

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.

peschkaj avatar peschkaj commented on July 18, 2024

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.

OJ avatar OJ commented on July 18, 2024

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.

peschkaj avatar peschkaj commented on July 18, 2024

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.

OJ avatar OJ commented on July 18, 2024

Trace/Debug/Console write done on each call.

from riak-dotnet-client.

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.