Skip to content
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

Return [{mod, bin}] from Code.compile_file/2, require_file/2, load_file/2 #9864

Merged
merged 1 commit into from
Feb 29, 2020

Commits on Feb 29, 2020

  1. Return [{mod, bin}] from Code.compile_file/2, require_file/2, load_fi…

    …le/2
    
    This was the documented behaviour on 1.9 that was broken on v1.10: (version `git` is this branch)
    
        $ cat a.ex
        defmodule A, do: nil
    
        $ for v in 1.9.4-otp-22 1.10.2-otp-22 git; do asdf local elixir $v && echo $v; elixir -e 'IO.inspect Code.compile_file("a.ex")'; done
        1.9.4-otp-22
        [{A, <<70, 79, ...>>}
        1.10.2-otp-22
        [{A, %{attributes: [], ...}]
        git
        [{A, <<70, 79, ...>>}
    
        $ for v in 1.9.4-otp-22 1.10.2-otp-22 git; do asdf local elixir $v && echo $v; elixir -e 'IO.inspect Code.require_file("a.ex")'; done
        1.9.4-otp-22
        [{A, <<70, 79, ...>>}]
        1.10.2-otp-22
        [{A, %{attributes: [], ...}]
        git
        [{A, <<70, 79, ...>>}]
    
        $ for v in 1.9.4-otp-22 1.10.2-otp-22 git; do asdf local elixir $v && echo $v; elixir -e 'IO.inspect Code.load_file("a.ex")'; done
        1.9.4-otp-22
        [{A, <<70, 79, ...>>}]
        1.10.2-otp-22
        warning: Code.load_file/1 is deprecated. Use Code.require_file/2 or Code.compile_file/2 instead
          nofile:1
    
        [{A, %{attributes: [], ...}]
        git
        warning: Code.load_file/1 is deprecated. Use Code.require_file/2 or Code.compile_file/2 instead
          nofile:1
    
        [{A, <<70, 79, ...>>}]
    wojtekmach committed Feb 29, 2020
    Configuration menu
    Copy the full SHA
    92b554c View commit details
    Browse the repository at this point in the history