GithubHelp home page GithubHelp logo

deps-library's People

Contributors

mhuebert 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

Watchers

 avatar  avatar  avatar

deps-library's Issues

pom should respect optional dependencies

My library has an optional dependency, that is, a dependency that is only needed when users need a specific part of the library. (Note that this is different from a "scope provided" dependency, which is always needed. Here is one explanation of the difference.) I would like to mark this dependency appropriately in my pom.xml, so that it isn't transitively included in my users' dependency trees unless they need it.

As of tools.deps.alpha 0.9.745 there is a way to specify this type of dependency. You add the dependency as a regular entry in :deps, with an additional :optional true flag. Then, when you run clojure -Spom, the dependency is marked as <optional>true</optional> in the pom. However, deps-library depends on garamond 0.4.0, which in turn depends on tools.deps.alpha 0.5.460. Therefore deps-library doesn't add the optional tag, and in fact strips it out if it already exists.

So, I'd like to request that you coordinate with garamond to update to a more recent version of tools.deps.alpha. It looks like a bump of tools.deps.alpha has already been committed, but that commit hasn't been released. I'll reach out to garamond as well to request that they release a new version of their library.

Thanks for your work making deps.edn libraries work with Clojars—it's a really fiddly business.

do we need a :description field?

Saw that in my old pom.xml when I tried to migrate.

  <description>xxx DSL in ClojureScript.</description>

Guess it is useful on Clojars.

github action cannot find tag

I am trying to switch from lein to clj deps
deps-library works for my local machine.
But in github actions it cannot find the git tag:

Warning: lein-git-version git exited 128
{:exit 128, :out "", :err "fatal: No names found, cannot describe anything.\n"}
Execution error (ExceptionInfo) at applied-science.deps-library/fail! (deps_library.clj:37).
No version specified. Add a starting tag (eg. git tag v0.1.0), pass a --version argument, or include a :version in release.edn.

This is my library:
https://github.com/clojure-quant/trateg

on error messages

Trying with an new repo, zero commits:

=>> clj -A:release
Downloading: org/clojure/clojure/maven-metadata.xml from https://repo.clojars.org/
Downloading: org/clojure/clojure/maven-metadata.xml from https://repo1.maven.org/maven2/
Downloading: com/cemerick/pomegranate/maven-metadata.xml from https://repo1.maven.org/maven2/
Warning: lein-git-version git exited 128
{:exit 128, :out "", :err "fatal: No names found, cannot describe anything.\n"}

Warning: lein-git-version git exited 128
{:exit 128, :out "", :err "fatal: No names found, cannot describe anything.\n"}

POM... minimal-xyz/minimal-cljs-deploy {:mvn/version "0.0.1"}
20-03-14 04:14:39 ChenYongs-MacBook.local ERROR [garamond.git:15] - Command 'git log -1 --format=%H' returned 128!
20-03-14 04:14:39 ChenYongs-MacBook.local ERROR [garamond.git:19] - stderr: fatal: your current branch 'master' does not have any commits yet
Execution error (ExceptionInfo) at garamond.util/exit (util.clj:11).
Exit condition

Full report at:
/var/folders/08/4fbsxdlx1pdbmlgsbqg3ss3m0000gn/T/clojure-8109055626477454885.edn
=>>
{:clojure.main/message
 "Execution error (ExceptionInfo) at garamond.util/exit (util.clj:11).\nExit condition\n",
 :clojure.main/triage
 {:clojure.error/class clojure.lang.ExceptionInfo,
  :clojure.error/line 11,
  :clojure.error/cause "Exit condition",
  :clojure.error/symbol garamond.util/exit,
  :clojure.error/source "util.clj",
  :clojure.error/phase :execution},
 :clojure.main/trace
 {:via
  [{:type clojure.lang.ExceptionInfo,
    :message "Exit condition",
    :data {:code 128, :message nil},
    :at [garamond.util$exit invokeStatic "util.clj" 11]}],
  :trace
  [[garamond.util$exit invokeStatic "util.clj" 11]
   [garamond.util$exit invoke "util.clj" 3]
   [garamond.util$exit invokeStatic "util.clj" 9]
   [garamond.util$exit invoke "util.clj" 3]
   [garamond.git$handle_error invokeStatic "git.clj" 20]
   [garamond.git$handle_error invoke "git.clj" 14]
   [garamond.git$run_git_command invokeStatic "git.clj" 31]
   [garamond.git$run_git_command invoke "git.clj" 22]
   [garamond.git$run_git_command invokeStatic "git.clj" 24]
   [garamond.git$run_git_command invoke "git.clj" 22]
   [garamond.git$current_sha invokeStatic "git.clj" 50]
   [garamond.git$current_sha invoke "git.clj" 49]
   [garamond.pom$update_pom_BANG_ invokeStatic "pom.clj" 93]
   [garamond.pom$update_pom_BANG_ invoke "pom.clj" 87]
   [garamond.pom$generate_BANG_ invokeStatic "pom.clj" 123]
   [garamond.pom$generate_BANG_ invoke "pom.clj" 117]
   [deps_library.release$pom invokeStatic "release.clj" 59]
   [deps_library.release$pom invoke "release.clj" 55]
   [deps_library.release$main invokeStatic "release.clj" 159]
   [deps_library.release$main doInvoke "release.clj" 103]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.core$apply invokeStatic "core.clj" 667]
   [clojure.core$apply invoke "core.clj" 660]
   [deps_library.release$main invokeStatic "release.clj" 169]
   [deps_library.release$main doInvoke "release.clj" 103]
   [clojure.lang.RestFn invoke "RestFn.java" 397]
   [clojure.lang.AFn applyToHelper "AFn.java" 152]
   [clojure.lang.RestFn applyTo "RestFn.java" 132]
   [clojure.core$apply invokeStatic "core.clj" 665]
   [clojure.core$apply invoke "core.clj" 660]
   [deps_library.release$_main invokeStatic "release.clj" 172]
   [deps_library.release$_main doInvoke "release.clj" 171]
   [clojure.lang.RestFn invoke "RestFn.java" 397]
   [clojure.lang.AFn applyToHelper "AFn.java" 152]
   [clojure.lang.RestFn applyTo "RestFn.java" 132]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.core$apply invokeStatic "core.clj" 665]
   [clojure.main$main_opt invokeStatic "main.clj" 514]
   [clojure.main$main_opt invoke "main.clj" 510]
   [clojure.main$main invokeStatic "main.clj" 664]
   [clojure.main$main doInvoke "main.clj" 616]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.main main "main.java" 40]],
  :cause "Exit condition",
  :data {:code 128, :message nil}}}

I don't know what's happening here. and BTW why is there a lein-git-version, are we using lein?

and only useful message here is:

.... stderr: fatal: your current branch 'master' does not have any commits yet

Slow start?

My device might be slow(1.2 GHz Intel Core m3) but it takes so much and I don't know what's happening...

=>> yarn m2
yarn run v1.19.1
$ clj -A:release install
POM... respo/respo {:mvn/version "0.12.0-a1"}
Skipping paths: macros
JAR... target/project.jar (thin)
Building thin jar: target/project.jar
Processing pom.xml for {respo/respo {:mvn/version "0.12.0-a1"}}
Install...
Installing respo/respo-0.12.0-a1 to your local `.m2`
done.
✨  Done in 36.76s.

It was not always this slow but roughly 10s could be cost based on my impressions.

:local/root

If deps.edn contains dependencies that are :local/root then the transient dependencies of them are added to classpath,
however deps-library does NOT add them to the maven POM classpath. They should be added, because they are part of the classpath.

Execution error running in repos with no tag

=>> clj -A:release
Warning: lein-git-version git exited 128
{:exit 128, :out "", :err "fatal: No names found, cannot describe anything.\n"}

Execution error (NullPointerException) at java.util.regex.Matcher/getTextLength (Matcher.java:1283).
null

Full report at:
/var/folders/08/4fbsxdlx1pdbmlgsbqg3ss3m0000gn/T/clojure-5153470132041289338.edn
{:clojure.main/message
 "Execution error (NullPointerException) at java.util.regex.Matcher/getTextLength (Matcher.java:1283).\nnull\n",
 :clojure.main/triage
 {:clojure.error/class java.lang.NullPointerException,
  :clojure.error/line 1283,
  :clojure.error/symbol java.util.regex.Matcher/getTextLength,
  :clojure.error/source "Matcher.java",
  :clojure.error/phase :execution},
 :clojure.main/trace
 {:via
  [{:type java.lang.NullPointerException,
    :at [java.util.regex.Matcher getTextLength "Matcher.java" 1283]}],
  :trace
  [[java.util.regex.Matcher getTextLength "Matcher.java" 1283]
   [java.util.regex.Matcher reset "Matcher.java" 309]
   [java.util.regex.Matcher <init> "Matcher.java" 229]
   [java.util.regex.Pattern matcher "Pattern.java" 1093]
   [clojure.core$re_matcher invokeStatic "core.clj" 4856]
   [clojure.core$re_matches invokeStatic "core.clj" 4886]
   [clojure.core$re_matches invoke "core.clj" 4886]
   [garamond.git$current_status invokeStatic "git.clj" 39]
   [garamond.git$current_status invoke "git.clj" 36]
   [deps_library.release$default_options invokeStatic "release.clj" 16]
   [deps_library.release$default_options invoke "release.clj" 14]
   [deps_library.release$main invokeStatic "release.clj" 111]
   [deps_library.release$main doInvoke "release.clj" 103]
   [clojure.lang.RestFn invoke "RestFn.java" 397]
   [clojure.lang.AFn applyToHelper "AFn.java" 152]
   [clojure.lang.RestFn applyTo "RestFn.java" 132]
   [clojure.core$apply invokeStatic "core.clj" 665]
   [clojure.core$apply invoke "core.clj" 660]
   [deps_library.release$_main invokeStatic "release.clj" 165]
   [deps_library.release$_main doInvoke "release.clj" 164]
   [clojure.lang.RestFn invoke "RestFn.java" 397]
   [clojure.lang.AFn applyToHelper "AFn.java" 152]
   [clojure.lang.RestFn applyTo "RestFn.java" 132]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.core$apply invokeStatic "core.clj" 665]
   [clojure.main$main_opt invokeStatic "main.clj" 514]
   [clojure.main$main_opt invoke "main.clj" 510]
   [clojure.main$main invokeStatic "main.clj" 664]
   [clojure.main$main doInvoke "main.clj" 616]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.main main "main.java" 40]]}}

https://github.com/workframers/garamond/blob/master/src/garamond/git.clj#L39

https://github.com/arrdem/cuddlefish/blob/master/src/main/clj/cuddlefish/core.clj#L106

Looks like it's just because I don't have any tag in that repo:

39        [_ prefix ver-str] (re-matches #"^(\D*)(.*)$" current)

can I disable the behavior of adding tags

Auto tagging could be useful sometimes. But I'm considering it's not good enough to be bound to deploying. People might just want to deploy that package. Anyone got his/her habit...

Personally I deploy packages with GitHub Actions at current. There's network issues in Shanghai and publishing to Clojars can be really slow and unstable sometimes. It's much more reliable to deploy packages from the servers of GitHub. Adding tags in running GitHub actions does no help to me this such case.

error: Premature end of file

Following conversation on ClojureVerse.. The code I changed to try 0.3.0 mvc-works/skir@8ecb0d0

=>> yarn deploy
yarn run v1.19.1
$ clj -A:release
TAG... v0.0.7-a2
20-03-05 03:38:01 ChenYonsMacBook.lan ERROR [garamond.git:15] - Command 'git tag --annotate --message Automatically-generated tag from garamond v0.0.7-a2' returned 128!
20-03-05 03:38:01 ChenYonsMacBook.lan ERROR [garamond.git:19] - stderr: fatal: tag 'v0.0.7-a2' already exists
:tag-error {:code 128, :message nil}
 - tag already exists (v0.0.7-a2), continuing
POM... mvc-works/skir {:mvn/version "0.0.7-a2"}
[Fatal Error] :1:39: Premature end of file.
ERROR:  'Premature end of file.'
Execution error (SAXParseException) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser/parse (AbstractSAXParser.java:1239).
Premature end of file.

Full report at:
/var/folders/08/4fbsxdlx1pdbmlgsbqg3ss3m0000gn/T/clojure-6433489285754562045.edn
{:clojure.main/message
 "Execution error (SAXParseException) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser/parse (AbstractSAXParser.java:1239).\nPremature end of file.\n",
 :clojure.main/triage
 {:clojure.error/class org.xml.sax.SAXParseException,
  :clojure.error/line 1239,
  :clojure.error/cause "Premature end of file.",
  :clojure.error/symbol
  com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser/parse,
  :clojure.error/source "AbstractSAXParser.java",
  :clojure.error/phase :execution},
 :clojure.main/trace
 {:via
  [{:type javax.xml.transform.TransformerException,
    :message
    "org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 39; Premature end of file.",
    :at
    [com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl
     transform
     "TransformerImpl.java"
     740]}
   {:type org.xml.sax.SAXParseException,
    :message "Premature end of file.",
    :at
    [com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser
     parse
     "AbstractSAXParser.java"
     1239]}],
  :trace
  [[com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser
    parse
    "AbstractSAXParser.java"
    1239]
   [com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
    parse
    "SAXParserImpl.java"
    643]
   [com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl
    transformIdentity
    "TransformerImpl.java"
    632]
   [com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl
    transform
    "TransformerImpl.java"
    728]
   [com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl
    transform
    "TransformerImpl.java"
    343]
   [clojure.data.xml.jvm.pprint$indent_xml
    invokeStatic
    "pprint.clj"
    27]
   [clojure.data.xml.jvm.pprint$indent_xml invoke "pprint.clj" 23]
   [clojure.data.xml$indent invokeStatic "xml.clj" 158]
   [clojure.data.xml$indent doInvoke "xml.clj" 153]
   [clojure.lang.RestFn invoke "RestFn.java" 425]
   [clojure.lang.AFn applyToHelper "AFn.java" 156]
   [clojure.lang.RestFn applyTo "RestFn.java" 132]
   [clojure.core$apply invokeStatic "core.clj" 669]
   [clojure.core$apply invoke "core.clj" 660]
   [clojure.data.xml$indent_str invokeStatic "xml.clj" 164]
   [clojure.data.xml$indent_str doInvoke "xml.clj" 160]
   [clojure.lang.RestFn invoke "RestFn.java" 410]
   [clojure.tools.deps.alpha.gen.pom$sync_pom
    invokeStatic
    "pom.clj"
    135]
   [clojure.tools.deps.alpha.gen.pom$sync_pom invoke "pom.clj" 123]
   [garamond.pom$create_or_sync_pom_BANG_ invokeStatic "pom.clj" 20]
   [garamond.pom$create_or_sync_pom_BANG_ invoke "pom.clj" 13]
   [garamond.pom$generate_BANG_ invokeStatic "pom.clj" 122]
   [garamond.pom$generate_BANG_ invoke "pom.clj" 117]
   [deps_library.release$pom invokeStatic "release.clj" 62]
   [deps_library.release$pom invoke "release.clj" 58]
   [deps_library.release$main invokeStatic "release.clj" 140]
   [deps_library.release$main doInvoke "release.clj" 100]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.core$apply invokeStatic "core.clj" 667]
   [clojure.core$apply invoke "core.clj" 660]
   [deps_library.release$main invokeStatic "release.clj" 146]
   [deps_library.release$main doInvoke "release.clj" 100]
   [clojure.lang.RestFn invoke "RestFn.java" 397]
   [clojure.lang.AFn applyToHelper "AFn.java" 152]
   [clojure.lang.RestFn applyTo "RestFn.java" 132]
   [clojure.core$apply invokeStatic "core.clj" 665]
   [clojure.core$apply invoke "core.clj" 660]
   [deps_library.release$_main invokeStatic "release.clj" 149]
   [deps_library.release$_main doInvoke "release.clj" 148]
   [clojure.lang.RestFn invoke "RestFn.java" 397]
   [clojure.lang.AFn applyToHelper "AFn.java" 152]
   [clojure.lang.RestFn applyTo "RestFn.java" 132]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.core$apply invokeStatic "core.clj" 665]
   [clojure.main$main_opt invokeStatic "main.clj" 514]
   [clojure.main$main_opt invoke "main.clj" 510]
   [clojure.main$main invokeStatic "main.clj" 664]
   [clojure.main$main doInvoke "main.clj" 616]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.main main "main.java" 40]],
  :cause "Premature end of file."}}

Also the pom.xml file looks a bit strange to me,

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>mvc-works</groupId>
  <artifactId>skir</artifactId>
  <version>0.0.7-a1</version>
  <name>skir</name>
  <dependencies/>
  <repositories/>
<scm>
    <url>https://github.com/mhuebert/deps-library</url>
    <tag>8ecb0d04ac70668c64334cbbc94483f8aa9c4efc</tag>
    <connection>scm:git:[email protected]:mvc-works/skir.git</connection>
    <developerConnection>scm:git:[email protected]:mvc-works/skir.git</developerConnection>
  </scm>
</project>

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.