Replies: 4 comments 11 replies
-
So first things first, please don't ask questions by creating issues, they are not meant for that. Secondly, I believe this is a question about the insides of Now back to your question, I believe this will work: interp.load.ivy(
"net.bblfish.crypto" %% "bobcats" % "0.2-69106e6-SNAPSHOT",
Dependency.of("net.bblfish.crypto", "bobcats_3", "0.2-69106e6-SNAPSHOT").withClassifier("tests")
) stuff from the test-jar seems to be on the classpath, so it'll probably be enough for you. ▶ scala-cli --amm
Loading...
Welcome to the Ammonite Repl 2.5.4-33-0af04a5b (Scala 3.2.0 Java 17.0.2)
@ import coursierapi._
import coursierapi._
@ interp.repositories() ++= Seq(coursierapi.MavenRepository.of("https://oss.sonatype.org/content/repositories/snapshots"))
@ interp.load.ivy(
"net.bblfish.crypto" %% "bobcats" % "0.2-69106e6-SNAPSHOT",
Dependency.of("net.bblfish.crypto", "bobcats_3", "0.2-69106e6-SNAPSHOT").withClassifier("tests")
)
@ bobcats.HashSuite
-- Error: core/shared/src/test/scala/bobcats/HashSuite.scala:27:24 -------------
undefined: new munit.CatsEffectSuite # -1: TermRef(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),object munit),CatsEffectSuite),<init>) at parser
Compilation Failed
@ AFAIK the following syntax should also be supported by import $ivy.`net.bblfish.crypto::bobcats:0.2-69106e6-SNAPSHOT:test` |
Beta Was this translation helpful? Give feedback.
-
Thanks @Gedochao, I had tried on Li Haoyi's discord channel, but got no response. (perhaps my question was not well formed) It' no longer clear where to send the bug or questions anymore. It would help if your doc mentioned the Btw, from my experience of github repos, the adminstrator can always turn a bug report into a question. Let me follow your suggestions before I post a bug on the ammonite gihtub repo linking back to the discussion here. |
Beta Was this translation helpful? Give feedback.
-
(Discussions only has one level depth, so I posted in a new toplevel here) @ interp.load.ivy(
"net.bblfish.crypto" %% "bobcats" % "0.2-69106e6-SNAPSHOT",
Dependency.of("net.bblfish.crypto", "bobcats_3", "0.2-69106e6-SNAPSHOT").withClassifier("tests"))
@ val shm = _root_.bobcats.SigningHttpMessage
-- [E008] Not Found Error: cmd3.sc:1:25 ----------------------------------------
1 |val shm = _root_.bobcats.SigningHttpMessage
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|value SigningHttpMessage is not a member of bobcats, but could be made available as an extension method.
|
|The following import might make progress towards fixing the problem:
|
| import sourcecode.Text.generate
|
Compilation Failed |
Beta Was this translation helpful? Give feedback.
-
To test out specifying the dependencies on the command line, I tried get a really simple script going.
➤ cat src/Auth.sc 1 ↵
val shm = bobcats.SigningHttpMessages
val tpPriv = shm.`test-key-rsa-pss`.privateKey
System.out.println(tpPriv)
➤ scala-cli run src/Auth.sc --repository sonatype:snapshots --dependency net.bblfish.crypto::bobcats:0.2-69106e6-SNAPSHOT,classifier=tests --jvm 18
Compiling project (Scala 3.2.0, JVM)
exception occurred while compiling /Volumes/Dev/hjs/Programming/Scala3/CoSy/AuthScripts/src/.scala-build/project_8908242a06_8908242a06-9f0992e276/src_generated/main/Auth.scala
Error compiling project (Scala 3.2.0, JVM)
Error: Unexpected error when compiling project_8908242a06_8908242a06-9f0992e276: 'assertion failed'
Compilation failed I tried quite a number of variations. I tried adding a main method, wrapping the code in an object, ... |
Beta Was this translation helpful? Give feedback.
-
I get that far, but then I would also like to import the test jar
bobcats_3-0.2-69106e6-SNAPSHOT-tests.jar
in the same sonatype repository. How do I do that?Beta Was this translation helpful? Give feedback.
All reactions