Giter VIP home page Giter VIP logo

mix_mib's Introduction

Erlang SNMP MIB compiler for Mix

Build Status

This project provides a Mix compiler that simplifies usage of Erlang SNMP MIB compiler.

Installation

The package can be installed by adding mix_mib to your list of dependencies in mix.exs and by adding :mibs to compilers list:

def project do
  [
    # ...
    compilers: [:mibs | Mix.compilers],
    deps: [
      # ...
      {:mix_mib, "~> 1.0.0", runtime: false},
    ]
  ]
end

The default compiler's behaviour can be modified by putting the following options in the project options:

  • mib_paths (default: ["mibs", "src"]) - source directories for .mib and .func files;
  • mib_output (default: "priv/mibs/") - directory to put compiled .bin file;
  • mib_options (default: [il: ['otp_mibs/priv/mibs/']]) - additional options for the compiler, but outdir and i options will be overriden.

License

MIT

mix_mib's People

Contributors

nicolas-talfer avatar rumataestor avatar

Watchers

 avatar  avatar  avatar

Forkers

ntalfer

mix_mib's Issues

Fix compilation warnings and improve doc

hi @RumataEstor thanks for your great work

I noticed 2 warnings using Elixir 1.13 (haven't checked prior versions).

The 1st one appears when compiling mix_mib:

==> mix_mib
Compiling 1 file (.ex)
warning: :snmpc.compile/2 defined in application :snmp is used by the current application but the current application does not depend on :snmp. To fix this, you must do one of:

  1. If :snmp is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs

  2. If :snmp is a dependency, make sure it is listed under "def deps" in your mix.exs

  3. In case you don't want to add a requirement to :snmp, you may optionally skip this warning by adding [xref: [exclude: [:snmpc]]] to your "def project" in mix.exs

  lib/mix_mib.ex:114: Mix.Tasks.Compile.Mibs.do_compile_mib/2

The 2nd appears when using this task:

==> my_app
warning: Mix compiler :mibs was supposed to return {:ok | :noop | :error, [diagnostic]} but it returned nil

Finally the compiler name that shall be indicated in the list of project compilers is :mibs instead of :mix_mib

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.