Edwin would you refactor this patch so it applies to current next?

On Tue, Oct 21, 2008 at 8:44 PM, Eric Merritt <[EMAIL PROTECTED]> wrote:
> Guys,
>
>  Its all good. This stuff keeps me busy if nothing else. I will see if
> I can get this stuff sorted out shortly.
>
> Thanks,
>  Eric
>
> On Tue, Oct 21, 2008 at 9:38 PM, Edwin Fine <[EMAIL PROTECTED]> wrote:
>> Eric,
>>
>> I had no idea. My deepest condolences. At a time like this, nobody expects
>> you to be concerned with Sinan, certainly not me. Please don't feel the need
>> to work on this or any other issue; go and do what you need to do. I'm sure
>> that Sinan and its users can do without you until you're ready to continue.
>>
>> Regards,
>> Edwin
>>
>> On Tue, Oct 21, 2008 at 10:14 PM, Eric Merritt <[EMAIL PROTECTED]> wrote:
>>>Gu
>>> Edwin,
>>>
>>>  Sorry about my slow response here. My father died on sunday and I am
>>> a little wrapped up in dealing with it. Man this has been a crazy
>>> year. I promise I will get to this by the end of the week.
>>>
>>> Thanks,
>>>  Eric
>>>
>>> On Sat, Oct 18, 2008 at 11:44 PM, Edwin Fine <[EMAIL PROTECTED]> wrote:
>>> >
>>> > ---
>>> >  _build.cfg                                |   10 +++++++---
>>> >  server/sinan/src/sin_build_arg_parser.erl |   12 ++++++------
>>> >  server/sinan/src/sin_build_config.erl     |   29
>>> > +++++++++++++++++++----------
>>> >  server/sinan/src/sin_erl_builder.erl      |    1 +
>>> >  4 files changed, 33 insertions(+), 19 deletions(-)
>>> >
>>> > diff --git a/_build.cfg b/_build.cfg
>>> > index 24aca33..974075a 100644
>>> > --- a/_build.cfg
>>> > +++ b/_build.cfg
>>> > @@ -1,7 +1,7 @@
>>> >
>>> >  project : {
>>> >    name : sinan
>>> > -   vsn  : "0.11.0.0"
>>> > +   vsn  : "0.11.0.1"
>>> >
>>> >  },
>>> >
>>> > @@ -9,6 +9,10 @@ repositories : ["http://repo.erlware.org/pub";],
>>> >
>>> >  dist : {
>>> >      include_dirs : ["client"]
>>> > -}
>>> > -
>>> > +},
>>> >
>>> > +tasks : {
>>> > +    build : {
>>> > +        compile_args : "-W1 -Dfoobar +debug_info"
>>> > +    }
>>> > +}
>>> > diff --git a/server/sinan/src/sin_build_arg_parser.erl
>>> > b/server/sinan/src/sin_build_arg_parser.erl
>>> > index a562cf9..897f12b 100644
>>> > --- a/server/sinan/src/sin_build_arg_parser.erl
>>> > +++ b/server/sinan/src/sin_build_arg_parser.erl
>>> > @@ -67,7 +67,7 @@ compile_build_args([$\ | T], Acc) ->
>>> >     compile_build_args(T, Acc);
>>> >  compile_build_args([$\r | T], Acc) ->
>>> >     compile_build_args(T, Acc);
>>> > -compile_build_args([$\l | T], Acc) ->
>>> > +compile_build_args([$\f | T], Acc) ->
>>> >     compile_build_args(T,  Acc);
>>> >  compile_build_args([$\n | T], Acc) ->
>>> >     compile_build_args(T,  Acc);
>>> > @@ -102,7 +102,7 @@ eat_space([$\ | T], Acc, Handler) ->
>>> >     eat_space(T, Acc, Handler);
>>> >  eat_space([$\r | T], Acc, Handler) ->
>>> >     eat_space(T, Acc, Handler);
>>> > -eat_space([$\l | T], Acc, Handler) ->
>>> > +eat_space([$\f | T], Acc, Handler) ->
>>> >     eat_space(T, Acc, Handler);
>>> >  eat_space([$\n | T], Acc, Handler) ->
>>> >     eat_space(T, Acc, Handler);
>>> > @@ -122,7 +122,7 @@ parse_define([$\ | T], LAcc, Acc) ->
>>> >     compile_build_args(T, [{d, list_to_atom(lists:reverse(LAcc))} |
>>> > Acc]);
>>> >  parse_define([$\r | T], LAcc, Acc) ->
>>> >     compile_build_args(T, [{d, list_to_atom(lists:reverse(LAcc))} |
>>> > Acc]);
>>> > -parse_define([$\l | T], LAcc, Acc) ->
>>> > +parse_define([$\f | T], LAcc, Acc) ->
>>> >     compile_build_args(T, [{d,list_to_atom(lists:reverse(LAcc))} |
>>> > Acc]);
>>> >  parse_define([$\n | T], LAcc, Acc) ->
>>> >     compile_build_args(T, [{d, list_to_atom(lists:reverse(LAcc))} |
>>> > Acc]);
>>> > @@ -155,7 +155,7 @@ parse_define_value([$\ | T], LAcc) ->
>>> >     {lists:reverse(LAcc), T};
>>> >  parse_define_value([$\r | T], LAcc) ->
>>> >     {lists:reverse(LAcc), T};
>>> > -parse_define_value([$\l | T], LAcc) ->
>>> > +parse_define_value([$\f | T], LAcc) ->
>>> >     {lists:reverse(LAcc), T};
>>> >  parse_define_value([$\n | T], LAcc) ->
>>> >     {lists:reverse(LAcc), T};
>>> > @@ -182,7 +182,7 @@ parse_include([$\ | T], LAcc, Acc) ->
>>> >     compile_build_args(T, [{i, lists:reverse(LAcc)} | Acc]);
>>> >  parse_include([$\r | T], LAcc, Acc) ->
>>> >     compile_build_args(T, [{i, lists:reverse(LAcc)} | Acc]);
>>> > -parse_include([$\l | T], LAcc, Acc) ->
>>> > +parse_include([$\f | T], LAcc, Acc) ->
>>> >     compile_build_args(T, [{i, lists:reverse(LAcc)} | Acc]);
>>> >  parse_include([$\n | T], LAcc, Acc) ->
>>> >     compile_build_args(T, [{i, lists:reverse(LAcc)} | Acc]);
>>> > @@ -206,7 +206,7 @@ parse_term([$\ | T], LAcc, Acc) ->
>>> >     compile_build_args(T, [list_to_atom(lists:reverse(LAcc)) | Acc]);
>>> >  parse_term([$\r | T], LAcc, Acc) ->
>>> >     compile_build_args(T, [list_to_atom(lists:reverse(LAcc)) | Acc]);
>>> > -parse_term([$\l | T], LAcc, Acc) ->
>>> > +parse_term([$\f | T], LAcc, Acc) ->
>>> >     compile_build_args(T, [list_to_atom(lists:reverse(LAcc)) | Acc]);
>>> >  parse_term([$\n | T], LAcc, Acc) ->
>>> >     compile_build_args(T, [list_to_atom(lists:reverse(LAcc)) | Acc]);
>>> > diff --git a/server/sinan/src/sin_build_config.erl
>>> > b/server/sinan/src/sin_build_config.erl
>>> > index bfc148f..8b84b18 100644
>>> > --- a/server/sinan/src/sin_build_config.erl
>>> > +++ b/server/sinan/src/sin_build_config.erl
>>> > @@ -220,14 +220,7 @@ init([ProjectDir]) ->
>>> >             {stop, Error}
>>> >     end;
>>> >  init([BuildId, ProjectDir, Override]) ->
>>> > -    BuildConfig = filename:join([ProjectDir, "_build.cfg"]),
>>> > -    Config =
>>> > -        case sin_utils:file_exists(filename:join([ProjectDir,
>>> > "_build.cfg"])) of
>>> > -            true ->
>>> > -                process_build_config(ProjectDir, BuildConfig);
>>> > -            false ->
>>> > -                dict:new()
>>> > -        end,
>>> > +    Config = get_config(ProjectDir),
>>> >     NewConfig = merge_config(Config, Override, ""),
>>> >     sin_config_registry:register_config(BuildId, self()),
>>> >     {ok, #state{config = NewConfig, build_id = BuildId,
>>> > @@ -236,10 +229,11 @@ init([BuildId, ProjectDir, Override]) ->
>>> >  init([BuildId, ProjectDir, Config, Override]) ->
>>> >     OverrideDict = merge_config(dict:new(), Override, ""),
>>> >     Flavor = get_build_flavor(Config, OverrideDict),
>>> > -    NewConfig = merge_config(apply_flavors(Config, Flavor), Override,
>>> > ""),
>>> > +    NewConfig0 = merge_config(apply_flavors(Config, Flavor), Override,
>>> > ""),
>>> > +    BuildConfigDict = get_config(ProjectDir),
>>> > +    NewConfig = merge_config(NewConfig0, dict:to_list(BuildConfigDict),
>>> > ""),
>>> >     BuildRoot = filename:join([ProjectDir, in_get_value(NewConfig,
>>> > "build_dir",
>>> >                                                         "_build")]),
>>> > -
>>> >     BuildDir = filename:join([BuildRoot, Flavor]),
>>> >     NewConfig1 = in_store("build.dir", NewConfig, BuildDir),
>>> >     NewConfig2 = in_store("build.root", NewConfig1, BuildRoot),
>>> > @@ -264,6 +258,21 @@ get_build_flavor(Config, Override) ->
>>> >
>>> >  %%--------------------------------------------------------------------
>>> >  %% @doc
>>> > +%%  Return the build configuration based on the project _build.cfg file
>>> > +%% @spec get_config(ProjectDir) -> dict()
>>> > +%% @end
>>> > +%%--------------------------------------------------------------------
>>> > +get_config(ProjectDir) ->
>>> > +    BuildConfig = filename:join([ProjectDir, "_build.cfg"]),
>>> > +    case sin_utils:file_exists(filename:join([ProjectDir,
>>> > "_build.cfg"])) of
>>> > +        true ->
>>> > +            process_build_config(ProjectDir, BuildConfig);
>>> > +        false ->
>>> > +            dict:new()
>>> > +    end.
>>> > +
>>> > +%%--------------------------------------------------------------------
>>> > +%% @doc
>>> >  %%  Apply flavor changes to the config file.
>>> >  %% @spec (Config, Flavor) -> NewConfig
>>> >  %% @end
>>> > diff --git a/server/sinan/src/sin_erl_builder.erl
>>> > b/server/sinan/src/sin_erl_builder.erl
>>> > index 84109f5..1982ed1 100644
>>> > --- a/server/sinan/src/sin_erl_builder.erl
>>> > +++ b/server/sinan/src/sin_erl_builder.erl
>>> > @@ -229,6 +229,7 @@ build_app(BuildRef, Env, AppName, Args) ->
>>> >     Options = Args ++ [{outdir, Target}, strict_record_tests,
>>> >                        return_errors, return_warnings,
>>> >                        {i, filename:join([AppDir, "include"])} |
>>> > Includes],
>>> > +    eta_event:task_event(BuildRef, ?TASK, compile_args, {"Compile
>>> > args:~n~p", [Options]}),
>>> >     Ignorables = sin_build_config:get_value(BuildRef, "ignore_dirs",
>>> > []),
>>> >     sin_utils:copy_dir(AppBuildDir, AppDir, "", Ignorables),
>>> >     code:add_patha(Target),
>>> > --
>>> > 1.5.4.3
>>> >
>>> >
>>> > >
>>> >
>>>
>>>
>>
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"erlware-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/erlware-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to