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

Warnings during compilation on ELixir 1.8.0-otp-21.2.2 #276

Open
OvermindDL1 opened this issue Jan 15, 2019 · 0 comments
Open

Warnings during compilation on ELixir 1.8.0-otp-21.2.2 #276

OvermindDL1 opened this issue Jan 15, 2019 · 0 comments

Comments

@OvermindDL1
Copy link

Environment

  • Elixir version (elixir -v):
Erlang/OTP 21 [erts-10.2.1] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [hipe]

Elixir 1.8.0 (compiled with Erlang/OTP 21)
  • Arc version (mix deps): arc 0.11.0 (Hex package) (mix)
  • Arc dependencies when applicable (mix deps): arc_ecto 0.11.1 (Hex package) (mix) (not applicable however)
  • Operating system: RedHat Linux

Expected behavior

Compiles cleanly

Actual behavior

Gives these warnings:

==> arc
Compiling 14 files (.ex)
warning: variable "asset_host" is unused (if the variable is not meant to be used, prefix it with an underscore)
  lib/arc/storage/s3.ex:9

warning: System.cwd/0 is deprecated. Use File.cwd/0 instead
Found at 2 locations:
  lib/mix/tasks/g.ex:49
  lib/mix/tasks/g.ex:55

warning: function ExAws.request/1 is undefined (module ExAws is not available)
Found at 3 locations:
  lib/arc/storage/s3.ex:30
  lib/arc/storage/s3.ex:45
  lib/arc/storage/s3.ex:57

warning: function ExAws.Config.new/2 is undefined (module ExAws.Config is not available)
  lib/arc/storage/s3.ex:82

warning: function ExAws.S3.delete_object/2 is undefined (module ExAws.S3 is not available)
  lib/arc/storage/s3.ex:29

warning: function ExAws.S3.presigned_url/5 is undefined (module ExAws.S3 is not available)
  lib/arc/storage/s3.ex:85

warning: function ExAws.S3.put_object/4 is undefined (module ExAws.S3 is not available)
  lib/arc/storage/s3.ex:44

warning: function ExAws.S3.upload/4 is undefined (module ExAws.S3 is not available)
  lib/arc/storage/s3.ex:56

warning: function ExAws.S3.Upload.stream_file/1 is undefined (module ExAws.S3.Upload is not available)
  lib/arc/storage/s3.ex:55

Generated arc app

First it seems that when the S3 functionality is not needed then it shouldn't be compiled in. Simply wrapping the modules with an if test of if the ExAws module is found or not along with an optional dependency on it so ExAws gets compiled first will fix 'most' of those. Another is an unused binding big and a deprecation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant