GithubHelp home page GithubHelp logo

Comments (9)

felipesere avatar felipesere commented on May 20, 2024

Can you try with Erlang 21?

from elixir-koans.

Nagasaki45 avatar Nagasaki45 commented on May 20, 2024

The issue was introduced in 8c0c314. Code.compile_file was added in elixir 1.7. Before that we used Code.load_file which is now deprecated. Don't really know what should be the best solution to keep supporting older elixir versions...
@magmax, you can upgrade to elixir 1.7. Not that this is a proper solution to this issue, just a hacky workaround.

from elixir-koans.

felipesere avatar felipesere commented on May 20, 2024

Hmmm... Now that I look a bit closer, I don't think our travis run would have caught it.
We don't have any tests for lib/watcher.ex 😭

From what I can see in the Ubuntu package index, you might not be able to upgrade using apt.
An alternative I have used on CI has been to use asdf as desribed here: https://gist.github.com/beaorn/7b90a21b7e80e7744d8d2d08e49efcee#erlang-elixir-and-phoenix

from elixir-koans.

magmax avatar magmax commented on May 20, 2024

Yes, it works with 1.7.

I'm a completely newby with elixir (and erlang in general). I suppose that this is the usual profile for koans users XD, so it is a little frustrating to see anything not working as expected. This is just to require to add the elixir 1.7 requirement to the README, because I tried the one available in ubuntu, thinking it was the last one.

In addition, thank you very much for these koans. They make reading documentation much funnier.

from elixir-koans.

iamvery avatar iamvery commented on May 20, 2024

Well sorry about this, folks!

Hmmm... Now that I look a bit closer, I don't think our travis run would have caught it.
We don't have any tests for lib/watcher.ex 😭

I thought I had checked, but honestly I probably just assumed CI was a good enough 👍. Since the call is only deprecated at this point, we could revert the changes and use the mean time to iterate on a more robust fix. I'm pretty sure there are options for conditionally including code based on Elixir version. I feel like I've seen this before...

from elixir-koans.

iamvery avatar iamvery commented on May 20, 2024

h/t @michalmuskala for this potential solution:

Michał Muskała [8:46 AM]
Or use something like:

if Version.match?(System.version(), "> 1.4.0") do
 def foo(...), do: # use new code
else
 def foo(...), do: # use old code
end

Because all libraries are recompiled every time a version changes anyway, that's a good enough solution

from elixir-koans.

mparker3 avatar mparker3 commented on May 20, 2024

I'm using the provided Docker.sh script and Dockerfile to run this. If Elixir 1.7 is the supported version, would it make sense to update the Dockerfile to reflect this?

from elixir-koans.

iamvery avatar iamvery commented on May 20, 2024

@mparker3 I tend to agree that we should keep the provided environments up to date, however I also think we want to make the koans as approachable as possible. I proposed a solution to make this work without deprecations on versions <= 1.7 in #232. Please have a look!

from elixir-koans.

felipesere avatar felipesere commented on May 20, 2024

from elixir-koans.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.