alexarchambault on 1.6.3
alexarchambault on master
1.6.3 (compare)
lihaoyi on gh-pages
5ad9ae5538f23cab92ccd8c6b1617d8… (compare)
alexarchambault on master
Partly revert 84d48542 (#923) … (compare)
cs complete org.typelevel:cats-core_2.13:
cs complete org.typelevel:cats-core
and that's how I got 2.13. Didn't realize I needed to specify that bit to see what versions are available for scala 2.13.
:
, so your completion should have given you any artifact that starts with cats-core
including the cross endings of _2.13
etc. If you want the specific version of scala specified, then always make sure to use the full org:artifact_withscalversion:
cs complete org.typelevel:cats-core_2.13:
for the 2.13 artifacts and cs complete org.typelevel:cats-core_3:
for the Scala 3 artifacts
java.lang.BootstrapMethodError: java.lang.NoSuchMethodError: scala.collection.immutable.List.$anonfun$flatMap$1$adapted(Lscala/runtime/BooleanRef;Lscala/runtime/ObjectRef;Lscala/runtime/ObjectRef;Ljava/lang/Object;)Ljava/lang/Object;
scala.tools.nsc.PhaseAssembly$DependencyGraph.compilerPhaseList(PhaseAssembly.scala:101)
scala.tools.nsc.PhaseAssembly.computePhaseAssembly(PhaseAssembly.scala:230)
predef.sc
file.
I have a script that works or not depending how it is called and where it lives. It isn't trying to be cute abount the directory it is in. ~/scripts/update_rfids.sc works fine. If I save it as /tmp/.tballard/scripts/update_rfids.sc and am in that directory, ./update_rfids.sc
succeeds, but /tmp/.tballard/scripts/update_rfids.sc
fails. Here's the error:
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:47)
at java.base/java.lang.String.charAt(String.java:693)
at ammonite.util.Name.<init>(Model.scala:50)
at ammonite.interp.AmmonitePlugin$.$anonfun$apply$10(AmmonitePlugin.scala:198)
at scala.collection.ArrayOps$.map$extension(ArrayOps.scala:924)
at ammonite.interp.AmmonitePlugin$.$anonfun$apply$9(AmmonitePlugin.scala:198)
at scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:169)
at scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:165)
at scala.collection.immutable.List.foldLeft(List.scala:79)
at ammonite.interp.AmmonitePlugin$.apply(AmmonitePlugin.scala:164)
at ammonite.interp.AmmonitePlugin$$anon$1$$anon$2.apply(AmmonitePlugin.scala:36)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:452)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:397)
at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1506)
at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1490)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:1482)
I can provide more stack if it helps.
case class Name(raw: String){
assert(
NameTransformer.decode(raw) == raw,
"Name() must be created with un-encoded text"
)
assert(raw.charAt(0) != '`', "Cannot create already-backticked identifiers")
override def toString = s"Name($backticked)"
def encoded = NameTransformer.encode(raw)
def backticked = Name.backtickWrap(raw)
}
Looking at the ammonite documentation for the new @arg(doc = "This explains what the function does")
feature it says that by adding it to a function the user message:
| -i <int>
| -s <str>
is transformed to:
| -i <int>
| -s <str>
That appears to be accurate, but doesn't sound like the result one would hope for;-)
Hey, everyone. In my environment I'm getting a method not found error from protobuf: java.lang.NoSuchMethodError: com.google.protobuf.descriptor.FileDescriptorProto$.parseFrom(
. When I checked the location of the class, it's being loaded from the amm binary. I think it's due to a conflict between an older protobuf library bundled with ammonite and the protobuf that my runtime libraries are depending on.
@ import com.google.protobuf.descriptor.FileDescriptorProto
import com.google.protobuf.descriptor.FileDescriptorProto
@ val klass = classOf[FileDescriptorProto]
klass: Class[FileDescriptorProto] = class com.google.protobuf.descriptor.FileDescriptorProto
@ klass.getResource('/' + klass.getName().replace('.', '/') + ".class")
res5: java.net.URL = jar:file:/usr/local/bin/amm!/com/google/protobuf/descriptor/FileDescriptorProto.class
I think this issue might be related (com-lihaoyi/Ammonite#1177), however when I try the suggested --thin
flag I get errors for missing sun.reflect dependencies java.lang.NoClassDefFoundError: sun/reflect/ConstructorAccessorImpl
mill -i ...
? For example, I've noticed that I need to pass -i
to mill -i main.run
in order for a (cats-effect) readLine
to actually work. Without the -i
it just hangs when it gets to readLine
. I'm wondering if anyone has had the same issue with ammonite?