-
-
Notifications
You must be signed in to change notification settings - Fork 372
EOL Ammonite-Ops and Ammonite-Shell #1227
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
Conversation
5cf2a50
to
92a2f0c
Compare
It would be great to remove those 👍. I didn't review in detail yet, but, "the CI errors seem legit" (although the ones in repl tests don't make a lot of sense at first…). |
92a2f0c
to
57b53cb
Compare
57b53cb
to
19ae8d4
Compare
@alexarchambault I got all tests passing on Scala 2.x, but somehow there are Scala 3 failures I don't understand. Do you think you could take a look see if you can make sense of it? |
I'll try to have a look. IIRC I already ran into such errors, and fixed them by ensuring pprint_2.13 isn't in the class path with Scala 3 (and no pprint_3 in Scala 2.13 either). |
25b49b5
to
d438c0a
Compare
@alexarchambault looks like I managed to shake the build a bit and get it to compile and pass tests. I don't actually understand what the stuff in the build.sc is doing, but I guess if it passes tests we're probably good? |
build.sc
Outdated
def moduleDeps = Seq() | ||
def ivyDeps = T{ | ||
if (scala3Versions.contains(crossScalaVersion)) | ||
Agg( | ||
ivy"com.lihaoyi:pprint_3:${Deps.pprint.dep.version}", | ||
ivy"com.lihaoyi:fansi_3:${Deps.fansi.dep.version}", | ||
ivy"org.scala-lang:scala3-library_3:$crossScalaVersion" | ||
) | ||
else | ||
Agg( | ||
Deps.pprint, | ||
Deps.fansi | ||
Agg( | ||
|
||
Deps.osLib, | ||
Deps.scalaCollectionCompat, | ||
Deps.fansi | ||
) ++ ( | ||
if (scala3Versions.contains(crossScalaVersion)) | ||
Agg( | ||
ivy"com.lihaoyi:pprint_3:${Deps.pprint.dep.version}", | ||
ivy"org.scala-lang.modules::scala-collection-compat:${Deps.scalaCollectionCompat.dep.version}", | ||
ivy"org.scala-lang:scala3-library_3:$crossScalaVersion" | ||
) | ||
else Agg( | ||
Deps.pprint | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexarchambault In particular i have no idea what this part is doing haha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, crossScalaVersion
can be like 3.x
, but as supports3
is false (the default), we compile this module with Scala 2.13 anyway. But crossScalaVersion
like 3.x
implies it's meant to be consumed by Scala 3 modules nonetheless, so we force some dependencies to have a _3
suffix (and also pull scala3-library
, that Mill-built libraries don't pull automatically). It's required for dependencies having macros, like pprint (as Scala 2 and 3 macros are different, and pprint doesn't rely on the Scala 2 & 3 macro mixing stuff).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the ivy"org.scala-lang.modules::scala-collection-compat:…"
seems superfluous here, as it doesn't force any suffix, and there's already Deps.scalaCollectionCompat
a few lines before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM I guess!
Seems the (somewhat annoying, but somewhat useful too 😅) |
These two modules were an interesting experiment almost a decade ago, but overall usage has not panned out. Ammonite-Ops is largely replaced by https://github.com/com-lihaoyi/os-lib, even if it's not an exact match. Ammonite-Shell never really saw widespread usage: the vast majority of Ammonite users use Ammonite as a Scala REPL and script runner in addition to (rather than instead of) their default Bash/Zsh/etc. shells.
This PR deletes everything related to these modules: their implementation, build config, and docs. This should help shrink the codebase, simplify the codebase, and let us focus more clearly on what's important going forward