5HT / fs

📁 FS: Windows, Linux, Mac Driver
https://fs.n2o.dev
Other
234 stars 69 forks source link

0.2.11 does not work with Mac #37

Closed davejlong closed 7 years ago

davejlong commented 7 years ago

Trying to start fs fails on Mac.

iex(1)> :fs.start_link(:default_fs)
** (EXIT from #PID<0.484.0>) an exception was raised:
    ** (UndefinedFunctionError) function :mad_repl.load_file/1 is undefined (module :mad_repl is not available)
        :mad_repl.load_file('deps/fs/priv/mac_listener')
        src/fs.erl:43: :fs.mad_file/1
        src/fs_sup.erl:27: :fs_sup.has_executable/1
        src/fs_sup.erl:17: :fs_sup.init/1
        (stdlib) supervisor.erl:294: :supervisor.init/1
        (stdlib) gen_server.erl:328: :gen_server.init_it/6
        (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3

See https://github.com/kittoframework/kitto/issues/65 for more details

falood commented 7 years ago

I have made a pull request here #36 You can use version 0.9.x or master branch before new version published to hexpm.

5HT commented 7 years ago

$ MIX_EXS=package.exs mix hex.publish

** (Mix) Stopping package build due to errors. Missing files: mix.exs

davejlong commented 7 years ago

@5HT why are you using package.exs instead of mix.exs?

falood commented 7 years ago

@5HT I tried it locally and it works well for me, you can try to upgrade your mix version.

@davejlong you can check my comment here https://github.com/synrc/fs/issues/24 mix.exs will let mix think this is a mix project and compile this project with mix instead of rebar.

davejlong commented 7 years ago

@falood / @5HT I just posted a comment on #24. Rebar has it's own way to publish packages to hex.pm. https://hex.pm/docs/rebar3_publish

5HT commented 7 years ago

Please check.

alex88 commented 7 years ago

@5HT I've tried to import the library using both

{:fs, github: "synrc/fs", override: true, manager: :rebar3}

and

{:fs, github: "synrc/fs", override: true}

and I still get the same error

** (Mix) Could not start application fs: :fs_app.start(:normal, []) returned an error: an exception was raised:
    ** (UndefinedFunctionError) function :mad_repl.load_file/1 is undefined (module :mad_repl is not available)
        :mad_repl.load_file('deps/fs/priv/mac_listener')
        (fs) /Users/alex/Sites/project/deps/fs/src/fs.erl:43: :fs.mad_file/1
        (fs) /Users/alex/Sites/project/deps/fs/src/fs_sup.erl:27: :fs_sup.has_executable/1
        (fs) /Users/alex/Sites/project/deps/fs/src/fs_sup.erl:17: :fs_sup.init/1
        (stdlib) supervisor.erl:294: :supervisor.init/1
        (stdlib) gen_server.erl:328: :gen_server.init_it/6
        (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
5HT commented 7 years ago

This is because you failed on code:priv_dir(fs). We support only OTP applications that has correct answers from OTP code registry.