GithubHelp home page GithubHelp logo

Comments (9)

l3nz avatar l3nz commented on September 21, 2024

Hi Martin, I thought it would only instrument the current namespace? but maybe I was wrong. MAybe there is away to only instrument the current ns? Or other things that are better than just putting an ; before?

(BTW, building docs breaks, so I had to go back to Github - https://circleci.com/gh/martinklepsch/cljdoc-builder/6870 )

from cli-matic.

martinklepsch avatar martinklepsch commented on September 21, 2024

I think you can supply a list of vars to instrument to the instrument function.

That Orchestra build is failing is a known issue that requires some changes to the CLJS analysis code (cljdoc/cljdoc#201).

from cli-matic.

l3nz avatar l3nz commented on September 21, 2024

I think it would make sense.

from cli-matic.

l3nz avatar l3nz commented on September 21, 2024

You want to submit a PR or you want to wait for me to de-instrument?

from cli-matic.

martinklepsch avatar martinklepsch commented on September 21, 2024

Here's a list of symbols that could be passed to instrument:

['mk-cli-option 'get-subcommand 'all-subcommands-aliases
'all-subcommands 'canonicalize-subcommand 'rewrite-opts
'list-positional-parms 'a-positional-parm 'capture-positional-parms
'generate-global-command-list 'generate-global-help
'generate-subcmd-help 'mkError 'parse-single-arg
'errors-for-missing-mandatory-args 'mk-fake-args
'parse-cmds-with-defaults 'check-one-spec 'check-specs-on-parameters
'check-specs-on-parsed-args 'parse-cmds 'assert-unique-values
'assert-cfg-sanity '->RV]

Won't prepare a PR for now but maybe this helps. Also it might be better to just tackle #22 instead.

from cli-matic.

l3nz avatar l3nz commented on September 21, 2024

My problem is maybe wrongly stated: I would like not to have a special way to know if I'm developing (and I want Orchestra there) or not. By including (orchestra/instrument) in the namespace, I mean to re-instrument everything on reload - I do a change, CMD+SHIFT+M, and it's already there... I do not necessarily want it in production. But how do we handle this case? that's where #22 came from.

Maybe as a stopgap we could do (instrument (list-all-fns-in-current-ns)), but my real issue is the one above. Listing all fns in the namespace should be trivial anyway - see https://stackoverflow.com/questions/2747294/how-to-list-the-functions-of-a-namespace

from cli-matic.

l3nz avatar l3nz commented on September 21, 2024

Stoopid me - we could have a fn that checks if Orchestra is present, and instrument is it's there, and just do nothing if it's not on the classpath. This would probably be even better.

from cli-matic.

l3nz avatar l3nz commented on September 21, 2024

I think that version 0.2.0 is out now. Try it!

from cli-matic.

martinklepsch avatar martinklepsch commented on September 21, 2024

The changes will still instrument all instrumentable functions which I think could be surprising to users of this library. It might still be worth considering something like (instrument (list-all-fns-in-current-ns)).

from cli-matic.

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.