Comments (9)
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.
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.
I think it would make sense.
from cli-matic.
You want to submit a PR or you want to wait for me to de-instrument?
from cli-matic.
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.
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.
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.
I think that version 0.2.0 is out now. Try it!
from cli-matic.
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)
- Do not dump stack trace on mistyped subcommand HOT 3
- [Ftr] dd sysexit codes
- Return value from `(doall ...)` causes `getReturnValue` to throw
- clj -m raises warning
- [Ftr] Flag to not run System/Exit HOT 5
- :default values for :jsonfile options do not parse files
- [Ftr] Babashka: avoid external bb.edn file HOT 2
- Glob multiple position arguments
- Update all dependencies but CLJ
- [Ftr] Snappier scripts with tiered compilation
- :multiple does not work with :default HOT 4
- [Ftr] Support repetition for flags ? e.g. ansible style verbose: -v / -vv / -vvv HOT 1
- [Ftr] Generate a basic UI for calling the application based on cli-matic configuration HOT 1
- [Ftr] Ability to extend type presets, like `:file` for conforming the arg to `File`
- [Ftr] Ability to *disable* -? gloabl help HOT 1
- cli-matic can enable global spec instrumentation under inappropriate circumstances HOT 2
- Returning lazy sequences from :runs throws - IPending is not IDeref HOT 1
- Update tools.cli to 1.0.219 HOT 1
- Remove contributors from README HOT 1
- [Ftr]Run functions for both a command and its subcommands? HOT 2
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 cli-matic.