GithubHelp home page GithubHelp logo

lein-count's People

Contributors

ah45 avatar aiba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lein-count's Issues

"Illegal/unsupported escape sequence" when run on Windows

When running on Windows lein count fails with an "illegal/unsupported escape sequence" which seems to be caused by using an unescaped path as part of a regular expression.

The stack trace is:

java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near index 4
^C:\Users\username\path\to\project/
    ^
 at java.util.regex.Pattern.error (Pattern.java:1955)
    java.util.regex.Pattern.escape (Pattern.java:2471)
    java.util.regex.Pattern.atom (Pattern.java:2198)
    java.util.regex.Pattern.sequence (Pattern.java:2130)
    java.util.regex.Pattern.expr (Pattern.java:1996)
    java.util.regex.Pattern.compile (Pattern.java:1696)
    java.util.regex.Pattern.<init> (Pattern.java:1351)
    java.util.regex.Pattern.compile (Pattern.java:1028)
    clojure.core$re_pattern.invokeStatic (core.clj:4665)
    clojure.core$re_pattern.invoke (core.clj:4657)
    aiba.lein_count.core$relative_path_str.invokeStatic (core.clj:26)
    aiba.lein_count.core$relative_path_str.invoke (core.clj:20)
    leiningen.count$count$fn__1671.invoke (count.clj:66)

Doesn't work when there is no test directory

Just tried in different projects I have cloned locally and stumbled a problem when checking my local copy of the sente library:

$ lein count
File or directory not found: test

Pretty sure this is not intended.

No such var: lcp/resolve-managed-dependencies

clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: No such var: lcp/resolve-managed-dependencies, compiling:(leiningen/count.clj:38:18)

Leiningen 2.6.1 on Java 1.8.0_122 OpenJDK 64-Bit Server VM
In any project, it occured.

CompilerException

Hello,

I was exited about the number in my project but alas, this error was thrown.

clojure.lang.Compiler$CompilerException: java.lang.IllegalStateException: read-regex already refers to: #'clojure.tools.reader.impl.commons/read-regex in namespace: aiba.lein-count.constant-wrapping-reader, compiling:(aiba/lein_count/constant_wrapping_reader.clj:134:1)
 at clojure.lang.Compiler.analyzeSeq (Compiler.java:6730)
    clojure.lang.Compiler.analyze (Compiler.java:6524)
    clojure.lang.Compiler.analyze (Compiler.java:6485)
    clojure.lang.Compiler.eval (Compiler.java:6786)
    clojure.lang.Compiler.load (Compiler.java:7227)
    clojure.lang.RT.loadResourceScript (RT.java:371)
    clojure.lang.RT.loadResourceScript (RT.java:362)
    clojure.lang.RT.load (RT.java:446)
    clojure.lang.RT.load (RT.java:412)
    clojure.core$load$fn__5448.invoke (core.clj:5866)
    clojure.core$load.doInvoke (core.clj:5865)
    clojure.lang.RestFn.invoke (RestFn.java:408)
    clojure.core$load_one.invoke (core.clj:5671)
    clojure.core$load_lib$fn__5397.invoke (core.clj:5711)
    clojure.core$load_lib.doInvoke (core.clj:5710)
    clojure.lang.RestFn.applyTo (RestFn.java:142)
    clojure.core$apply.invoke (core.clj:632)
    clojure.core$load_libs.doInvoke (core.clj:5749)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invoke (core.clj:632)
    clojure.core$require.doInvoke (core.clj:5832)
    clojure.lang.RestFn.invoke (RestFn.java:551)
    aiba.lein_count.core$eval607$loading__5340__auto____608.invoke (core.clj:1)
    aiba.lein_count.core$eval607.invoke (core.clj:1)

No such var: lcp/resolve -managed-dependencies,

lein version 2.6.2
'''
Retrieving lein-count/lein-count/1.0.7/lein-count-1.0.7.jar from clojars
clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: No such var: lcp/resolve
-managed-dependencies, compiling:(leiningen/count.clj:38:18)

'''
lein upgrade 2.7.1 ok :)

pre vs post macro expansion counting

I have the following file:

(ns foo.bar
  (:require [cljs.spec :as s]))

When running lein count :by-file some-folder/

I get the following output (only showing the relevant line):

| cljs | src/foo/bar.cljs                          |             2 |    45 |

The line count is correct, but the node count is way to high. I guess this is true after macro expansion, but shouldn't the node count be pre-expansion?

Unable to resolve symbol

Hi Aaron,

This plugin sound like it would be useful at times. I tried using it, however, and ran into this:

clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Unable to resolve symbol: second' in this context, compiling:(aiba/lein_count/constant_wrapping_reader.clj:772:19)

Same error in different projects when running lein count. Maybe you can have a look what could be the issue.

Cheers,
Matthias

"read-regex already refers to: #'clojure.tools.reader.impl.commons/read-regex"

I got this problem when attempting to run the plugin.

clojure.lang.Compiler$CompilerException: java.lang.IllegalStateException: read-regex already refers to: #'clojure.tools.reader.impl.commons/read-regex in namespace: aiba.lein-count.constant-wrapping-reader, compiling:(aiba/lein_count/constant_wrapping_reader.clj:134:1)

Looks like a dependency issue that could be solved by not using :refer :all. Not sure why I've hit this problem when others haven't.

:artifact should work without version

... and find the latest version avaible, just like lein-ancient.

;; explicit version
lein count :artifact metosin/spec-tools 0.2.0

;; without version finds the latest version (0.2.0)
lein count :artifact metosin/spec-tools 

nice lib!

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.