Giter VIP home page Giter VIP logo

Comments (3)

Pedro-Giorgiano avatar Pedro-Giorgiano commented on July 17, 2024 1

Many thanks all, after including the modules and updating the lib it resolved!!

from erlware_commons.

ferd avatar ferd commented on July 17, 2024

This is likely due to a dependency declaration issues, since these functions exist. Either the compiler app would need to be added to erlware_commons, or the app needs to be added as an extra dialyzer app to make it available to analysis.

from erlware_commons.

ariel-anieli avatar ariel-anieli commented on July 17, 2024

@Pedro-Giorgiano, did you run these commands?

# dialyzer --build_plt --apps erts kernel stdlib # crypto compiler syntax_tools 
  Creating PLT /home/ariel/.cache/erlang/.dialyzer_plt ...
Unknown functions:
  compile:file/2 (c.erl:385:10)
  compile:forms/2 (escript.erl:647:12)
  compile:noenv_forms/2 (erl_abstract_code.erl:10:9)
  compile:noenv_forms/2 (qlc_pt.erl:444:14)
  compile:output_generated/1 (c.erl:444:10)
  crypto:crypto_one_time/5 (beam_lib.erl:987:11)
  crypto:start/0 (beam_lib.erl:1023:10)
  crypto:strong_rand_bytes/1 (net_kernel.erl:2094:37)
Unknown types:
  compile:option/0 (c.erl:92:19)
  compile:option/0 (erl_expand_records.erl:42:26)
  compile:option/0 (erl_lint.erl:52:47)
  compile:option/0 (qlc.erl:541:32)
  compile:option/0 (qlc_pt.erl:73:32)
 done in 0m19.93s
done (warnings were emitted)

# dialyzer src/ec_compile.erl 
  Checking whether the PLT /home/ariel/.cache/erlang/.dialyzer_plt is up-to-date... yes
  Proceeding with analysis...
Unknown functions:
  compile:forms/2 (/home/ariel/src/erlang/erlware_commons/src/ec_compile.erl:118:5)
  erl_prettypr:format/1 (/home/ariel/src/erlang/erlware_commons/src/ec_compile.erl:39:15)
  erl_syntax:form_list/1 (/home/ariel/src/erlang/erlware_commons/src/ec_compile.erl:39:35)
  erl_syntax:meta/1 (/home/ariel/src/erlang/erlware_commons/src/ec_compile.erl:131:35)
 done in 0m0.10s
done (warnings were emitted)

If yes, then as @ferd said, the missing modules should be included: syntax_tools contains erl_prettypr & erl_syntax

# dialyzer --build_plt --apps erts kernel stdlib crypto compiler syntax_tools
  Creating PLT /home/ariel/.cache/erlang/.dialyzer_plt ... done in 0m38.58s
done (passed successfully)

# dialyzer src/ec_compile.erl 
  Checking whether the PLT /home/ariel/.cache/erlang/.dialyzer_plt is up-to-date... yes
  Proceeding with analysis... done in 0m0.22s
done (passed successfully)

For comparison, rebar3 dialyzer raises no warning:

# rebar3 dialyzer
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling erlware_commons
===> Dialyzer starting, this may take a while...
===> Updating plt...
===> Resolving project files...
===> Checking 214 files in _build/default/rebar3_26.2.5_plt...
===> Doing success typing analysis...
===> Resolving project warning files...
===> Analyzing 18 files with _build/default/rebar3_26.2.5_plt...

from erlware_commons.

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.