New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"unknown resolver null" when loading libraries in predef.scala #144

Closed
non opened this Issue Aug 7, 2015 · 2 comments

Comments

Projects
None yet
3 participants
@non
Contributor

non commented Aug 7, 2015

I edited my predef.scala file to add the following:

load.ivy("org.spire-math" %% "jawn-ast" % "0.8.3")
load.ivy("org.spire-math" %% "cats" % "0.1.2")

When I ran amm the first time I saw this output:

Loading Ammonite Repl...
:: loading settings :: url = jar:file:/Users/erik/bin/amm!/org/apache/ivy/core/settings/ivysettings.xml
:: resolving dependencies :: org.spire-math#jawn-ast_2.11-caller;working
        confs: [default]
        found org.spire-math#jawn-ast_2.11;0.8.3 in central
        found org.scala-lang#scala-library;2.11.7 in sbt-chain
        [2.11.7] org.scala-lang#scala-library;2.11.7
        found org.spire-math#jawn-parser_2.11;0.8.3 in central
downloading http://repo1.maven.org/maven2/org/spire-math/jawn-ast_2.11/0.8.3/jawn-ast_2.11-0.8.3-javadoc.jar ...
        [SUCCESSFUL ] org.spire-math#jawn-ast_2.11;0.8.3!jawn-ast_2.11.jar(javadoc) (1118ms)
downloading http://repo1.maven.org/maven2/org/spire-math/jawn-ast_2.11/0.8.3/jawn-ast_2.11-0.8.3.jar ...
        [SUCCESSFUL ] org.spire-math#jawn-ast_2.11;0.8.3!jawn-ast_2.11.jar (126ms)
downloading http://repo1.maven.org/maven2/org/spire-math/jawn-ast_2.11/0.8.3/jawn-ast_2.11-0.8.3-sources.jar ...
        [SUCCESSFUL ] org.spire-math#jawn-ast_2.11;0.8.3!jawn-ast_2.11.jar(source) (40ms)
downloading http://repo1.maven.org/maven2/org/spire-math/jawn-parser_2.11/0.8.3/jawn-parser_2.11-0.8.3.jar ...
        [SUCCESSFUL ] org.spire-math#jawn-parser_2.11;0.8.3!jawn-parser_2.11.jar (126ms)

:: problems summary ::
:::: ERRORS
        unknown resolver null

        unknown resolver null


:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
:: resolving dependencies :: org.spire-math#cats_2.11-caller;working
        confs: [default]
        found org.spire-math#cats_2.11;0.1.2 in central
        [0.1.2] org.spire-math#cats_2.11;0.1.2
        found org.scala-lang#scala-library;2.11.7 in sbt-chain
        [2.11.7] org.scala-lang#scala-library;2.11.7
        found org.spire-math#cats-macros_2.11;0.1.2 in sbt-chain
        [0.1.2] org.spire-math#cats-macros_2.11;0.1.2
        found com.github.mpilquist#simulacrum_2.11;0.3.0 in sbt-chain
        found org.spire-math#algebra_2.11;0.2.1 in sbt-chain
        [0.2.1] org.spire-math#algebra_2.11;0.2.1
        found org.typelevel#machinist_2.11;0.3.0 in sbt-chain
        found org.scala-lang#scala-reflect;2.11.2 in sbt-chain
        [2.11.2] org.scala-lang#scala-reflect;2.11.2
        found org.spire-math#cats-core_2.11;0.1.2 in sbt-chain
        [0.1.2] org.spire-math#cats-core_2.11;0.1.2
        found org.spire-math#cats-laws_2.11;0.1.2 in sbt-chain
        [0.1.2] org.spire-math#cats-laws_2.11;0.1.2
        found org.spire-math#cats-std_2.11;0.1.2 in sbt-chain
        [0.1.2] org.spire-math#cats-std_2.11;0.1.2
        found org.spire-math#algebra-std_2.11;0.2.1 in sbt-chain
        [0.2.1] org.spire-math#algebra-std_2.11;0.2.1
        found org.scalacheck#scalacheck_2.11;1.12.4 in sbt-chain
        found org.scala-sbt#test-interface;1.0 in sbt-chain
        found org.typelevel#discipline_2.11;0.3 in sbt-chain
        found org.spire-math#algebra-laws_2.11;0.2.1 in sbt-chain
        [0.2.1] org.spire-math#algebra-laws_2.11;0.2.1
        found org.spire-math#cats-free_2.11;0.1.2 in central
        [0.1.2] org.spire-math#cats-free_2.11;0.1.2
        found org.spire-math#cats-state_2.11;0.1.2 in central
        [0.1.2] org.spire-math#cats-state_2.11;0.1.2
        found org.scoverage#scalac-scoverage-runtime_2.11;1.1.0 in sbt-chain
        found org.scoverage#scalac-scoverage-plugin_2.11;1.1.0 in sbt-chain
        found org.scala-lang.modules#scala-xml_2.11;1.0.1 in sbt-chain
        found org.scala-lang#scala-compiler;2.11.4 in sbt-chain
        found org.scala-lang#scala-reflect;2.11.4 in sbt-chain
        [2.11.4] org.scala-lang#scala-reflect;2.11.4
        found org.scala-lang.modules#scala-parser-combinators_2.11;1.0.2 in sbt-chain

:: problems summary ::
:::: ERRORS
        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null

        unknown resolver null


:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

However on subsequent runs things are fine, and the libraries are available. It seems like problem only occurs the first time a library is added. I got similar output in the REPL:

Loading Ammonite Repl...
@ load.ivy("org.spire-math" %% "imp" % "0.2.0")
:: loading settings :: url = jar:file:/Users/erik/bin/amm!/org/apache/ivy/core/settings/ivysettings.xml
:: resolving dependencies :: org.spire-math#imp_2.11-caller;working
        confs: [default]
        found org.spire-math#imp_2.11;0.2.0 in central
        found org.scala-lang#scala-library;2.11.7 in sbt-chain
        [2.11.7] org.scala-lang#scala-library;2.11.7
        found org.scala-lang#scala-reflect;2.11.7 in sbt-chain
        [2.11.7] org.scala-lang#scala-reflect;2.11.7
downloading http://repo1.maven.org/maven2/org/spire-math/imp_2.11/0.2.0/imp_2.11-0.2.0-javadoc.jar ...
        [SUCCESSFUL ] org.spire-math#imp_2.11;0.2.0!imp_2.11.jar(javadoc) (253ms)
downloading http://repo1.maven.org/maven2/org/spire-math/imp_2.11/0.2.0/imp_2.11-0.2.0.jar ...
        [SUCCESSFUL ] org.spire-math#imp_2.11;0.2.0!imp_2.11.jar (31ms)
downloading http://repo1.maven.org/maven2/org/spire-math/imp_2.11/0.2.0/imp_2.11-0.2.0-sources.jar ...
        [SUCCESSFUL ] org.spire-math#imp_2.11;0.2.0!imp_2.11.jar(source) (25ms)

:: problems summary ::
:::: ERRORS
        unknown resolver null

        unknown resolver null


:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

The library seems to have been loaded correctly in this case.

@alexarchambault

This comment has been minimized.

Collaborator

alexarchambault commented Aug 7, 2015

That may require an Ivy API wizard. Switching to coursier would fix that too (see #110).

@lihaoyi

This comment has been minimized.

Owner

lihaoyi commented Aug 9, 2015

Yeah swapping to coursier would fix this. @alexarchambault my preferred way forward would be to make it swappable, the same way FrontEnd is now swappable, and let people bootstrap coursier via a load.ivy using the default resolver and use that from then on.

@lihaoyi lihaoyi added the bug label Dec 1, 2015

lihaoyi pushed a commit that referenced this issue Jan 31, 2016

Li Haoyi
Fix #144 by overriding ivy method, rather than adding dummy resolvers…
…, because the dummy resolver with `null` as a name seems to make travis fail (???)

@lihaoyi lihaoyi closed this in 1ab0301 Feb 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment