Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Travis dialyze #620

Merged
merged 7 commits into from Feb 1, 2018
Merged

Travis dialyze #620

merged 7 commits into from Feb 1, 2018

Conversation

ghost
Copy link

@ghost ghost commented Aug 30, 2016

There are new Dialyzer errors. To not introduce any new warnings, try to enable Dialyzer on Travis-CI.

@ghost
Copy link
Author

ghost commented Aug 19, 2017

Finally figured out how to structure travis config and the results look good. One inttest CI timeout on 18 and as expected errors in the separate Dialyzer job. If we don't merge this, we will only accumulate more Dialyzer errors.

@ghost
Copy link
Author

ghost commented Aug 20, 2017

Waiting for #643 to be merged.

@ghost
Copy link
Author

ghost commented Aug 20, 2017

With the two silenced opaque match warnings, we're down to this (from https://travis-ci.org/rebar/rebar/jobs/266578662):

src/rebar_config.erl:103: Record construction
#config{dir::'undefined',
  opts::[any()],
  globals::dict:dict(_,_),
  envs::dict:dict(_,_),
  skip_dirs::dict:dict(_,_),
  xconf::dict:dict(_,_)}
violates the declared type of field dir::string()
src/rebar_core.erl:334: The call
rebar_config:new(ParentConfig::rebar_config:config()) contains an
opaque term as 1st argument when a structured term of type string() is
expected

I want to say when calling rebar_config:new, it should also set dir to CWD, but not sure.


src/rebar_erlc_compiler.erl:543: Function compile_mib/3 has no local return
src/rebar_erlc_compiler.erl:554: Record construction
#options{includes::[],
  outdir::[46,...],
  defines::[],
  warning::1,
  verbose::'false',
  optimize::999,
  specific::[],
  outfile::[],
  cwd::'undefined'}
violates the declared type of field cwd::string()
src/rebar_erlc_compiler.erl:556: Record construction
#options{includes::[],
  outdir::[46,...],
  defines::[],
  warning::1,
  verbose::'false',
  optimize::999,
  specific::[{'verbosity',_},...],
  outfile::[],
  cwd::'undefined'}
violates the declared type of field cwd::string()

Not sure. Maybe related to the rebar_config warning above?


src/rebar_xref.erl:261: The pattern {Source, 'function_not_found'} can
never match since previous clauses completely covered the type
{'module_not_found','function_not_found'}
src/rebar_xref.erl:262: The pattern {Source, Line} can never match
since previous clauses completely covered the type
{'module_not_found','function_not_found'}
src/rebar_xref.erl:268: Function safe_element/2 will never be called
src/rebar_xref.erl:287: Function find_function_source/4 has no local return

Tried to fix this, but couldn't figure it out.

@ghost ghost mentioned this pull request Aug 21, 2017
@ghost
Copy link
Author

ghost commented Aug 26, 2017

@lrascao, maybe Dialyzer is more capable in 20.0 and has revealed issues that are quite old. I mean, that discrepancy in rebar_config looks risky to fix by overriding/initializing the dir with CWD. Any thoughts on whether we should instead try to silence the warning, or do you have an idea how to resolve it?

@lrascao
Copy link
Contributor

lrascao commented Aug 27, 2017

The only idea i have is to use cwd, but as you say, it's probably not worth the risk, if there's a way to instead silence the warning that would be preferable

@ghost
Copy link
Author

ghost commented Jan 30, 2018

In order to get this merged and not get lost, we now allow the Dialyzer job to fail.

@lrascao lrascao merged commit b6d3094 into rebar:master Feb 1, 2018
@ghost ghost deleted the travis-dialyze branch February 1, 2018 09:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant