nerves-web-kiosk / kiosk_system_rpi3

Nerves QtWebEngine Kiosk system for Raspberry Pi 3
Apache License 2.0
67 stars 25 forks source link

Fails with Elixir ~> 1.7 #29

Closed aseigo closed 5 years ago

aseigo commented 5 years ago

This library uses internal mix api which has changed in recent Elixir versions. Once a nerves project moves to Elixir 1.7, this library will fail to compile. Issue is here:

warning: function Mix.Config.Agent.get/1 is undefined (module Mix.Config.Agent is not available)
lib/mix/lib/releases/config/config.ex:447

You can see how another library resolved this issue here: https://github.com/bitwalker/distillery/commit/54327922aaf11fd8db39bc17ae798bf7724f6918

The full set of compilation warnings follows:

warning: found quoted atom "insecure_cookie_in_distillery_config" but the quotes are not required. Quotes should only be used to introduce atoms with foreign characters in them
  lib/distillery/lib/cookies.ex:22

warning: "not expr1 in expr2" is deprecated. Instead use "expr1 not in expr2" if you require Elixir v1.5+, or "not(expr1 in expr2)" if you have to support earlier Elixir versions
  lib/mix/lib/releases/appups.ex:207

warning: "not expr1 in expr2" is deprecated. Instead use "expr1 not in expr2" if you require Elixir v1.5+, or "not(expr1 in expr2)" if you have to support earlier Elixir versions
  lib/mix/lib/releases/appups.ex:208

warning: System.stacktrace/0 outside of rescue/catch clauses is deprecated. If you want to support only Elixir v1.7+, you must access __STACKTRACE__ inside a rescue/catch. If you want to support earlier Elixir versions, move System.stacktrace/0 inside a rescue/catch
  lib/mix/lib/releases/errors.ex:68

warning: System.stacktrace/0 outside of rescue/catch clauses is deprecated. If you want to support only Elixir v1.7+, you must access __STACKTRACE__ inside a rescue/catch. If you want to support earlier Elixir versions, move System.stacktrace/0 inside a rescue/catch
  lib/mix/lib/releases/errors.ex:190

warning: System.stacktrace/0 outside of rescue/catch clauses is deprecated. If you want to support only Elixir v1.7+, you must access __STACKTRACE__ inside a rescue/catch. If you want to support earlier Elixir versions, move System.stacktrace/0 inside a rescue/catch
  lib/mix/lib/releases/errors.ex:246

warning: Mix.Config.read!/1 is deprecated. Use eval!/2 instead
  lib/mix/lib/releases/assembler.ex:601

warning: Mix.Dep.loaded/1 is deprecated. Mix.Dep.loaded/1 was private API and you should not use it
  lib/mix/lib/releases/models/app.ex:37

warning: function Mix.Dep.loaded_by_name/2 is undefined or private. Did you mean one of:

      * filter_by_name/2
      * filter_by_name/3
      * loaded/1

  lib/mix/lib/releases/models/app.ex:83

warning: function Mix.Config.Agent.get/1 is undefined (module Mix.Config.Agent is not available)
  lib/mix/lib/releases/config/config.ex:447

warning: function Mix.Config.Agent.stop/1 is undefined (module Mix.Config.Agent is not available)
  lib/mix/lib/releases/config/config.ex:448

warning: variable "expand_dir" is unused
  lib/nerves/artifact.ex:351
mobileoverlord commented 5 years ago

Building anything for nerves on elixir 1.7 will require the following PRs https://github.com/nerves-project/nerves_runtime/pull/72 https://github.com/nerves-project/nerves/pull/316 https://github.com/nerves-project/shoehorn/pull/12

mobileoverlord commented 5 years ago

This has been updated and Nerves now supports elixir 1.7