ELM 0.18 中的图形包发生了什么变化?

What happened to Graphics Package in ELM 0.18?

我从 Github 下载了 this 项目,并尝试使用 elm 版本 0.18 运行 它。

该项目最初是用 prev elm 版本编写的,所以我试图在我的版本上实现它 运行。

编译器说I cannot find module 'Graphics.Collage'.

所以我进入了包裹page and saw that it was part of core's package, but when I hitted the link to go to the latest version I got to a page where I could no longer understand what is going on.。 写在哪里:

 problem with parameter 'version': Must have format MAJOR.MINOR.PATCH (e.g. 1.0.2)
  1. 有人能理解这个吗?
  2. 如何在 elm 0.18 中导入图形包?
  3. 如何找到其他在其页面中显示相同错误的软件包的解决方案?

Elm 确实存在将包移出核心的问题。请尝试安装 evancz/elm-graphics

还有问题 3:我通常去 http://package.elm-lang.org/ 并从那里搜索包名。

根据代码历史来看,您尝试构建的项目上一次成功构建是在 2014 年 12 月(最近一次提交是在 2016 年,评论为 "Start upgrading to elm 0.17" 但看起来不完整) . 2014 年 12 月,最新版本的 Elm 是 0.14 。

现在最新的Elm版本是0.18。沿途的每个版本(0.15、0.16、0.17、0.18)都引入了更改。其中大部分记录在发行说明中:http://elm-lang.org/blog(向下滚动到该页面上的 "Articles")。

Elm 0.17 中引入的更改附带升级计划:https://github.com/elm-lang/elm-platform/blob/master/upgrade-docs/0.17.md . This upgrade plan mentions that "The functionality of Graphics.* now lives in evancz/elm-graphics" ( as Andreas Hultgren already pointed out ). Another helpful document is this : http://faq.elm-community.org/17.html 其中包含有关 Graphics.Collage 的更多详细信息。

Graphics.Collage 变化只是从 Elm 0.14 到 Elm 0.18 的过程中引入的众多变化之一。您正在使用的项目的这个修改后的克隆:https://github.com/dc25/elm-pong 应该编译并且 运行 在 Elm 0.18 下。