GithubHelp home page GithubHelp logo

Comments (7)

rrrene avatar rrrene commented on September 27, 2024

Hi!

Puh, I honestly have no idea what could cause this error ...

@josevalim could you point us in the right direction what might cause module XY was not compiled with flag --docs?

from inch_ex.

josevalim avatar josevalim commented on September 27, 2024

First of all, there is no Error module here:

raise(Error, message: "module #{inspect module} is not defined/available")

You probably want to define an alias or do InchCI.Error or whatever it is.

Second, @pprzetacznik are you setting compiler_options somehow? How are you compiling your code? what is your elixir version. Info is appreciated.

from inch_ex.

rrrene avatar rrrene commented on September 27, 2024

@josevalim D'uh! I added the alias and published v0.3.4 of InchEx.

@pprzetacznik When you rerun the test, we should now get the appropriate error message ("module IElixir.HMAC was not compiled with flag --docs").

from inch_ex.

pprzetacznik avatar pprzetacznik commented on September 27, 2024

@rrrene @josevalim I have build it with version v0.3.4 and it's still the same.
This is build: https://travis-ci.org/pprzetacznik/IElixir/builds/75533087 (please note only last command)

1.12s$ MIX_ENV=docs mix inch.report
** (InchEx.Docs.Retriever.Error) module IElixir.HMAC was not compiled with flag --docs
    lib/inch_ex/docs/retriever.ex:85: InchEx.Docs.Retriever.verify_module/1
    lib/inch_ex/docs/retriever.ex:72: InchEx.Docs.Retriever.get_module/2
    (elixir) lib/enum.ex:1043: anonymous fn/3 in Enum.map/2
    (elixir) lib/enum.ex:1385: Enum."-reduce/3-lists^foldl/2-0-"/3
    (elixir) lib/enum.ex:1043: Enum.map/2
    lib/inch_ex/docs/retriever.ex:51: InchEx.Docs.Retriever.docs_from_modules/2
    lib/inch_ex.ex:39: InchEx.generate_docs/4
    lib/mix/tasks/inch.ex:44: Mix.Tasks.Inch.run/4
00:41:35.306 [error] Process #PID<0.48.0> raised an exception
** (InchEx.Docs.Retriever.Error) module IElixir.HMAC was not compiled with flag --docs
    lib/inch_ex/docs/retriever.ex:85: InchEx.Docs.Retriever.verify_module/1
    lib/inch_ex/docs/retriever.ex:72: InchEx.Docs.Retriever.get_module/2
    (elixir) lib/enum.ex:1043: anonymous fn/3 in Enum.map/2
    (elixir) lib/enum.ex:1385: Enum."-reduce/3-lists^foldl/2-0-"/3
    (elixir) lib/enum.ex:1043: Enum.map/2
    lib/inch_ex/docs/retriever.ex:51: InchEx.Docs.Retriever.docs_from_modules/2
    lib/inch_ex.ex:39: InchEx.generate_docs/4
    lib/mix/tasks/inch.ex:44: Mix.Tasks.Inch.run/4

This is how I bumped the version: pprzetacznik/IElixir@ec4763d

My .travis file: https://github.com/pprzetacznik/IElixir/blob/ec4763dc4d7c44bf2ecbb8a9c622c91739f94d9c/.travis.yml
My mix.exs file: https://github.com/pprzetacznik/IElixir/blob/ec4763dc4d7c44bf2ecbb8a9c622c91739f94d9c/mix.exs
My mix.lock file: https://github.com/pprzetacznik/IElixir/blob/ec4763dc4d7c44bf2ecbb8a9c622c91739f94d9c/mix.lock


On the other hand when I reduce Elixir version from 1.1-dev to 1.0.5 it works and I get:

$ MIX_ENV=docs mix inch.report
Successfully created build #1
URL: http://inch-ci.org/github/pprzetacznik/IElixir

This is build for:

My .travis file: https://github.com/pprzetacznik/IElixir/blob/feature/inch-ci/.travis.yml
My mix.exs file: https://github.com/pprzetacznik/IElixir/blob/feature/inch-ci/mix.exs
My mix.lock file: https://github.com/pprzetacznik/IElixir/blob/feature/inch-ci/mix.lock

This commit: pprzetacznik/IElixir@4248e8d is the only difference.

from inch_ex.

josevalim avatar josevalim commented on September 27, 2024

The bug is here:

case Code.get_docs(module, :all) do

@rrrene, you should not pattern match on the list. Elixir v1.1 adds more items to the returned result and then it breaks your code.

from inch_ex.

rrrene avatar rrrene commented on September 27, 2024

@josevalim Ah, sure!

@pprzetacznik Okay, I made the changes, tested it locally and released v0.4.0-dev. Can you please test on your end using this version:

{:inch_ex, "0.4.0-dev", only: :docs}

If it succeeds, I will release the "real" v0.4.0! 👍

from inch_ex.

pprzetacznik avatar pprzetacznik commented on September 27, 2024

@josevalim @rrrene
https://travis-ci.org/pprzetacznik/IElixir/jobs/75671557
It works, thanks!

from inch_ex.

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.