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)
I'm trying to add ammonite as a dependency to an SBT project by adding libraryDependencies += "com.lihaoyi" % "ammonite" % "2.3.8" cross CrossVersion.full
but I'm getting the following error on sbt compile
(using sbt 1.4.7 and Scala 2.12.13):
[info] Updating
[info] Resolved dependencies
[warn]
[warn] Note: Unresolved dependencies path:
[error] stack trace is suppressed; run last update for the full output
[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.lihaoyi:ammonite_2.12.13:2.3.8
[error] Not found
[error] Not found
[error] not found: /Users/schoeped/.ivy2/localcom.lihaoyi/ammonite_2.12.13/2.3.8/ivys/ivy.xml
[error] not found: https://repo1.maven.org/maven2/com/lihaoyi/ammonite_2.12.13/2.3.8/ammonite_2.12.13-2.3.8.pom
Did anyone else ever run into a similar issue?
Hello: There are some problems with documentation after switching to com_lihaoyi
. Here is what I've found:
on github readme of particular projects:
Ammonite -> there is lot of links to https://lihaoyi.github.io/Ammonite -> (404) //should be?: https://com-lihaoyi.github.io/ or directly https://ammonite.io/
fansi -> wrong redirection to scaladocs (0.2.0) and wrong link to ammonite (same as above)
utest -> there is 1 link that does not work 'Fansi'
sourcecode -> wrong (very old?) link to PPrint (https://www.lihaoyi.com/upickle-pprint/pprint) FastParse (http://lihaoyi.github.io/fastparse/) and Scalatags (http://lihaoyi.github.io/scalatags/#CSSStylesheets)
cask -> link to documentation does not work (https://www.lihaoyi.com/cask/)
requests-scala -> all links in sentence "such as ujson.Values, uPickle's upickle.default.writable values, or Scalatags's Tags" are dead (https://www.lihaoyi.com/upickle, https://www.lihaoyi.com/scalatags/) and other references to uJson
Those seams to works:
upickle, acyclic, FastParse, scalatags
import $ivy.`dev.zio::zio:1.0.4`
import zio._
val program = for {
_ <- zio.console.putStrLn("starting zio program")
} yield ()
println("should run program now")
println(program)
zio.Runtime.default.unsafeRun(program.provideLayer(zio.ZEnv.live)) // here it just blocks and does nothing!
println("should have run program now")
unsafeRun
part into an Ammonite's @main
method, instead of script's body.
I've question if there is a way to get help message of a script
Missing argument: --time <int>
Expected Signature: lines
--time <int>
cmd <str>...
without calling it. I mean if script has some side effects
println("side effect")
@main def lines(time:Int, cmd:String*) = { ... }
they are performed, even if @main def lines(t:String) = {}
wasn't called.
readme.md
in Common Commands/Manual Testing
there is line mill -i amm[2.12.6].launcher creates a launcher script at out/amm/2.12.6/launcher/dest/run that can also be used to run Ammonite outside of the Mill build tool.
/out/amm/2.12.6/launcher/overriden/mill/scalalib/JavaModule/launcher/dest/run
. Is it intendet to have that extra overriden/..
?
With regards to installation, having JDK on the machine and then Installing VS Code, installing Metals extension - should be enough.
It bootstraps itself out of a Coursier launcher script so it should be painless.
Hey all! Is there a workaround to Ammonite not being able to disambiguate the same import when it occurs in multiple files with and without "^"?
So for a directory structure like this
- /common
- commonDep.sc
- /something
- reusedScript.sc
myScript.sc
where
myScript.sc
imports both common.commonDep
and something.reusedScript
,reusedScript.sc
imports ^.common.commonDep
I'm getting the following compile error:
myScript.sc:78: type mismatch;
found : ammonite.$file.common.commonDep
required: ammonite.$file.something.^.common.commonDep
dep = dep,
^
Compilation Failed
import com.foo.bar.StateMachine
val m = StateMachine(42)
val compiled = m.compile()
//////// Make changes to StateMachine.scala in the def compile and trigger a build loop so that StateMachine.class is updated///
val m = StateMachine(42)
val compiled = m.compile() // <-------- Compiled using new code.