From gunilla@REDACTED Thu Dec 1 15:03:08 2005 From: gunilla@REDACTED (Gunilla Arendt) Date: Thu, 01 Dec 2005 15:03:08 +0100 Subject: Error with debuger and fun's in Erlang R10B-8 References: <438ACAC8.9010608@skipper.dk> Message-ID: Thanks, the bug is now fixed. The new version of Debugger will be part of R10B-9, probably to be released in December. / Gunilla Jakob Skipper wrote: > % This code fails in Erlang R10B8 when debugger is running. > % > % Do the following: > % * Compile this module > % * Run "debugger_fun:test()", output is [yes,no,no,no] > % * Start the debugger "debugger:start" and interpret this module; no > breakpoints etc. necessary > % * Run "debugger_fun:test()" again, output is now [no,no,no,no] > > -module(debugger_fun). > -export([test/0]). > > > n(N) -> > lists:map( > fun(X) when N==X -> > yes; > (_) -> > no > end, > [1,2,3,4] > ). > > test() -> > n(1). > > > If you replace the "when" clause in the fun with a case expression then > it works fine. > > -- > Jakob Skipper > Skipper ApS > jakob@REDACTED > +45 5192 4447 From nicolas@REDACTED Mon Dec 5 23:49:44 2005 From: nicolas@REDACTED (Nicolas Niclausse) Date: Mon, 05 Dec 2005 23:49:44 +0100 Subject: registered names no longer synced after a slave:start in R10B-8 Message-ID: <4394C408.3040507@niclux.org> With erlang R10b-7, when I start a remote node with slave:start, registered names are automaticaly synced: erl -sname foo -r ssh -setcookie sesame Erlang (BEAM) emulator version 5.4.9 [source] [hipe] [threads:0] Eshell V5.4.9 (abort with ^G) (foo@REDACTED)1> bug:main(). node bar@REDACTED started ping: pong registered: [glob] ok but since R10B-8, this is no longer the case: >erl -sname foo -r ssh -setcookie sesame Erlang (BEAM) emulator version 5.4.10 [source] [threads:0] Eshell V5.4.10 (abort with ^G) (foo@REDACTED)1> bug:main(). node bar@REDACTED started ping: pong registered: [] ok I must do a global:sync by hand. Is it on purpose or is it a bug ? -- Nicolas -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bug.erl URL: From hans.bolinder@REDACTED Tue Dec 6 11:08:01 2005 From: hans.bolinder@REDACTED (Hans Bolinder) Date: 06 Dec 2005 11:08:01 +0100 Subject: registered names no longer synced after a slave:start in R10B-8 References: <4394C408.3040507@niclux.org> Message-ID: nicolas@REDACTED (Nicolas Niclausse) writes: > With erlang R10b-7, when I start a remote node with slave:start, > registered names are automaticaly synced: > ... > > but since R10B-8, this is no longer the case: > ... > I must do a global:sync by hand. > > Is it on purpose or is it a bug ? Due to a mistake global tries to lock 'nonode@REDACTED'. Eventually a timeout occurs and the registered name should be visible on all nodes. This bug will be fixed in R10B-9. Best regards Hans Bolinder, Erlang/OTP From ulf.wiger@REDACTED Sun Dec 25 01:46:06 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Sun, 25 Dec 2005 01:46:06 +0100 Subject: erl_pp botches try-catch clauses Message-ID: erl_pp writes out try-catch clauses in a very strange way that doesn't compile. I was experimenting with the following test function: generate_src_file(File, Tabs, L1) -> Forms = codegen(Tabs, L1), Out = [[erl_pp:form(F), "\n"] || F <- Forms], {ok, _Mod, _Bin} = compile:forms(Forms), {ok, Fd} = file:open(File, [write]), io:fwrite(Fd, "~s~n", [Out]), file:close(Fd). The generated output compiled with a few warnings, but when I tried compiling the file created using erl_pp, I got a compilation error on the following: validate_string(S,Attr,Expected) -> try list_to_binary(S) of _ -> true catch error:_:_ -> throw({type_error,Attr,{expected,Expected}}) end. For some reason, erl_parse adds a {var, L, '_'} to the catch clause in a try expression: [{clause, 44, [{tuple, 44, [{atom,44,error}, {var,44,'_'}, {var,44,'_'}]}], [], [{call, and erl_pp happily puts a colon between the first pattern and the extra '_'. I modified erl_pp.erl as given below (using a case statement, since I guessed that there would be a purpose to that extra pattern, and that it wouldn't always be '_' in the future). Well, at least compiling the erl_pp output gave the same result as compiling the forms (I think... - it's not that easy to compare the results.) /Uffe ws12858> diff -c erl_pp.erl $OTP_ROOT/lib/stdlib-1.13.10/src/erl_pp.erl *** erl_pp.erl Sun Dec 25 01:00:53 2005 --- OTP/lib/stdlib-1.13.10/src/erl_pp.erl Tue Oct 25 13:25:38 2005 *************** *** 466,478 **** body(B, I+4, Hook)]; try_clause({clause,_,[{tuple,_,[C,V,S]}],G,B}, I, Hook) -> Cs = expr(C, I, 0, Hook), ! [case S of ! {var, _, '_'} -> ! Cs, ":", expr(V, indentation(Cs, I)+1, 0, Hook); ! _ -> ! [Cs, ":", expr(V, indentation(Cs, I)+1, 0, Hook), ! ":", expr(S, indentation(Cs, I)+1, 0, Hook)] ! end, guard(G, I, Hook), body(B, I+4, Hook)]. --- 466,473 ---- body(B, I+4, Hook)]; try_clause({clause,_,[{tuple,_,[C,V,S]}],G,B}, I, Hook) -> Cs = expr(C, I, 0, Hook), ! [Cs, ":", expr(V, indentation(Cs, I)+1, 0, Hook), ! ":", expr(S, indentation(Cs, I)+1, 0, Hook), guard(G, I, Hook), body(B, I+4, Hook)]. From nicolas@REDACTED Mon Dec 26 10:10:27 2005 From: nicolas@REDACTED (Nicolas Niclausse) Date: Mon, 26 Dec 2005 10:10:27 +0100 Subject: registered names no longer synced after a slave:start in R10B-8 In-Reply-To: References: <4394C408.3040507@niclux.org> Message-ID: <43AFB383.9080507@niclux.org> Hans Bolinder a ?crit : > nicolas@REDACTED (Nicolas Niclausse) writes: > > >>With erlang R10b-7, when I start a remote node with slave:start, >>registered names are automaticaly synced: >>... >> >>but since R10B-8, this is no longer the case: >>... >>I must do a global:sync by hand. >> >>Is it on purpose or is it a bug ? > > > Due to a mistake global tries to lock 'nonode@REDACTED'. Eventually a > timeout occurs and the registered name should be visible on all nodes. > > This bug will be fixed in R10B-9. I still have the same problem with R10B-9 ... -- Nicolas