Skip to content

Commit

Permalink
Merge branch 'pu'
Browse files Browse the repository at this point in the history
  • Loading branch information
vladdu committed Apr 21, 2017
2 parents d37d91b + 1bd5ad2 commit 1528fe0
Show file tree
Hide file tree
Showing 136 changed files with 2,512 additions and 1,017 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ build/
TEST-*.*



server/erlide_ide
*.crashdump
43 changes: 29 additions & 14 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ pipeline {
steps{
script {
compile()
analyze()
analyze1()
}
}
}

stage('Test') {
steps{
script {
test()
analyze2()
}
}
}
Expand Down Expand Up @@ -61,14 +70,9 @@ pipeline {

def checkout() {
deleteDir()
if(env.BRANCH_NAME != null) { // multi branch
checkout scm
git_branch = env.BRANCH_NAME
} else {
git url: '[email protected]:vladdu/erlide_kernel.git', branch: 'pu'
sh 'git symbolic-ref --short HEAD > GIT_BRANCH'
git_branch=readFile('GIT_BRANCH').trim()
}
checkout scm
git_branch = env.BRANCH_NAME

sh('git rev-parse HEAD > GIT_COMMIT')
git_commit=readFile('GIT_COMMIT')
short_commit=git_commit.take(6)
Expand All @@ -79,13 +83,24 @@ def checkout() {
def compile() {
sh "chmod u+x build"
sh "./build"
sleep 2L
}

def test() {
sh "chmod u+x build"
sh "./build test"
sleep 2L
sh "find . -name \"TEST-*.xml\" -exec xargs rename -v 's/\"//' {} \\;"
}

def analyze() {
step([$class: 'WarningsPublisher', canComputeNew: false, canResolveRelativePaths: false,
consoleParsers: [[parserName: 'Erlang Compiler (erlc)']],
def analyze1() {
step([$class: 'WarningsPublisher', canComputeNew: false, canResolveRelativePaths: true, canRunOnFailed: true,
consoleParsers: [[parserName: 'Erlang Compiler (erlc)'], [parserName: 'Maven']],
excludePattern: '', healthy: '', includePattern: '', messagesPattern: '', unHealthy: ''])
step([$class: 'TasksPublisher', canComputeNew: false, excludePattern: '**/_build/**/*.*', healthy: '', high: 'FIXME,XXX', low: '', normal: 'TODO', pattern: '**/*.erl,**/*.hrl', unHealthy: ''])
}

def analyze2() {
step([$class: 'AnalysisPublisher', canComputeNew: false, healthy: '', unHealthy: ''])
step([$class: 'JUnitResultArchiver', allowEmptyResults: true, testResults: '**/TEST*.xml'])
//step([$class: 'JacocoPublisher', exclusionPattern: '', sourcePattern: '**/src/'])
Expand All @@ -108,8 +123,8 @@ def buildEclipse() {
}

def buildServer() {
sh "cd server && ./build && cd .."
step([$class: 'ArtifactArchiver', artifacts: "server/erlide_ide", fingerprint: true])
sh "cd ide && ./build escriptize && cd .."
step([$class: 'ArtifactArchiver', artifacts: "ide/_build/default/bin/erlide_ide", fingerprint: true])
}

@NonCPS
Expand Down
11 changes: 9 additions & 2 deletions build
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,18 @@ export REBAR_COLOR="low"
#export QUIET=1

main() {
arg=$1

setup_otp
find . -name build | xargs chmod u+x

cmds="do clean -a, compile, eunit -c -v, cover -v"
if [ "$arg" != "test" ]; then
cmds="do clean -a, compile -v"
else
cmds="do eunit -c -v, cover -v"
fi

set -e
cd common
./build $cmds
cd ../debugger
Expand All @@ -40,4 +47,4 @@ main() {
cd ..
}

time main
main "$@"
4 changes: 2 additions & 2 deletions build_utils.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/bash
#! /bin/bash -e

declare -A OTP_VSNS=( ["17"]="17.5" ["18"]="18.3" ["19"]="19.2")
declare -A OTP_VSNS=( ["17"]="17.5" ["18"]="18.3" ["19"]="19.3")

build_project() {
REBAR=$1
Expand Down
17 changes: 17 additions & 0 deletions common/apps/erlide_builder/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>erlide_builder</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.erlide.core.erlbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.erlide.core.erlnature</nature>
</natures>
</projectDescription>
7 changes: 7 additions & 0 deletions common/apps/erlide_builder/.settings/org.erlide.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
backend_version=17.0
eclipse.preferences.version=1
external_includes=
external_modules=
include_dirs=include;
output_dir=ebin
source_dirs=src;
3 changes: 3 additions & 0 deletions common/apps/erlide_builder/.settings/org.erlide.model.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
builderData=INTERNAL|compile|clean|test|
configType=INTERNAL
eclipse.preferences.version=1
File renamed without changes.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{erlide_context, builder},
{registered, []},
{applications, [kernel, stdlib, erlide_common]},
{env, []},
{mod, {erlide_builder_app, []}}
{env, []}
]}
.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

%%-define(DEBUG, 1).

-include("erlide_dbglog.hrl").
-include_lib("erlide_common/include/erlide_dbglog.hrl").

-define(ERROR, 0).
-define(WARNING, 1).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
]).

init(MaxParallelBuilds) ->
io:format("Start builder app~n"),
spawn(fun()->
erlide_pool:start(erlide_builder, MaxParallelBuilds),
ok
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
%% --------------------------------------------------------------------

%%-define(DEBUG, 1).
-include("erlide_dbglog.hrl").
-include_lib("erlide_common/include/erlide_dbglog.hrl").


%% --------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
%% --------------------------------------------------------------------

%%-define(DEBUG, 1).
-include("erlide_dbglog.hrl").
-include_lib("erlide_common/include/erlide_dbglog.hrl").


%% --------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

% -define(DEBUG, 1).

-include("erlide_dbglog.hrl").
-include_lib("erlide_common/include/erlide_dbglog.hrl").

%%
%% Include files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

%%-define(DEBUG, 1).

-include("erlide_dbglog.hrl").
-include_lib("erlide_common/include/erlide_dbglog.hrl").

%% dummy i/o server to capture output from yecc and convert it to warnings/errors

Expand Down
4 changes: 2 additions & 2 deletions common/apps/erlide_common/.settings/org.erlide.core.prefs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
backend_version=R15
backend_version=17.0
compiler/warn_deprecated_function=true
compiler/warn_export_all=true
compiler/warn_export_vars=true
Expand All @@ -13,5 +13,5 @@ external_includes=
external_modules=
include_dirs=include;
output_dir=ebin
source_dirs=src;src/builder;
source_dirs=src;
use_pathz=false
28 changes: 0 additions & 28 deletions common/apps/erlide_common/rebar.config

This file was deleted.

8 changes: 2 additions & 6 deletions common/apps/erlide_common/src/erlide_backend.erl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
compile_string/1,
start_tracer/1,

get_system_info/0,
get_module_info/1
]).

Expand All @@ -44,7 +43,7 @@ parse_term(Str) ->

parse_term_raw(Str) ->
%% erlide_log:logp(Str),
%% use the OTP erl_scan here!
%% use the OTP erl_scan here!
{ok, Tokens, _} = erl_scan:string(Str),
%% erlide_log:logp(Tokens),
R=erl_parse:parse_term(Tokens),
Expand Down Expand Up @@ -121,7 +120,7 @@ execute(StrFun, Args) ->
catch case parse_string(StrMod) of
{ok, Mod} ->
{ok, erlide_execute_tmp,Bin} = compile:forms(Mod, [report,binary]),
code:load_binary(erlide_execute_tmp, "erlide_execute_tmp.erl", Bin),
_ = code:load_binary(erlide_execute_tmp, "erlide_execute_tmp.erl", Bin),
Res = erlide_execute_tmp:exec(Args),
code:delete(erlide_execute_tmp),
code:purge(erlide_execute_tmp),
Expand Down Expand Up @@ -210,6 +209,3 @@ print_opts({K, V}) ->
print_opts(X) ->
io_lib:format(" ~p~n", [X]).

get_system_info() ->
lists:flatten(io_lib:format("~p~n", [erlide_monitor:get_state()])).

3 changes: 1 addition & 2 deletions common/apps/erlide_common/src/erlide_common.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{erlide_context, common},
{registered, []},
{applications, [kernel, stdlib]},
{env, []},
{mod, {erlide_common_app, []}}
{env, []}
]}
.
1 change: 1 addition & 0 deletions common/apps/erlide_common/src/erlide_common_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
]).

init(JRex, Kill, HeapWarnLimit, HeapKillLimit) ->
io:format("Start common app~n"),
spawn(fun () ->
startup(JRex, Kill, HeapWarnLimit, HeapKillLimit)
end).
Expand Down
12 changes: 6 additions & 6 deletions common/apps/erlide_common/src/erlide_shell.erl
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ handle_input(Client, State, Input) ->
{done, Result, []} ->
#io_request{from = From,
reply_as = ReplyAs} = FirstReq,
io_reply(From, ReplyAs, Result),
_ = io_reply(From, ReplyAs, Result),
case length(RestReqs) of
0 ->
{ok, idle};
Expand All @@ -126,7 +126,7 @@ handle_input(Client, State, Input) ->
{done, Result, RestChars} ->
#io_request{from = From,
reply_as = ReplyAs} = FirstReq,
io_reply(From, ReplyAs, Result),
_ = io_reply(From, ReplyAs, Result),
case length(RestReqs) of
0 ->
{ok, {pending_input, RestChars}};
Expand All @@ -150,7 +150,7 @@ put_chars(From, ReplyAs, State, Encoding, Mod, Fun, Args) ->
end,
FlatText = string_flatten(Text),
send_event(FlatText, From, Encoding),
io_reply(From, ReplyAs, ok),
_ = io_reply(From, ReplyAs, ok),
{ok, State}.


Expand Down Expand Up @@ -181,7 +181,7 @@ get_until(From, ReplyAs, Client, State, _Encoding, Prompt, Mod, Fun, Args) ->
put_chars(From, ReplyAs, State, Encoding, Text) ->
FlatText = string_flatten(Text),
send_event(FlatText, From, Encoding),
io_reply(From, ReplyAs, ok),
_ = io_reply(From, ReplyAs, ok),
{ok, State}.


Expand Down Expand Up @@ -213,13 +213,13 @@ handle_io_request(Client, State, From, ReplyAs, IoRequest) ->
handle_io_requests(Client, State, From, ReplyAs, IoReqests);

getopts ->
io_reply(From, ReplyAs, [{encoding, latin1}]),
_ = io_reply(From, ReplyAs, [{encoding, latin1}]),
{ok, State};

UnexpectedIORequest ->
loginfo("~p:handle_io_request: Unexpected IORequest:~p~n",
[?MODULE, UnexpectedIORequest]),
io_reply(From, ReplyAs, ok),
_ = io_reply(From, ReplyAs, ok),
{ok, State}
end.

Expand Down
2 changes: 1 addition & 1 deletion common/apps/erlide_tools/.settings/org.erlide.core.prefs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
backend_version=R15
backend_version=17.0
compiler/warn_deprecated_function=true
compiler/warn_export_all=true
compiler/warn_export_vars=true
Expand Down
29 changes: 0 additions & 29 deletions common/apps/erlide_tools/rebar.config

This file was deleted.

1 change: 0 additions & 1 deletion common/apps/erlide_tools/src/erlide_dialyze.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
%% Author: jakob
%% Created: 17 feb 2010
%% Description: TODO: Add description to erlide_dialyze
-module(erlide_dialyze).

%%
Expand Down
Loading

0 comments on commit 1528fe0

Please sign in to comment.