From arun.suresh@REDACTED Sun May 2 22:02:59 2010 From: arun.suresh@REDACTED (Arun Suresh) Date: Mon, 3 May 2010 01:32:59 +0530 Subject: Patch to allow ftp client to support REST and SIZE commands Message-ID: Hi We use erlang ftp client library (specifically the recv_chunk function of the ftp module) to fetch large files which are generally several GBs in size. An fetch/connection error in the middle of a fetch requires us to start the fetch afresh. The FTP RFC http://www.faqs.org/rfcs/rfc959.html talks about the REST command which can be used to restart transmission from a specified point. Also it talks about the SIZE command which returns the size of a remote file. Please find attached my patch proposal that adds the above functionalities to the existing client. Regards, -Arun -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ftp.patch Type: application/octet-stream Size: 8165 bytes Desc: not available URL: From bgustavsson@REDACTED Mon May 3 07:41:45 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 3 May 2010 07:41:45 +0200 Subject: [erlang-patches] [PATCH] Support opening files in exclusive mode In-Reply-To: <20100430162211.GA12819@ecn.lan> References: <20100430162211.GA12819@ecn.lan> Message-ID: On Fri, Apr 30, 2010 at 6:22 PM, Michael Santos wrote: > Add an option that atomically tests for the existence of a file and > creates it if the file does not exist, by passing the O_EXCL flag > to open() on Unix and CREATE_NEW flag on Windows. Support for O_EXCL > varies across platforms and filesystems. > > {ok, Fd} = file:open("/tmp/foo", [write,exclusive]), > {error, eexist} = file:open("/tmp/foo", [write,exclusive]). Thanks! Will include in 'pu'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Mon May 3 08:26:17 2010 From: bgustavsson@REDACTED (=?ISO-8859-1?Q?Bj=F6rn_Gustavsson?=) Date: Mon, 03 May 2010 08:26:17 +0200 Subject: What's cooking in erlang/otp (2010-05-03) Message-ID: <4BDE6C89.3000606@gmail.com> ------------------------------------------------------------ [Graduated] * bg/compiler-fmove-opt (compiler) (2010-04-19) 1 commit + beam_type: Improve coalescing of fmove/2 and move/2 instructions (e965d90) * bg/compiler-suppress-result-ignored (compiler) (2010-04-15) 2 commits + compiler tests: Eliminate "result of expression is ignored" warnings (feed8f6) + Silence warnings for expressions that are assigned to "_" (c34ad2d) * bg/deprecations (compiler, crypto, stdlib) (2010-04-08) 3 commits + test suites: Remove incidental use of deprecated concat_binary/1 (1403571) + Postpone removal of concat_binary/1 (ca2b31a) + Remove deprecated lists:flat_length/1 (0c2be22) * bg/fconv (erts) (2010-04-07) 1 commit + erts: Fix loading of modules with invalid floating point arithmetic (fd9bb9f) * bg/remove-stray-ose-support (erl_interface, erts, kernel, otp, test_server) (2010-04-13) 11 commits + configure: Remove stray OSE/Delta support (e5c6b79) + Makefiles: Remove stray OSE/Delta support (b45b616) + kernel tests: Remove stray OSE/Delta support (1f75cca) + system tests: Remove stray OSE/Delta support (f2ad245) + erl_interface tests: Remove stray OSE/Delta support (d96633f) + epmd: Remove stray OSE/Delta support (b24e936) + epmd: #ifdef out start_epmd() for other platforms than VxWorks (c42ea6a) + emulator tests: Remove stray OSE/Delta support (545fb03) + emulator: Remove stray OSE/Delta support (c67be14) + emulator: Eliminate #ifdef for sys_tty_reset() (8ebf6ff) + test_server: Remove stray support for OSE/Delta (ccc1851) * hawk/reltool (reltool) (2010-04-22) 10 commits + Make some cleanups (e57e7f3) + Ensure that {error, Reason} is returned even when server dies (2f304e2) + Introduced a new embedded_app_type option (21db0d0) + Removed spurious CDATA in documentation (bc5807d) + Automatically include applications that must be started (534f334) + Add app test SUITE (5217fb3) + Add app and appup files to reltool (6512dbb) + Add function to return status about the configuration (512b1a2) + Improved handling of applications explicitly included releases (2846d03) + Created escript for simplified usage from makefiles (067785d) * jb/inet6-dist (erts, kernel) (2010-03-23) 3 commits + Support IPv6 addresses in long host names (89a8944) + Fix implementation of IPv6 TCP distribution protocol (3c1f843) + Fix compilation of epmd with IPv6 enabled (b39b8b7) * ks/kernel (kernel) (2010-03-07) 1 commit + kernel: Clean up as suggested by tidier (75ea6a3) * ks/stdlib (stdlib) (2010-04-10) 4 commits + erl_parse.yrl: Add missing operator in type declaration (d1e8737) + stdlib: Add types and specs (0ca1793) + stdlib: Use fun object instead of {M,F} tuple (19babf5) + ets: Cleanup as suggested by tidier (95c2c8f) * ms/pcre-compile-workspace-overrun (erts, stdlib) (2010-03-19) 3 commits + re_SUITE: Add pcre_compile_workspace_overflow/1 (f437187) + MacOS X: Boost default stack size (1985e9d) + Fix check for compile workspace overflow (dfc73e7) * ms/re_infinite_loop (erts, stdlib) (2010-04-20) 2 commits + Add testcase for infinite loop problem caused by reset of match_call_count (e746278) + re: Fix non-termination for a certain regular expression (78a4800) * ta/asn1-gratuitous-output (asn1) (2010-04-10) 1 commit + Remove gratuitous ok report in asn1ct (1eb1f13) * ta/code_clash-filter-error (kernel) (2010-04-16) 1 commit + code:clash/0: match correct return value from erl_prim_loader:list_dir/1 (7cca106) * ta/nested-records (compiler, otp, stdlib) (2010-04-20) 2 commits + Document R14 paren-less record access/update (45c380d) + Support nested record field access without parentheses (3829e5f) ------------------------------------------------------------ [New topics] * bg/compiler-cover-and-clean (compiler, erts, hipe) (2010-05-02) 15 commits - beam_type: Remove redundant clause (8ac5aa2) - v3_core: Remove a clause in is_simple/1 that cannot match (2daa79c) - v3_core: Remove unused support for generating compilation errors (5e13de6) - Remove stray support for the put_literal/2 instruction (390191d) - Remove stray support for the bs_bits_to_bytes2/2 instruction (6a6c0fb) - Remove the bs_bits_to_bytes/3 instruction (d749255) - Cover handling of 'math' BIFs (e6db03c) - beam_bool: Remove a clause in live_regs/1 that cannot match (9665783) - beam_bool: Cover handling of bs_context_to_binary in initialized_regs/2 (afdc806) - beam_bool: Remove a clause in initialized_regs/2 that cannot match (ba7a15b) - beam_block: Remove a clause that will never be executed (2052597) - erts: Stop supporting non-literal empty tuples (ea82132) . . . * bg/opt-receive (compiler, erts, stdlib) (2010-04-23) 9 commits - Test that gen_server:call/2,3 is fast even with a huge message queue (ef22e2d) - erts: Add tests for the receive optimization (0bee0d9) - erts: Implement recv_mark/1 and recv_set/1 for real (dd4a36b) - compiler tests: Cover the error handling code in beam_receive (70c1b5a) - compiler test: Test optimization of receive statements (9605102) - Optimize selective receives in the presence of a large message queue (c8fd0ca) - Introduce the new recv_mark/1 and recv_mark/1 instructions (17f10cf) - Move p_run/2 to test_lib (7a6e5c6) - gen: Inline wait_resp_mon/2 to help the compiler optimize (8f9d592) * fm/file-operations (erts, kernel) (2010-04-26) 3 commits - Update preloaded modules (837dacd) - Add file:advise/4 - a wrapper to the POSIX syscall posix_fadvise (32dd8bb) - Add file:datasync/1 for syncing file contents only (af494d3) * jr/cover-src-path (tools) (2010-04-23) 1 commit - Fix searching for source files in analyse_to_file/* (b9d5068) * ms/file-exclusive-mode (erts, kernel) (2010-04-30) 1 commit - Support opening files in exclusive mode (5d1253d) * pl/fix-shared-lib-install (asn1, megaco, wx) (2010-04-15) 1 commit - Fix shared libraries installation (7809f92) * se/spawn_drv_win_deadlock (erts) (2010-04-28) 1 commit - Fix deadlock in spawn driver on windows (2f81231) * sv/env-with-equal-sign (erts) (2010-04-21) 1 commit - allow open_port to set env vars containing a trailing '=' character (ab12d39) * ta/asn1-reporting (asn1) (2010-04-23) 1 commit - asn1ct: Make formatting of errors and warnings consistent (d53796c) * ta/extend-nif-api (erts) (2010-04-30) 1 commit - erl_nif: add get_atom_length,get_list_length,get_iolist_length,is_tuple (83a1666) ------------------------------------------------------------ [Stalled] * bg/safer-local_to_univ (erts) (2010-02-11) 1 commit - erl_time_sup.c: test for error return from mktime() (0f62f0b) We will not include this branch in R13B04 for two reasons: o We are not 100% sure that this change is harmless on all platforms in all timezones. o We have an idea how the underlying problem can be fixed in the calendar module (only) and I plan to try it out after the release. We will keep this branch in pu as a reminder. Action expected from: Bj??rn Gustavsson * db/tv_nthtail_fix (tv) (2009-12-01) 1 commit - Fix for tv which restarts while trying to open a table (abe0759) Since our long-term goal is to migrate from gs towards wx, maintaining the old gs applications has a low priority for the Erlang/OTP team. Therefore, we will accept patches that seem sound, but we are unlikely to spend much of our own time fixing bugs. The author of this topic branch has found the real reason for the problem, but uncovered additional issues. Action expected from: The topic author - to decide whether to include the topic branch (which is a workaround, but does eliminate the crash) or to wait for a better fix from himself or someone else with an interest to advance the topic. * er/ei-decode_msg (erl_interface) (2010-03-11) 1 commit - Add function to decode distribution header (864091a) Needs documentation and test cases. Action expected from: Topic author * jp/dependencies_makefile (compiler, erts) (2010-02-14) 3 commits - squash! eliminate dialyzer warning (434e2ca) - squash! fix snprintf for Windows (bf2708d) - Add dependencies Makefile generation to erlc(1) and compile(3) (7cbc437) Approved in principle by the OTP Technical Board; now awaits a closer review of the implementation. Action expected from: Bj??rn Gustavsson (the reviewer) * kr/gs-browser (gs) (2010-02-10) 1 commit - Change lib/gs/src/tool_utils.erl to select multiple browsers other than Netscape (802d159) This topic branch introduces a new call to the deprecated regexp module. Action expected from: Topic author or anyone else with an interest to advance the topic ------------------------------------------------------------ [Cooking] * am/kernel-stops (kernel) (2010-02-21) 1 commit - Change restart behavior of network apps from permanent to transient (397343b) * am/net_kernel_catchall (kernel) (2010-02-20) 1 commit - Add catch all handle_call to net_kernel (77ee109) * bg/compiler (compiler, stdlib) (2010-03-12) 5 commits - beam_peep: Remove optimization already done by beam_dead (8adc56b) - beam_dead: Combine is_eq_exact instructions into select_val instructions (3626739) - Evaluate is_record/3 at compile-time using type information (07ceb97) - Evaluate element/2 at compile-time using type information (4bbe919) - erl_expand_records: Replace is_record() with matching (dce204e) * bg/temp-hipe-fixes (compiler, hipe, kernel) (2010-03-15) 6 commits - Avoid crash by skipping compilation_SUITE:on_load/1 (234e13e) - Inline less aggressively for native-code compilation (9fcb48b) - Crudely fix return type for the lists:key{search,find,member}/3 (ef71597) - seq_trace_SUITE: Don't native-compile (2a81b1a) - Disable native code if on_load is used (3befa76) - andor_SUITE: Don't native-compile (97aa2da) This branch contains temporary workarounds to avoid failing test cases and is never intended to graduate. * cf/timer_tc (stdlib) (2010-04-06) 1 commit - Add timer:tc/2 to measure the elapsed time of anonymous functions (2cca650) * dp/shell-line-editing (kernel, stdlib) (2010-03-05) 1 commit - Readline-style line edit history (91e912b) * gl/jinterface-pom (jinterface, otp) (2010-02-15) 2 commits - Exclude jinterface build artifact from git (5acf5fa) - Add pom.xml for jinterface build (aa68190) * hb/edoc (edoc) (2010-04-01) 1 commit - EDoc and Dialyzer specs and types (516e16c) * jf/run_erl-disable-flow-control (erts) (2010-03-05) 1 commit - Teach run_erl RUN_ERL_DISABLE_FLOWCNTRL for disabling flow control (d0775cd) * jl/windows-file-share-delete (erts) (2010-02-22) 1 commit - Windows: Open files with FILE_SHARE_DELETE to get closer to UNIX semantics (0544a2c) * jn/ic-docs-without-java (ic) (2010-03-07) 1 commit - Permit building and installing documentation without Java (2016a08) * ks/cleanups (compiler, debugger, docbuilder, gs, stdlib) (2010-04-10) 5 commits - compiler: Fix incorrect types and specs (9021667) - escript: Add more types to records (edfbc4b) - debugger: Clean up as suggested by tidier (42c0c33) - docbuilder: Clean up as suggested by tidier (c22830a) - gs: Clean up as suggested by tidier (eda4f7a) Was formerly called ks/cleanups-after-r13b04. * ks/export_type (compiler, dialyzer, hipe, kernel, stdlib, syntax_tools) (2010-03-22) 12 commits - Minor fix in a print message (69ed36b) - Add handling of unknown types (58a099f) - Add declaration for exported types (6aa213f) - Add types and specs; performed some cleanups also (8160670) - erl_scan: Add declarations for exported types (8e49dce) - stdlib: Add declarations for exported types (299b6b7) - hipe: Add declarations for exported types (f22087c) - compiler: Add declarations for exported types (50fd2d0) - syntax_tools: Add declarations for exported types (552bf5f) - kernel: Add declaration for exported types (ebfad2e) - Support -export_type() in dialyzer and erl_types (dafb1e6) - Add infrastructure for the -export_type() attribute (0085c95) * mh/ssh_channel-init-no-catch (ssh) (2010-01-25) 1 commit - Remove pointless catch from ssh_channel:init/1. (bb7eaa5) * ms/epmd-error-checking (erts) (2010-03-29) 2 commits - fixup! Exit if an error occurs with the listening socket (c103599) - Exit if an error occurs with the listening socket (a4882b4) * ms/inet_gethost-safe-debug-output (erts) (2010-04-12) 1 commit - Truncate debug messages (c4c2067) * ra/include-public_key-in-ssh (ssh) (2010-01-20) 1 commit - Added public_key among ssh applications. (3a0c2c5) * rd/erlang-eunit (tools) (2010-03-22) 1 commit - erlang-eunit.el: Require cl, as it is used (43ae537) * sv/format_status_error_info (stdlib) (2010-02-28) 2 commits - Add support for the format_status callback to gen_event (fd9abcb) - Extend format_status for gen_server/gen_fsm termination error logging (3d06952) * sv/sasl-fix-get_status (sasl) (2010-03-26) 1 commit - fix sys:get_status backward compatibility for sasl release_handler_1 (3cc2ceb) From ulf.wiger@REDACTED Fri May 7 17:50:28 2010 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Fri, 07 May 2010 17:50:28 +0200 Subject: patch: Allow the erlang nodename host part to differ from the hostname Message-ID: <4BE436C4.4030501@erlang-solutions.com> http://github.com/uwiger/otp/tree/epmd_fullnames Allow the erlang nodename host part to differ from the hostname This patch makes it possible (practical) to start erlang nodes using e.g. -sname n@REDACTED or -name n@REDACTED where the host/domain differs from that of the machine in question. While this was possible before, there were some limitations that made it impractical. The main problem was that nodes use only the name part when talking to epmd. This made it impossible to run different nodes with the same name part on the same machine. (which invalidates one of the good reasons for doing this; a practical way to name nodes in a cluster is to use the same name part on all nodes - myproduct@REDACTED, myproduct@REDACTED, etc.) It turns out that epmd does not need changing. Rather, the nodes send the full node name rather than just the name part. This is done only if the flag -epmd_fullnames true is used. This means that by default, everything works as before. To make it backwards compatible, a node using "fullname" mode, trying to connect to another node, will first try asking epmd with the full node name. If that fails, it will retry with only the name part. This makes it possible for "fullname" nodes to connect to "halfname" nodes (although not the other way around). The kernel test suites have been run. They didn't succeed completely, but the failures seemed related to hard-coded hostnames that only exist in the Erlang/OTP environment. erl_interface has not been touched. This should be fixed, but is not required for the feature to be useful for those who do not use erl_interface. (Forgot to check for whitespace changes before committing - sorry. There are two lines in there that seem to have shifted, but my network is almost dead, so for now, I'll let it be.) BR, Ulf W --------------------------------------------------- --------------------------------------------------- WE'VE CHANGED NAMES! Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD. www.erlang-solutions.com From bgustavsson@REDACTED Sat May 8 12:02:21 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Sat, 8 May 2010 12:02:21 +0200 Subject: [erlang-patches] patch: Allow the erlang nodename host part to differ from the hostname In-Reply-To: <4BE436C4.4030501@erlang-solutions.com> References: <4BE436C4.4030501@erlang-solutions.com> Message-ID: On Fri, May 7, 2010 at 5:50 PM, Ulf Wiger wrote: > > http://github.com/uwiger/otp/tree/epmd_fullnames Thanks! Included in 'pu'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From ulf.wiger@REDACTED Sat May 8 13:15:49 2010 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Sat, 08 May 2010 13:15:49 +0200 Subject: [erlang-patches] patch: Allow the erlang nodename host part to differ from the hostname In-Reply-To: References: <4BE436C4.4030501@erlang-solutions.com> Message-ID: <4BE547E5.8040008@erlang-solutions.com> On 05/08/2010 12:02 PM, Bj?rn Gustavsson wrote: > On Fri, May 7, 2010 at 5:50 PM, Ulf Wiger > wrote: >> >> http://github.com/uwiger/otp/tree/epmd_fullnames > > Thanks! Included in 'pu'. > On the topic of test suites, I did look into writing some tests to verify the functionality, but at first sight, it was not obvious how to do this. Thinking about it some more, perhaps the test_server functions to start slave/peer nodes will be adequate? This is how I went about connecting two nodes on my laptop (hostname: uwiger-laptop). 1. Start the first node: erl -sname n@REDACTED -epmd_fullnames true 2. Start the second node: erl -sname n@REDACTED -epmd_fullnames true 3. In the second node: 1> inet_db:add_host({127,0,0,1}, ["host1"]). 2> inet_db:set_lookup([file, native]). 3> net:ping(n@REDACTED). Running epmd with the -debug flag helps illustrate what's happening. If the -epmd_fullnames flag is omitted, an error will be issued when trying to start the second node, as the Name parts are the same on both nodes. The above also works with -name n@REDACTED instead of -sname. Then, the call to inet_db:add_host/2 must be: inet_db:add_host({127,0,0,1}, ["host1.somedomain"]) instead. There are other ways to configure the name lookup, as documented in the ERTS User's Guide. Re. the documentation - I didn't change it since it is not documented even today that you can use -sname name@REDACTED in the first place, so I thought that perhaps the feature could be included as an undocumented feature to begin with? The ambition level of the documentation could be discussed - ranging from some terse descriptions of each individual option to a chapter in a User's Guide. First, perhaps, a decision could be made about whether to include the feature at all - not least because there is a migration aspect to consider, should the fullnames option become a future default. BR, Ulf W --------------------------------------------------- --------------------------------------------------- WE'VE CHANGED NAMES! Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD. www.erlang-solutions.com From ulf.wiger@REDACTED Sun May 9 11:40:43 2010 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Sun, 09 May 2010 11:40:43 +0200 Subject: patch: Allow a user_defined function to wrap mnesia_schema:merge_schema() Message-ID: <4BE6831B.8090003@erlang-solutions.com> http://github.com/uwiger/otp/tree/schema_merge Allow a user_defined function to wrap mnesia_schema:merge_schema() Mnesia currently notifies the user if it detects a partitioned network, but the options for resolving the situation are limited. In practice, the only safe options are: - set master_nodes and restart one of the affected 'islands' - restart the entire system from backup This patch introduces a way to resolve the situation without restarting any nodes. The key to doing this safely is to lock affected tables and run the merge function inside the same transaction that merges the schema. Otherwise, one transaction will merge the schema, after which writes to the database will be replicated across the (potentially) inconsistent copies; the transaction triggered by the asynchronous inconsistency event will have to race to be the first to access the tables. The normal call to merge the schema is done from mnesia_controller. Previously, this was mnesia_schema:merge_schema(). The new function is merge_schema(UserFun), with the following behaviour: merge_schema(UserFun) -> schema_transaction( fun() -> UserFun(fun(Arg) -> do_merge_schema(Arg) end) end). Where do_merge_schema(LockTabs) will execute the schema merge as before, but also lock all tables in the list LockTabs which have copies on the affected nodes (that is, everywhere the schema table is locked). The effect of this is to allow a wrapper function that calls the merge and, if successful, continues to resolve the inconsistency on the tables, knowing that they have now been locked on all affected nodes. The function that is actually called by the deconflict function is mnesia_controller:connect_nodes(Nodes, UserFun), as in: Tables = tables_to_deconflict(Node), mnesia_controller:connect_nodes( [Node], fun(MergeF) -> case MergeF(Tables) of {merged,_,_} -> deconflict(Tables, Node); Other -> Other end). In the case where the merge fails, it is probably wise to restart from a backup... I have not run the mnesia test suite, as it is not available. I have not updated documentation, as these functions are not documented in the first place. BR, Ulf W PS This was previously the mnesia_merge branch (never submitted). I got tangled up in rebasing and amending, and finally decided that the cleanest way forward was to create a new branch. The changed modules are idential, with the exception of two fixed trailing whitespace issues. PPS The functionality in this patch is necessary for the correct working of http://github.com/uwiger/unsplit --------------------------------------------------- --------------------------------------------------- WE'VE CHANGED NAMES! Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD. www.erlang-solutions.com From ulf.wiger@REDACTED Sun May 9 12:23:48 2010 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Sun, 09 May 2010 12:23:48 +0200 Subject: patch: Enable continuous monitoring of mnesia overload status Message-ID: <4BE68D34.6020601@erlang-solutions.com> http://github.com/uwiger/otp/tree/mnesia_overload Enable continuous monitoring of mnesia overload status Mnesia currently issues an event whenever it detects an overload condition. It recognizes two different types of overload: - whenever the message queue of mnesia_tm process grows large - when a log dump interval triggers before the previous dump is done These events could be used to trigger a load regulation mechanism to reduce the load until the condition seizes. The missing piece is that there is no facility to ask mnesia whether the overload condition still exists. This patch implements a couple of functions in mnesia_lib that can be used to sample the overload status. It has been tested in a load regulator component being developed by Erlang Solutions. No mnesia test suites have been run, since they are not available. No documentation has been updated. The functions in mnesia_lib are at any rate undocumented (as are all other functions in that module). A decision would have to be made about whether to provide a documented API on top of these functions. The internal state record of mnesia_recover has been modified. For this reason, a code change hook has been provided. BR, Ulf W --------------------------------------------------- --------------------------------------------------- WE'VE CHANGED NAMES! Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD. www.erlang-solutions.com From vinoski@REDACTED Sun May 9 19:52:02 2010 From: vinoski@REDACTED (Steve Vinoski) Date: Sun, 9 May 2010 13:52:02 -0400 Subject: handle global names in format_status/2 Message-ID: This patch adds support for handling {global, term()} names for the gen_fsm, gen_server, and wx_object format_status/2 functions. git fetch git://github.com/vinoski/otp.git format_status_name_handling --steve From bgustavsson@REDACTED Mon May 10 07:02:36 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 10 May 2010 07:02:36 +0200 Subject: [erlang-patches] patch: Allow a user_defined function to wrap mnesia_schema:merge_schema() In-Reply-To: <4BE6831B.8090003@erlang-solutions.com> References: <4BE6831B.8090003@erlang-solutions.com> Message-ID: On Sun, May 9, 2010 at 11:40 AM, Ulf Wiger wrote: > http://github.com/uwiger/otp/tree/schema_merge Thanks! Will include in 'pu'. For future contributions, please also include a "git fetch" line in the email that I can copy/paste into the shell. For instance: git fetch git://github.com/uwiger/otp.git schema_merge -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Mon May 10 07:03:51 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 10 May 2010 07:03:51 +0200 Subject: [erlang-patches] patch: Enable continuous monitoring of mnesia overload status In-Reply-To: <4BE68D34.6020601@erlang-solutions.com> References: <4BE68D34.6020601@erlang-solutions.com> Message-ID: On Sun, May 9, 2010 at 12:23 PM, Ulf Wiger wrote: > http://github.com/uwiger/otp/tree/mnesia_overload > Thanks! Will include in 'pu'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Mon May 10 07:04:55 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 10 May 2010 07:04:55 +0200 Subject: [erlang-patches] handle global names in format_status/2 In-Reply-To: References: Message-ID: On Sun, May 9, 2010 at 7:52 PM, Steve Vinoski wrote: > This patch adds support for handling {global, term()} names for the > gen_fsm, gen_server, and wx_object format_status/2 functions. > > git fetch git://github.com/vinoski/otp.git format_status_name_handling Thanks! Will include in 'pu'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Mon May 10 08:10:50 2010 From: bgustavsson@REDACTED (=?ISO-8859-1?Q?Bj=F6rn_Gustavsson?=) Date: Mon, 10 May 2010 08:10:50 +0200 Subject: What's cooking in erlang/otp (2010-05-10) Message-ID: <4BE7A36A.2040905@gmail.com> May 13-14 are not workdays, so if you'll send an email during those days, you might have to wait until May 17 before we'll take care of it. R14A is planned to be released on June 16. We haven't decided on an exact deadline for submissions yet, but the sooner you'll send in your submissions, the better chance it has to be considered for inclusion in the release. We will try to review most of the current branches in the 'pu' branch before the release. ------------------------------------------------------------ [Graduated] * ks/syntax_tools (syntax_tools) (2010-05-06) 1 commit + Fix an erroneous spec (ccf1c5d) * ms/epmd-error-checking (erts) (2010-03-20) 1 commit + Exit if an error occurs with the listening socket (cfdd0e5) * ms/inet_gethost-safe-debug-output (erts) (2010-04-12) 1 commit + Truncate debug messages (d1b44cb) * rd/erlang-eunit (tools) (2010-03-22) 1 commit + erlang-eunit.el: Require cl, as it is used (43ae537) * sv/env-with-equal-sign (erts) (2010-04-21) 1 commit + allow open_port to set env vars containing a trailing '=' character (6f40c66) * sv/sasl-fix-get_status (sasl) (2010-05-05) 2 commits + Prepare patch release (a83e80f) + fix sys:get_status backward compatibility for sasl release_handler_1 (0c687fa) ------------------------------------------------------------ [New topics] * bg/beam_lib (stdlib) (2010-05-06) 2 commits - Remove redundant includes (a31b2b2) - Make beam_lib:cmp/2 stricter (3f8f87e) * bg/compiler-attributes (compiler) (2010-05-05) 1 commit - Remove opaque declarations from the attributes (7d9dd76) * dgud/emacs-21-fix (tools) (2010-05-03) 1 commit - Remove usage of 'font-lock-preprocessor-face' if not available (5373c9c) * sv/format_status-name-handling (stdlib, wx) (2010-05-09) 1 commit - handle {global, term()} names in format_status/2 (4e81da5) * uw/epmd-fullnames (kernel) (2010-05-07) 1 commit - Allow the erlang nodename host part to differ from the hostname (e0774be) * uw/mnesia-overload (mnesia) (2010-05-09) 1 commit - Enable continuous monitoring of mnesia overload status (82c0904) * uw/mnesia-schema-merge (mnesia) (2010-05-09) 1 commit - Allow a user_defined function to wrap mnesia_schema:merge_schema() (3f70f3d) ------------------------------------------------------------ [Stalled] * bg/safer-local_to_univ (erts) (2010-02-11) 1 commit - erl_time_sup.c: test for error return from mktime() (0f62f0b) We will not include this branch in R13B04 for two reasons: o We are not 100% sure that this change is harmless on all platforms in all timezones. o We have an idea how the underlying problem can be fixed in the calendar module (only) and I plan to try it out after the release. We will keep this branch in pu as a reminder. Action expected from: Bj??rn Gustavsson * db/tv_nthtail_fix (tv) (2009-12-01) 1 commit - Fix for tv which restarts while trying to open a table (abe0759) Since our long-term goal is to migrate from gs towards wx, maintaining the old gs applications has a low priority for the Erlang/OTP team. Therefore, we will accept patches that seem sound, but we are unlikely to spend much of our own time fixing bugs. The author of this topic branch has found the real reason for the problem, but uncovered additional issues. Action expected from: The topic author - to decide whether to include the topic branch (which is a workaround, but does eliminate the crash) or to wait for a better fix from himself or someone else with an interest to advance the topic. * er/ei-decode_msg (erl_interface) (2010-03-11) 1 commit - Add function to decode distribution header (864091a) Needs documentation and test cases. Action expected from: Topic author * jp/dependencies_makefile (compiler, erts) (2010-02-14) 3 commits - squash! eliminate dialyzer warning (434e2ca) - squash! fix snprintf for Windows (bf2708d) - Add dependencies Makefile generation to erlc(1) and compile(3) (7cbc437) Approved in principle by the OTP Technical Board; now awaits a closer review of the implementation. Action expected from: Bj??rn Gustavsson (the reviewer) * kr/gs-browser (gs) (2010-02-10) 1 commit - Change lib/gs/src/tool_utils.erl to select multiple browsers other than Netscape (802d159) This topic branch introduces a new call to the deprecated regexp module. Action expected from: Topic author or anyone else with an interest to advance the topic ------------------------------------------------------------ [Cooking] * am/kernel-stops (kernel) (2010-02-21) 1 commit - Change restart behavior of network apps from permanent to transient (397343b) * am/net_kernel_catchall (kernel) (2010-02-20) 1 commit - Add catch all handle_call to net_kernel (77ee109) * bg/compiler (compiler, stdlib) (2010-03-12) 5 commits - beam_peep: Remove optimization already done by beam_dead (8adc56b) - beam_dead: Combine is_eq_exact instructions into select_val instructions (3626739) - Evaluate is_record/3 at compile-time using type information (07ceb97) - Evaluate element/2 at compile-time using type information (4bbe919) - erl_expand_records: Replace is_record() with matching (dce204e) * bg/compiler-cover-and-clean (compiler, erts, hipe) (2010-05-09) 19 commits - v3_life: Remove clause that cannot match in match_fail/3 (41bedda) - v3_life tests: Cover exception handling code in v3_life:function/1 (7a6151f) - beam_type: Remove redundant clause (0aa0c85) - v3_core tests: Cover make_bool_switch_guard/5 (658a448) - v3_core tests: Cover handling of pattern aliases (3dacdce) - v3_core: Remove a clause in is_simple/1 that cannot match (5221040) - v3_core: Remove unused support for generating compilation errors (e5568f0) - Remove stray support for the put_literal/2 instruction (8886957) - Remove stray support for the bs_bits_to_bytes2/2 instruction (d4370bd) - Remove the bs_bits_to_bytes/3 instruction (45d10cb) - Cover handling of 'math' BIFs (8e7e16e) - beam_bool: Remove a clause in live_regs/1 that cannot match (3672c7a) . . . . . . * bg/opt-receive (compiler, erts, hipe, kernel, orber, otp, stdlib) (2010-04-23) 10 commits - Test that gen_server:call/2,3 are fast even with a huge message queue (a9cc3a6) - erts: Add tests for the receive optimization (31faf2f) - Update primary bootstrap (110fcec) - erts: Implement recv_mark/1 and recv_set/1 for real (ffe5530) - compiler tests: Cover the error handling code in beam_receive (c335694) - compiler test: Test optimization of receive statements (787796b) - Optimize selective receives in the presence of a large message queue (4aba9c7) - Introduce the new recv_mark/1 and recv_mark/1 instructions (17e9d5c) - Move p_run/2 to test_lib (f0d8728) - gen: Inline wait_resp_mon/2 to help the compiler optimize (23362ae) * bg/temp-hipe-fixes (compiler, hipe, kernel) (2010-03-15) 6 commits - Avoid crash by skipping compilation_SUITE:on_load/1 (234e13e) - Inline less aggressively for native-code compilation (9fcb48b) - Crudely fix return type for the lists:key{search,find,member}/3 (ef71597) - seq_trace_SUITE: Don't native-compile (2a81b1a) - Disable native code if on_load is used (3befa76) - andor_SUITE: Don't native-compile (97aa2da) This branch contains temporary workarounds to avoid failing test cases and is never intended to graduate. * cf/timer_tc (stdlib) (2010-04-06) 1 commit - Add timer:tc/2 to measure the elapsed time of anonymous functions (2cca650) * dp/shell-line-editing (kernel, stdlib) (2010-03-05) 1 commit - Readline-style line edit history (91e912b) * fm/file-operations (erts, kernel) (2010-04-26) 3 commits - Update preloaded modules (c2dbc5e) - Add file:advise/4 - a wrapper to the POSIX syscall posix_fadvise (6fd827d) - Add file:datasync/1 for syncing file contents only (d96666a) * gl/jinterface-pom (jinterface, otp) (2010-02-15) 2 commits - Exclude jinterface build artifact from git (5acf5fa) - Add pom.xml for jinterface build (aa68190) * hb/edoc (edoc) (2010-04-01) 1 commit - EDoc and Dialyzer specs and types (516e16c) * jf/run_erl-disable-flow-control (erts) (2010-03-05) 1 commit - Teach run_erl RUN_ERL_DISABLE_FLOWCNTRL for disabling flow control (d0775cd) * jl/windows-file-share-delete (erts) (2010-02-22) 1 commit - Windows: Open files with FILE_SHARE_DELETE to get closer to UNIX semantics (0544a2c) * jn/ic-docs-without-java (ic) (2010-03-07) 1 commit - Permit building and installing documentation without Java (2016a08) * jr/cover-src-path (tools) (2010-04-23) 1 commit - Fix searching for source files in analyse_to_file/* (b9d5068) * ks/cleanups (compiler, debugger, docbuilder, gs, stdlib) (2010-04-10) 5 commits - compiler: Fix incorrect types and specs (9021667) - escript: Add more types to records (edfbc4b) - debugger: Clean up as suggested by tidier (42c0c33) - docbuilder: Clean up as suggested by tidier (c22830a) - gs: Clean up as suggested by tidier (eda4f7a) Was formerly called ks/cleanups-after-r13b04. * ks/export_type (compiler, dialyzer, hipe, kernel, stdlib, syntax_tools) (2010-03-22) 12 commits - Minor fix in a print message (69ed36b) - Add handling of unknown types (58a099f) - Add declaration for exported types (6aa213f) - Add types and specs; performed some cleanups also (8160670) - erl_scan: Add declarations for exported types (8e49dce) - stdlib: Add declarations for exported types (299b6b7) - hipe: Add declarations for exported types (f22087c) - compiler: Add declarations for exported types (50fd2d0) - syntax_tools: Add declarations for exported types (552bf5f) - kernel: Add declaration for exported types (ebfad2e) - Support -export_type() in dialyzer and erl_types (dafb1e6) - Add infrastructure for the -export_type() attribute (0085c95) * mh/ssh_channel-init-no-catch (ssh) (2010-01-25) 1 commit - Remove pointless catch from ssh_channel:init/1. (bb7eaa5) * ms/file-exclusive-mode (erts, kernel) (2010-04-30) 1 commit - Support opening files in exclusive mode (5d1253d) * pl/fix-shared-lib-install (asn1, megaco, wx) (2010-04-15) 1 commit - Fix shared libraries installation (7809f92) * ra/include-public_key-in-ssh (ssh) (2010-01-20) 1 commit - Added public_key among ssh applications. (3a0c2c5) * se/spawn_drv_win_deadlock (erts) (2010-04-28) 1 commit - Fix deadlock in spawn driver on windows (4fe6e7e) * sv/format_status_error_info (stdlib) (2010-02-28) 2 commits - Add support for the format_status callback to gen_event (fa4a3b2) - Extend format_status for gen_server/gen_fsm termination error logging (53bf35a) * ta/asn1-reporting (asn1) (2010-04-23) 1 commit - asn1ct: Make formatting of errors and warnings consistent (93face2) * ta/extend-nif-api (erts) (2010-05-07) 3 commits - erl_nif: add make_atom_len, make_existing_atom_len and make_string_len (96eec0e) - erl_nif: add enif_get_atom_length and enif_get_list_length (d122616) - erl_nif: add enif_is_list and enif_is_tuple (d265224) From attila.r.nohl@REDACTED Mon May 10 13:22:07 2010 From: attila.r.nohl@REDACTED (Attila Rajmund Nohl) Date: Mon, 10 May 2010 13:22:07 +0200 Subject: [erlang-patches] What's cooking in erlang/otp (2010-05-10) In-Reply-To: <4BE7A36A.2040905@gmail.com> References: <4BE7A36A.2040905@gmail.com> Message-ID: Hello! I know I should probably be using git, but I've found this old patch in the archives that could be useful: --- lib/kernel/src/user_drv.erl.orig Fri Sep 26 12:01:42 2008 UTC +++ lib/kernel/src/user_drv.erl Fri Sep 26 12:23:03 2008 UTC @@ -112,8 +112,12 @@ {Curr,Shell1} = case init:get_argument(remsh) of {ok,[[Node]]} -> - RShell = {list_to_atom(Node),shell,start,[]}, - RGr = group:start(self(), RShell), + ANode = list_to_atom(Node), + RShell = {ANode,shell,start,[]}, + RGr = group:start(self(), RShell, + [{expand_fun, + fun(B)-> rpc:call(ANode,edlin_expand,expand,[B]) + end}]), {RGr,RShell}; E when E =:= error ; E =:= {ok,[[]]} -> {group:start(self(), Shell),Shell} This enables a more useful tab-expansion when connecting to a node using remsh. The original thread is here: http://www.erlang.org/pipermail/erlang-questions/2008-September/038464.html 2010/5/10, Bj?rn Gustavsson : > May 13-14 are not workdays, so if you'll send an email during > those days, you might have to wait until May 17 before we'll > take care of it. > > R14A is planned to be released on June 16. We haven't decided on > an exact deadline for submissions yet, but the sooner you'll > send in your submissions, the better chance it has to be > considered for inclusion in the release. > > We will try to review most of the current branches in the 'pu' > branch before the release. > > ------------------------------------------------------------ > [Graduated] > > * ks/syntax_tools (syntax_tools) (2010-05-06) 1 commit > + Fix an erroneous spec (ccf1c5d) > > * ms/epmd-error-checking (erts) (2010-03-20) 1 commit > + Exit if an error occurs with the listening socket (cfdd0e5) > > * ms/inet_gethost-safe-debug-output (erts) (2010-04-12) 1 commit > + Truncate debug messages (d1b44cb) > > * rd/erlang-eunit (tools) (2010-03-22) 1 commit > + erlang-eunit.el: Require cl, as it is used (43ae537) > > * sv/env-with-equal-sign (erts) (2010-04-21) 1 commit > + allow open_port to set env vars containing a trailing '=' character > (6f40c66) > > * sv/sasl-fix-get_status (sasl) (2010-05-05) 2 commits > + Prepare patch release (a83e80f) > + fix sys:get_status backward compatibility for sasl release_handler_1 > (0c687fa) > > ------------------------------------------------------------ > [New topics] > > * bg/beam_lib (stdlib) (2010-05-06) 2 commits > - Remove redundant includes (a31b2b2) > - Make beam_lib:cmp/2 stricter (3f8f87e) > > * bg/compiler-attributes (compiler) (2010-05-05) 1 commit > - Remove opaque declarations from the attributes (7d9dd76) > > * dgud/emacs-21-fix (tools) (2010-05-03) 1 commit > - Remove usage of 'font-lock-preprocessor-face' if not available (5373c9c) > > * sv/format_status-name-handling (stdlib, wx) (2010-05-09) 1 commit > - handle {global, term()} names in format_status/2 (4e81da5) > > * uw/epmd-fullnames (kernel) (2010-05-07) 1 commit > - Allow the erlang nodename host part to differ from the hostname (e0774be) > > * uw/mnesia-overload (mnesia) (2010-05-09) 1 commit > - Enable continuous monitoring of mnesia overload status (82c0904) > > * uw/mnesia-schema-merge (mnesia) (2010-05-09) 1 commit > - Allow a user_defined function to wrap mnesia_schema:merge_schema() > (3f70f3d) > > ------------------------------------------------------------ > [Stalled] > > * bg/safer-local_to_univ (erts) (2010-02-11) 1 commit > - erl_time_sup.c: test for error return from mktime() (0f62f0b) > > We will not include this branch in R13B04 for two reasons: > > o We are not 100% sure that this change is harmless on all > platforms in all timezones. > o We have an idea how the underlying problem can be fixed in > the calendar module (only) and I plan to try it out after the > release. We will keep this branch in pu as a reminder. > > Action expected from: Bj?rn Gustavsson > > * db/tv_nthtail_fix (tv) (2009-12-01) 1 commit > - Fix for tv which restarts while trying to open a table (abe0759) > > Since our long-term goal is to migrate from gs towards wx, > maintaining the old gs applications has a low priority for > the Erlang/OTP team. Therefore, we will accept patches that > seem sound, but we are unlikely to spend much of our own time > fixing bugs. > > The author of this topic branch has found the real reason for > the problem, but uncovered additional issues. > > Action expected from: The topic author - to decide whether to > include the topic branch (which is a workaround, but does eliminate > the crash) or to wait for a better fix from himself or someone else > with an interest to advance the topic. > > * er/ei-decode_msg (erl_interface) (2010-03-11) 1 commit > - Add function to decode distribution header (864091a) > > Needs documentation and test cases. > > Action expected from: Topic author > > * jp/dependencies_makefile (compiler, erts) (2010-02-14) 3 commits > - squash! eliminate dialyzer warning (434e2ca) > - squash! fix snprintf for Windows (bf2708d) > - Add dependencies Makefile generation to erlc(1) and compile(3) (7cbc437) > > Approved in principle by the OTP Technical Board; now awaits a closer > review of the implementation. > > Action expected from: Bj?rn Gustavsson (the reviewer) > > * kr/gs-browser (gs) (2010-02-10) 1 commit > - Change lib/gs/src/tool_utils.erl to select multiple browsers other than > Netscape (802d159) > > This topic branch introduces a new call to the deprecated regexp module. > > Action expected from: Topic author or anyone else with an interest to > advance the topic > > ------------------------------------------------------------ > [Cooking] > > * am/kernel-stops (kernel) (2010-02-21) 1 commit > - Change restart behavior of network apps from permanent to transient > (397343b) > > * am/net_kernel_catchall (kernel) (2010-02-20) 1 commit > - Add catch all handle_call to net_kernel (77ee109) > > * bg/compiler (compiler, stdlib) (2010-03-12) 5 commits > - beam_peep: Remove optimization already done by beam_dead (8adc56b) > - beam_dead: Combine is_eq_exact instructions into select_val instructions > (3626739) > - Evaluate is_record/3 at compile-time using type information (07ceb97) > - Evaluate element/2 at compile-time using type information (4bbe919) > - erl_expand_records: Replace is_record() with matching (dce204e) > > * bg/compiler-cover-and-clean (compiler, erts, hipe) (2010-05-09) 19 commits > - v3_life: Remove clause that cannot match in match_fail/3 (41bedda) > - v3_life tests: Cover exception handling code in v3_life:function/1 > (7a6151f) > - beam_type: Remove redundant clause (0aa0c85) > - v3_core tests: Cover make_bool_switch_guard/5 (658a448) > - v3_core tests: Cover handling of pattern aliases (3dacdce) > - v3_core: Remove a clause in is_simple/1 that cannot match (5221040) > - v3_core: Remove unused support for generating compilation errors > (e5568f0) > - Remove stray support for the put_literal/2 instruction (8886957) > - Remove stray support for the bs_bits_to_bytes2/2 instruction (d4370bd) > - Remove the bs_bits_to_bytes/3 instruction (45d10cb) > - Cover handling of 'math' BIFs (8e7e16e) > - beam_bool: Remove a clause in live_regs/1 that cannot match (3672c7a) > . > . > . > > . > . > . > > * bg/opt-receive (compiler, erts, hipe, kernel, orber, otp, stdlib) > (2010-04-23) 10 commits > - Test that gen_server:call/2,3 are fast even with a huge message queue > (a9cc3a6) > - erts: Add tests for the receive optimization (31faf2f) > - Update primary bootstrap (110fcec) > - erts: Implement recv_mark/1 and recv_set/1 for real (ffe5530) > - compiler tests: Cover the error handling code in beam_receive (c335694) > - compiler test: Test optimization of receive statements (787796b) > - Optimize selective receives in the presence of a large message queue > (4aba9c7) > - Introduce the new recv_mark/1 and recv_mark/1 instructions (17e9d5c) > - Move p_run/2 to test_lib (f0d8728) > - gen: Inline wait_resp_mon/2 to help the compiler optimize (23362ae) > > * bg/temp-hipe-fixes (compiler, hipe, kernel) (2010-03-15) 6 commits > - Avoid crash by skipping compilation_SUITE:on_load/1 (234e13e) > - Inline less aggressively for native-code compilation (9fcb48b) > - Crudely fix return type for the lists:key{search,find,member}/3 (ef71597) > - seq_trace_SUITE: Don't native-compile (2a81b1a) > - Disable native code if on_load is used (3befa76) > - andor_SUITE: Don't native-compile (97aa2da) > > This branch contains temporary workarounds to avoid failing test > cases and is never intended to graduate. > > * cf/timer_tc (stdlib) (2010-04-06) 1 commit > - Add timer:tc/2 to measure the elapsed time of anonymous functions > (2cca650) > > * dp/shell-line-editing (kernel, stdlib) (2010-03-05) 1 commit > - Readline-style line edit history (91e912b) > > * fm/file-operations (erts, kernel) (2010-04-26) 3 commits > - Update preloaded modules (c2dbc5e) > - Add file:advise/4 - a wrapper to the POSIX syscall posix_fadvise > (6fd827d) > - Add file:datasync/1 for syncing file contents only (d96666a) > > * gl/jinterface-pom (jinterface, otp) (2010-02-15) 2 commits > - Exclude jinterface build artifact from git (5acf5fa) > - Add pom.xml for jinterface build (aa68190) > > * hb/edoc (edoc) (2010-04-01) 1 commit > - EDoc and Dialyzer specs and types (516e16c) > > * jf/run_erl-disable-flow-control (erts) (2010-03-05) 1 commit > - Teach run_erl RUN_ERL_DISABLE_FLOWCNTRL for disabling flow control > (d0775cd) > > * jl/windows-file-share-delete (erts) (2010-02-22) 1 commit > - Windows: Open files with FILE_SHARE_DELETE to get closer to UNIX > semantics (0544a2c) > > * jn/ic-docs-without-java (ic) (2010-03-07) 1 commit > - Permit building and installing documentation without Java (2016a08) > > * jr/cover-src-path (tools) (2010-04-23) 1 commit > - Fix searching for source files in analyse_to_file/* (b9d5068) > > * ks/cleanups (compiler, debugger, docbuilder, gs, stdlib) (2010-04-10) 5 > commits > - compiler: Fix incorrect types and specs (9021667) > - escript: Add more types to records (edfbc4b) > - debugger: Clean up as suggested by tidier (42c0c33) > - docbuilder: Clean up as suggested by tidier (c22830a) > - gs: Clean up as suggested by tidier (eda4f7a) > > Was formerly called ks/cleanups-after-r13b04. > > * ks/export_type (compiler, dialyzer, hipe, kernel, stdlib, syntax_tools) > (2010-03-22) 12 commits > - Minor fix in a print message (69ed36b) > - Add handling of unknown types (58a099f) > - Add declaration for exported types (6aa213f) > - Add types and specs; performed some cleanups also (8160670) > - erl_scan: Add declarations for exported types (8e49dce) > - stdlib: Add declarations for exported types (299b6b7) > - hipe: Add declarations for exported types (f22087c) > - compiler: Add declarations for exported types (50fd2d0) > - syntax_tools: Add declarations for exported types (552bf5f) > - kernel: Add declaration for exported types (ebfad2e) > - Support -export_type() in dialyzer and erl_types (dafb1e6) > - Add infrastructure for the -export_type() attribute (0085c95) > > * mh/ssh_channel-init-no-catch (ssh) (2010-01-25) 1 commit > - Remove pointless catch from ssh_channel:init/1. (bb7eaa5) > > * ms/file-exclusive-mode (erts, kernel) (2010-04-30) 1 commit > - Support opening files in exclusive mode (5d1253d) > > * pl/fix-shared-lib-install (asn1, megaco, wx) (2010-04-15) 1 commit > - Fix shared libraries installation (7809f92) > > * ra/include-public_key-in-ssh (ssh) (2010-01-20) 1 commit > - Added public_key among ssh applications. (3a0c2c5) > > * se/spawn_drv_win_deadlock (erts) (2010-04-28) 1 commit > - Fix deadlock in spawn driver on windows (4fe6e7e) > > * sv/format_status_error_info (stdlib) (2010-02-28) 2 commits > - Add support for the format_status callback to gen_event (fa4a3b2) > - Extend format_status for gen_server/gen_fsm termination error logging > (53bf35a) > > * ta/asn1-reporting (asn1) (2010-04-23) 1 commit > - asn1ct: Make formatting of errors and warnings consistent (93face2) > > * ta/extend-nif-api (erts) (2010-05-07) 3 commits > - erl_nif: add make_atom_len, make_existing_atom_len and make_string_len > (96eec0e) > - erl_nif: add enif_get_atom_length and enif_get_list_length (d122616) > - erl_nif: add enif_is_list and enif_is_tuple (d265224) > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > > From mikpe@REDACTED Wed May 12 12:03:32 2010 From: mikpe@REDACTED (Mikael Pettersson) Date: Wed, 12 May 2010 12:03:32 +0200 Subject: fix livelock in erts_poll_info_kp() Message-ID: <19434.31988.168458.228784@pilspetsen.it.uu.se> erts_poll_info_kp() [defined in erts/emulator/sys/common/erl_poll.c via some name-mangling trickery] contains a code path that can end up in an infinite loop, causing a livelock. There is a block of code inside #if ERTS_POLL_USE_UPDATE_REQUESTS_QUEUE that is supposed to iterate over a linked list of ErtsPollSetUpdateRequestsBlocks and update two variables based on the sizes of these blocks. The bug is that the loop forgets to advance the list pointer to the next element, so if the loop is entered at all (the initial list pointer is non-NULL), the thread falls into an infinite loop. This patch, against R13B03 but applies fine to today's git, fixes the bug by adding a statement to advance the list pointer in the loop. All other loops over this list appear to be correct. Thanks to Chetan Ahuja for the original report of a livelock problem in erts_poll_info_kp(). --- otp_src_R13B03/erts/emulator/sys/common/erl_poll.c.~1~ 2009-03-12 13:16:29.000000000 +0100 +++ otp_src_R13B03/erts/emulator/sys/common/erl_poll.c 2010-05-03 23:41:32.000000000 +0200 @@ -2404,6 +2404,7 @@ ERTS_POLL_EXPORT(erts_poll_info)(ErtsPol while (urqbp) { size += sizeof(ErtsPollSetUpdateRequestsBlock); pending_updates += urqbp->len; + urqbp = urqbp->next; } } #endif From vinoski@REDACTED Thu May 13 22:14:49 2010 From: vinoski@REDACTED (Steve Vinoski) Date: Thu, 13 May 2010 16:14:49 -0400 Subject: Montavista system call error handling patch Message-ID: We've recently experienced a 100% repeatable case of R13B02-1 and R13B04 beam core dumps on a Montavista Linux system running on a Cavium Octeon processor. This is technically not a problem with the Erlang VM but rather is a case where certain socket-related calls in this version of Montavista Linux, based on a 2.6.21 Linux kernel, are indicating failure by returning negative numbers with large absolute values, such as negative 0x40000, rather than returning -1 to indicate failure as they should. The Erlang TCP code expects system calls to return -1 to indicate errors and compares directly against that value, so it ends up treating these negative return values as successful and adds them to internal pointers as bytes written, offsets, etc. This in turn corrupts these pointers and causes beam to dump core. This patch introduces a portability macro to test for system call failure within inet_drv.c: git fetch git://github.com/vinoski/otp.git socket_error_portability --steve From mikpe@REDACTED Fri May 14 00:12:11 2010 From: mikpe@REDACTED (Mikael Pettersson) Date: Fri, 14 May 2010 00:12:11 +0200 Subject: [erlang-patches] Montavista system call error handling patch In-Reply-To: References: Message-ID: <19436.31035.377395.977481@pilspetsen.it.uu.se> Steve Vinoski writes: > We've recently experienced a 100% repeatable case of R13B02-1 and > R13B04 beam core dumps on a Montavista Linux system running on a > Cavium Octeon processor. This is technically not a problem with the > Erlang VM but rather is a case where certain socket-related calls in > this version of Montavista Linux, based on a 2.6.21 Linux kernel, are > indicating failure by returning negative numbers with large absolute > values, such as negative 0x40000, rather than returning -1 to indicate > failure as they should. The Erlang TCP code expects system calls to > return -1 to indicate errors and compares directly against that value, > so it ends up treating these negative return values as successful and > adds them to internal pointers as bytes written, offsets, etc. This in > turn corrupts these pointers and causes beam to dump core. > > This patch introduces a portability macro to test for system call > failure within inet_drv.c: > > git fetch git://github.com/vinoski/otp.git socket_error_portability I'm not happy with this patch. First, you're changing (weakening) error checking on all non-Win32 platforms, not just the apparently horribly broken MVL. At a minimum the new IS_SOCKET_ERROR() macro should be written as #if #define IS_SOCKET_ERROR(val) ((val) < 0) #else #define IS_SOCKET_ERROR(val) ((val) == SOCKET_ERROR) #endif Second, the change needs a big comment. Otherwise someone who's ever read the POSIX or SuS specs will want to clean it up and turn it back to the original, not realising the reason for the out-of-spec error check. (Personally I'd rather wrap the broken socket calls with functions that convert them to sane APIs, in this case just fix up error returns, than to force all users to adapt to the breakage. But lots of code in erts could do with that sort of cleanup, so I'm not going to complain if you don't want to do it that way.) /Mikael From vinoski@REDACTED Fri May 14 01:55:21 2010 From: vinoski@REDACTED (Steve Vinoski) Date: Thu, 13 May 2010 19:55:21 -0400 Subject: [erlang-patches] Montavista system call error handling patch In-Reply-To: <19436.31035.377395.977481@pilspetsen.it.uu.se> References: <19436.31035.377395.977481@pilspetsen.it.uu.se> Message-ID: On Thu, May 13, 2010 at 6:12 PM, Mikael Pettersson wrote: > Steve Vinoski writes: > ?> We've recently experienced a 100% repeatable case of R13B02-1 and > ?> R13B04 beam core dumps on a Montavista Linux system running on a > ?> Cavium Octeon processor. This is technically not a problem with the > ?> Erlang VM but rather is a case where certain socket-related calls in > ?> this version of Montavista Linux, based on a 2.6.21 Linux kernel, are > ?> indicating failure by returning negative numbers with large absolute > ?> values, such as negative 0x40000, rather than returning -1 to indicate > ?> failure as they should. The Erlang TCP code expects system calls to > ?> return -1 to indicate errors and compares directly against that value, > ?> so it ends up treating these negative return values as successful and > ?> adds them to internal pointers as bytes written, offsets, etc. This in > ?> turn corrupts these pointers and causes beam to dump core. > ?> > ?> This patch introduces a portability macro to test for system call > ?> failure within inet_drv.c: > ?> > ?> git fetch git://github.com/vinoski/otp.git socket_error_portability > > I'm not happy with this patch. > > First, you're changing (weakening) error checking on all non-Win32 > platforms, not just the apparently horribly broken MVL. I expected this patch to be controversial, and I can certainly understand if the Erlang/OTP team doesn't want to accept it. In that case, I'll just use the patch in my own build. But the reason I submitted it is that it could enhance Erlang's portability and might save someone else from having to debug and work around the same issue. I'm not sure I agree that this approach weakens any error checking. Socket system calls generally return ssize_t, which is "signed size_t." A positive return value or 0 is the number of bytes written or read for calls that write or read, or for success/fail types of calls, 0 indicates success. This leaves negative numbers as being error cases. POSIX specifies -1 for errors for these cases, yet here we have a kernel returning a negative number other than -1. Most such code of this type I've ever written personally over the years or have seen written by others (including books and other websites) has always used a "< 0" comparison rather than comparing directly against -1. Go thumb through Rich Stevens's network programming books, for example, and you'll find the "< 0" comparison used everywhere. So, rather than weakening the error checking, I would argue this approach enhances the portability of Erlang by guarding against a case actually seen in practice on a real live kernel. Certainly one can assert the kernel is behaving badly, but does that mean Erlang shouldn't run on it, especially given that the change to make it work is so straightforward? > At a minimum > the new IS_SOCKET_ERROR() macro should be written as > > #if > #define IS_SOCKET_ERROR(val) ((val) < 0) > #else > #define IS_SOCKET_ERROR(val) ((val) == SOCKET_ERROR) > #endif But how do we know that this kernel version from this particular vendor is the only one suffering from this bug? > Second, the change needs a big comment. Otherwise someone who's ever > read the POSIX or SuS specs will want to clean it up and turn it back > to the original, not realising the reason for the out-of-spec error check. Adding a comment is not a problem -- I've gone ahead and amended my commit to include one. > (Personally I'd rather wrap the broken socket calls with functions that > convert them to sane APIs, in this case just fix up error returns, than > to force all users to adapt to the breakage. But lots of code in erts > could do with that sort of cleanup, so I'm not going to complain if you > don't want to do it that way.) If I was confident that the problems we've seen were limited to just certain system calls, then yes, perhaps that approach would be better. I appreciate you taking a look at the patch and commenting on it, whether it's accepted or not, and thanks for letting me explain further why I think the patch has merit. --steve From bgustavsson@REDACTED Fri May 14 10:27:33 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 14 May 2010 10:27:33 +0200 Subject: [erlang-patches] Montavista system call error handling patch In-Reply-To: References: <19436.31035.377395.977481@pilspetsen.it.uu.se> Message-ID: I agree with Steve's points. In the Erlang/OTP team, we usually don't use the term "broken platform". A platform may be broken according to some definition of "broken", but if a customer has chosen to use a certain platform and Erlang/OTP does not work well on it, the customer will blame us, not the platform. Pointing out to the customer that their chosen platform is "broken" will not do any good. The patch looks fine to me. (Except that the definition of SOCKET_ERROR should be removed since it is presumably no longer used.) Before accepting it, we will need to consider whether a successful return value could be interpreted as an error. That is, will any of the socket functions return a negative error that does not indicate an error? Looking at a few of the calls: The connect() call return 0 if successful, otherwise -1. It seems to me that if an implementation would return for instance -2 to mean success, it would be more horribly broken than Montavista Linux, so that should be safe. (Alternatively, in this case, it would be possible to test for 0, using another macro.) listen() has the same return values as connect(). The man page for accept() says that it returns a non-negative integer if it succeeds, so that should be safe. It seems that the send() family of system calls can return a negative value that is a success, but only if passed a sufficiently large buffer size so that it will become negative when casted to a signed integer. These functions could need a little investigation to either show that it cannot happen in practice, or do something about it so that it cannot happen in practice (perhaps the error should be checked in the old way for those calls if those calls are not known for returning strange error codes). Steve, I suggest that you revise your commit message to summarize the arguments in your email and also a justification why the change is safe (similar to what I have done in this email, but expanding on it). Putting that information in the commit message has two advantages: It will be easier for us to review the patch since all relevant information can be found in one place and if anyone in the future stumbles upon this commit and wonders why it was made, (s)he will immediately find all information in one place and will not have to waste time searching through the mailing list archives. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From vinoski@REDACTED Fri May 14 22:37:48 2010 From: vinoski@REDACTED (Steve Vinoski) Date: Fri, 14 May 2010 16:37:48 -0400 Subject: [erlang-patches] Montavista system call error handling patch In-Reply-To: References: <19436.31035.377395.977481@pilspetsen.it.uu.se> Message-ID: 2010/5/14 Bj?rn Gustavsson : > I agree with Steve's points. > > In the Erlang/OTP team, we usually don't use the > term "broken platform". A platform may be broken > according to some definition of "broken", but if a > customer has chosen to use a certain platform > and Erlang/OTP does not work well on it, the > customer will blame us, not the platform. Pointing > out to the customer that their chosen platform > is "broken" will not do any good. > > The patch looks fine to me. (Except that the > definition of SOCKET_ERROR should be removed > since it is presumably no longer used.) Done. > Before accepting it, we will need to consider whether > a successful return value could be interpreted as > an error. That is, will any of the socket functions > return a negative error that does not indicate an > error? > > Looking at a few of the calls: > > The connect() call return 0 if successful, otherwise > -1. It seems to me that if an implementation would > return for instance -2 to mean success, it would be > more horribly broken than Montavista Linux, so that > should be safe. (Alternatively, in this case, it would > be possible to test for 0, using another macro.) > > listen() has the same return values as connect(). > > The man page for accept() says that it returns > a non-negative integer if it succeeds, so that should > be safe. > > It seems that the send() family of system calls can > return a negative value that is a success, but only > if passed a sufficiently large buffer size so that > it will become negative when casted to a signed > integer. These functions could need a little > investigation to either show that it cannot happen > in practice, or do something about it so that it > cannot happen in practice (perhaps the error > should be checked in the old way for those > calls if those calls are not known for returning > strange error codes). This can't happen, because generally if a size_t value is passed that's too large to fit into the ssize_t return value, it's an error and errno is set to EINVAL. > Steve, I suggest that you revise your commit > message to summarize the arguments in your > email and also a justification why the change > is safe (similar to what I have done in this > email, but expanding on it). > > Putting that information in the commit message > has two advantages: It will be easier for us to > review the patch since all relevant information > can be found in one place and if anyone in the > future stumbles upon this commit and wonders > why it was made, (s)he will immediately find all > information in one place and will not have to > waste time searching through the mailing > list archives. Good point. I've amended my commit to include this information. thanks, --steve From bgustavsson@REDACTED Sat May 15 10:26:58 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Sat, 15 May 2010 10:26:58 +0200 Subject: [erlang-patches] Montavista system call error handling patch In-Reply-To: References: <19436.31035.377395.977481@pilspetsen.it.uu.se> Message-ID: 2010/5/14 Steve Vinoski : > > Good point. I've amended my commit to include this information. Excellent! Included in 'pu'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Sat May 15 10:27:30 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Sat, 15 May 2010 10:27:30 +0200 Subject: [erlang-patches] fix livelock in erts_poll_info_kp() In-Reply-To: <19434.31988.168458.228784@pilspetsen.it.uu.se> References: <19434.31988.168458.228784@pilspetsen.it.uu.se> Message-ID: On Wed, May 12, 2010 at 12:03 PM, Mikael Pettersson wrote: > erts_poll_info_kp() [defined in erts/emulator/sys/common/erl_poll.c > via some name-mangling trickery] contains a code path that can end > up in an infinite loop, causing a livelock. ?There is a block of code > inside #if ERTS_POLL_USE_UPDATE_REQUESTS_QUEUE that is supposed to > iterate over a linked list of ErtsPollSetUpdateRequestsBlocks and > update two variables based on the sizes of these blocks. ?The bug is > that the loop forgets to advance the list pointer to the next element, > so if the loop is entered at all (the initial list pointer is non-NULL), > the thread falls into an infinite loop. > > This patch, against R13B03 but applies fine to today's git, fixes the > bug by adding a statement to advance the list pointer in the loop. > All other loops over this list appear to be correct. > Thanks! Included in 'pu'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Sat May 15 11:02:30 2010 From: bgustavsson@REDACTED (=?ISO-8859-1?Q?Bj=F6rn_Gustavsson?=) Date: Sat, 15 May 2010 11:02:30 +0200 Subject: What's cooking in erlang/otp (2010-05-15) Message-ID: <4BEE6326.7040704@gmail.com> R14A is planned to be released on June 16. We haven't decided on an exact deadline for submissions yet, but the sooner you'll send in your submissions, the better chance it has to be considered for inclusion in the release. We will try to review most of the current branches in the 'pu' branch before the release. ------------------------------------------------------------ [Graduated] * bg/beam_lib (stdlib) (2010-05-06) 2 commits + Remove redundant includes (a31b2b2) + Make beam_lib:cmp/2 stricter (3f8f87e) * bg/compiler-attributes (compiler) (2010-05-05) 1 commit + Remove opaque declarations from the attributes (36ad068) * bg/opt-receive (compiler, erts, hipe, kernel, otp, stdlib, test_server) (2010-04-23) 11 commits + Test that gen_server:call/2,3 are fast even with a huge message queue (84f6523) + erts: Add tests for the receive optimization (c8c736e) + Update primary bootstrap (cdd4f99) + erts: Implement recv_mark/1 and recv_set/1 for real (9c91901) + compiler tests: Cover the error handling code in beam_receive (f7829c9) + compiler test: Test optimization of receive statements (f39e0b6) + Optimize selective receives in the presence of a large message queue (1d3148a) + Introduce the new recv_mark/1 and recv_mark/1 instructions (d60f055) + Compile tests that communicate with R12 nodes with the r12 option (ea0f50d) + Move p_run/2 to test_lib (f0d8728) + gen: Inline wait_resp_mon/2 to help the compiler optimize (23362ae) * dgud/emacs-21-fix (tools) (2010-05-03) 1 commit + Remove usage of 'font-lock-preprocessor-face' if not available (5373c9c) * pl/fix-shared-lib-install (asn1, megaco, wx) (2010-04-15) 1 commit + Fix shared libraries installation (7809f92) ------------------------------------------------------------ [New topics] * bg/wx_objects (wx) (2010-05-10) 1 commit - wx_objects: Fix calls to unexported gen_server:print_event/3 (6bffafe) * mp/fix-erts_poll_info_kp-livelock (erts) (2010-05-12) 1 commit - fix livelock in erts_poll_info_kp() (3e64542) * sv/socket-error-portability (erts) (2010-05-12) 1 commit - use macro to portably test for socket system call errors (83aa099) ------------------------------------------------------------ [Stalled] * bg/safer-local_to_univ (erts) (2010-02-11) 1 commit - erl_time_sup.c: test for error return from mktime() (0f62f0b) We will not include this branch in R13B04 for two reasons: o We are not 100% sure that this change is harmless on all platforms in all timezones. o We have an idea how the underlying problem can be fixed in the calendar module (only) and I plan to try it out after the release. We will keep this branch in pu as a reminder. Action expected from: Bj??rn Gustavsson * db/tv_nthtail_fix (tv) (2009-12-01) 1 commit - Fix for tv which restarts while trying to open a table (abe0759) Since our long-term goal is to migrate from gs towards wx, maintaining the old gs applications has a low priority for the Erlang/OTP team. Therefore, we will accept patches that seem sound, but we are unlikely to spend much of our own time fixing bugs. The author of this topic branch has found the real reason for the problem, but uncovered additional issues. Action expected from: The topic author - to decide whether to include the topic branch (which is a workaround, but does eliminate the crash) or to wait for a better fix from himself or someone else with an interest to advance the topic. * er/ei-decode_msg (erl_interface) (2010-03-11) 1 commit - Add function to decode distribution header (864091a) Needs documentation and test cases. Action expected from: Topic author * jp/dependencies_makefile (compiler, erts) (2010-02-14) 3 commits - squash! eliminate dialyzer warning (434e2ca) - squash! fix snprintf for Windows (bf2708d) - Add dependencies Makefile generation to erlc(1) and compile(3) (7cbc437) Approved in principle by the OTP Technical Board; now awaits a closer review of the implementation. Action expected from: Bj??rn Gustavsson (the reviewer) * kr/gs-browser (gs) (2010-02-10) 1 commit - Change lib/gs/src/tool_utils.erl to select multiple browsers other than Netscape (802d159) This topic branch introduces a new call to the deprecated regexp module. Action expected from: Topic author or anyone else with an interest to advance the topic ------------------------------------------------------------ [Cooking] * am/kernel-stops (kernel) (2010-02-21) 1 commit - Change restart behavior of network apps from permanent to transient (397343b) * am/net_kernel_catchall (kernel) (2010-02-20) 1 commit - Add catch all handle_call to net_kernel (77ee109) * bg/compiler (compiler, stdlib) (2010-03-12) 5 commits - beam_peep: Remove optimization already done by beam_dead (e9ee2f8) - beam_dead: Combine is_eq_exact instructions into select_val instructions (3b530e8) - Evaluate is_record/3 at compile-time using type information (d5685e3) - Evaluate element/2 at compile-time using type information (f27015c) - erl_expand_records: Replace is_record() with matching (7a463b6) * bg/compiler-cover-and-clean (compiler, erts, hipe) (2010-05-09) 19 commits - v3_life: Remove clause that cannot match in match_fail/3 (8e0a5fa) - v3_life tests: Cover exception handling code in v3_life:function/1 (69beb78) - beam_type: Remove redundant clause (03aa2ea) - v3_core tests: Cover make_bool_switch_guard/5 (5f6c7f8) - v3_core tests: Cover handling of pattern aliases (a5fcd89) - v3_core: Remove a clause in is_simple/1 that cannot match (3114064) - v3_core: Remove unused support for generating compilation errors (ed1f37d) - Remove stray support for the put_literal/2 instruction (5c3cf60) - Remove stray support for the bs_bits_to_bytes2/2 instruction (a4efc76) - Remove the bs_bits_to_bytes/3 instruction (f22f339) - Cover handling of 'math' BIFs (e890deb) - beam_bool: Remove a clause in live_regs/1 that cannot match (1fe4296) . . . * bg/temp-hipe-fixes (compiler, hipe, kernel) (2010-03-15) 6 commits - Avoid crash by skipping compilation_SUITE:on_load/1 (234e13e) - Inline less aggressively for native-code compilation (9fcb48b) - Crudely fix return type for the lists:key{search,find,member}/3 (ef71597) - seq_trace_SUITE: Don't native-compile (2a81b1a) - Disable native code if on_load is used (3befa76) - andor_SUITE: Don't native-compile (97aa2da) This branch contains temporary workarounds to avoid failing test cases and is never intended to graduate. * cf/timer_tc (stdlib) (2010-04-06) 1 commit - Add timer:tc/2 to measure the elapsed time of anonymous functions (2cca650) * dp/shell-line-editing (kernel, stdlib) (2010-03-05) 1 commit - Readline-style line edit history (91e912b) * fm/file-operations (erts, kernel) (2010-04-26) 3 commits - Update preloaded modules (c2dbc5e) - Add file:advise/4 - a wrapper to the POSIX syscall posix_fadvise (6fd827d) - Add file:datasync/1 for syncing file contents only (d96666a) * gl/jinterface-pom (jinterface, otp) (2010-02-15) 2 commits - Exclude jinterface build artifact from git (5acf5fa) - Add pom.xml for jinterface build (aa68190) * hb/edoc (edoc) (2010-04-01) 1 commit - EDoc and Dialyzer specs and types (516e16c) * jf/run_erl-disable-flow-control (erts) (2010-03-05) 1 commit - Teach run_erl RUN_ERL_DISABLE_FLOWCNTRL for disabling flow control (d0775cd) * jl/windows-file-share-delete (erts) (2010-02-22) 1 commit - Windows: Open files with FILE_SHARE_DELETE to get closer to UNIX semantics (0544a2c) * jn/ic-docs-without-java (ic) (2010-03-07) 1 commit - Permit building and installing documentation without Java (2016a08) * jr/cover-src-path (tools) (2010-04-23) 1 commit - Fix searching for source files in analyse_to_file/* (b9d5068) * ks/cleanups (compiler, debugger, docbuilder, gs, stdlib) (2010-04-10) 5 commits - compiler: Fix incorrect types and specs (9021667) - escript: Add more types to records (edfbc4b) - debugger: Clean up as suggested by tidier (42c0c33) - docbuilder: Clean up as suggested by tidier (c22830a) - gs: Clean up as suggested by tidier (eda4f7a) Was formerly called ks/cleanups-after-r13b04. * ks/export_type (compiler, dialyzer, hipe, kernel, stdlib, syntax_tools) (2010-05-10) 13 commits - erl_lint: Issue warnings for undefined exported types (8c22ad6) - Minor fix in a print message (3ae85e9) - Add handling of unknown types (0f9e42e) - Add declaration for exported types (e71d8f6) - Add types and specs; performed some cleanups also (b88e659) - erl_scan: Add declarations for exported types (750f316) - stdlib: Add declarations for exported types (7dcabb9) - hipe: Add declarations for exported types (6a2cce2) - compiler: Add declarations for exported types (a53c99e) - syntax_tools: Add declarations for exported types (839cc84) - kernel: Add declaration for exported types (5fdf89f) - Support -export_type() in dialyzer and erl_types (ce76175) . . . * mh/ssh_channel-init-no-catch (ssh) (2010-01-25) 1 commit - Remove pointless catch from ssh_channel:init/1. (bb7eaa5) * ms/file-exclusive-mode (erts, kernel) (2010-04-30) 1 commit - Support opening files in exclusive mode (5d1253d) * ra/include-public_key-in-ssh (ssh) (2010-01-20) 1 commit - Added public_key among ssh applications. (3a0c2c5) * se/spawn_drv_win_deadlock (erts) (2010-04-28) 1 commit - Fix deadlock in spawn driver on windows (4fe6e7e) * sv/format_status-name-handling (stdlib, wx) (2010-05-09) 1 commit - handle {global, term()} names in format_status/2 (8ca0aee) * sv/format_status_error_info (stdlib) (2010-02-28) 2 commits - Add support for the format_status callback to gen_event (6281020) - Extend format_status for gen_server/gen_fsm termination error logging (5ec0ade) * ta/asn1-reporting (asn1) (2010-04-23) 1 commit - asn1ct: Make formatting of errors and warnings consistent (93face2) * ta/extend-nif-api (erts) (2010-05-07) 3 commits - erl_nif: add make_atom_len, make_existing_atom_len and make_string_len (7ba3d59) - erl_nif: add enif_get_atom_length and enif_get_list_length (855acf4) - erl_nif: add enif_is_list and enif_is_tuple (8905503) * uw/epmd-fullnames (kernel) (2010-05-07) 1 commit - Allow the erlang nodename host part to differ from the hostname (e0774be) * uw/mnesia-overload (mnesia) (2010-05-09) 1 commit - Enable continuous monitoring of mnesia overload status (82c0904) * uw/mnesia-schema-merge (mnesia) (2010-05-09) 1 commit - Allow a user_defined function to wrap mnesia_schema:merge_schema() (3f70f3d) From dave@REDACTED Sun May 16 08:01:34 2010 From: dave@REDACTED (Dave Peticolas) Date: Sat, 15 May 2010 23:01:34 -0700 Subject: patch: emacs flymake support Message-ID: <4BEF8A3E.5030801@krondo.com> This patch adds (optional) support for flymake mode (on-the-fly syntax checking) on Emacs, for UNIX systems. This work was originally submitted to the Erlware version of the Emacs mode by Mats Cronqvist. http://github.com/jdavisp3/otp/tree/emacs-flymake dave From jay@REDACTED Mon May 17 11:25:09 2010 From: jay@REDACTED (Jay Nelson) Date: Mon, 17 May 2010 02:25:09 -0700 Subject: New gen_stream behaviour Message-ID: <86E6A8C5-A30D-4754-A839-FFD3FF6E6EB5@duomark.com> Bjorn, I pushed a new behaviour to stdlib called gen_stream which implements a process-striped buffer for reading files, binaries or generated streams as a serial set of data blocks. This is a complete rewrite of a submission I made at the end of 2007 (see http://www.duomark.com/ erlang/proposals/gen_stream.html for the original background on the project). I created a fairly thorough gen_stream_SUITE.erl and official documentation in the gen_stream.xml file. It is stable enough to use, although I need to add some more tests to the SUITE (timeout, hibernate, ignore and stop on initialization, code_change, and an example behaviour that uses dets handles which must be maintained in the module state. I also need to debug issues I am having on a single core laptop with too many processes (not sure if this is the implementation or a problem with the external behaviour module example I am testing with). The API is slightly changed from the original; the API for the behaviour is more different from the original. I added the ability to pass a transform fun or mfa to reformat each data block as it is written to internal buffers. This allows newline delimited text to be split efficiently, and allows for any arbitrary transformation of the data type or format but only independently within each block of data. Will this module require an EEP? You can retrieve the new code from my account: git fetch git://github.com/jaynel/otp.git gen_stream jay From raimo+erlang-patches@REDACTED Mon May 17 15:24:40 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Mon, 17 May 2010 15:24:40 +0200 Subject: [erlang-patches] patch: emacs flymake support In-Reply-To: <4BEF8A3E.5030801@krondo.com> References: <4BEF8A3E.5030801@krondo.com> Message-ID: <20100517132440.GA15726@erix.ericsson.se> On Sat, May 15, 2010 at 11:01:34PM -0700, Dave Peticolas wrote: > This patch adds (optional) support for flymake mode > (on-the-fly syntax checking) on Emacs, for UNIX systems. > > This work was originally submitted to the Erlware version > of the Emacs mode by Mats Cronqvist. > > http://github.com/jdavisp3/otp/tree/emacs-flymake Thanks. Included in 'pu' with minor tweaks of the commit message and whitespace fixes. For future contributions please use the recommended source format e.g: git fetch git://github.com/jdavisp3/otp.git emacs-flymake -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Mon May 17 15:33:30 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Mon, 17 May 2010 15:33:30 +0200 Subject: [erlang-patches] New gen_stream behaviour In-Reply-To: <86E6A8C5-A30D-4754-A839-FFD3FF6E6EB5@duomark.com> References: <86E6A8C5-A30D-4754-A839-FFD3FF6E6EB5@duomark.com> Message-ID: <20100517133330.GB15726@erix.ericsson.se> On Mon, May 17, 2010 at 02:25:09AM -0700, Jay Nelson wrote: > Bjorn, Not this time :-) > > Will this module require an EEP? I do not think so since it does not affect the language nor the core modules. It may, however, need to be reviewed by the OTP technical board. We would also like community feedback on the behaviour of a new behaviour. > > You can retrieve the new code from my account: > > git fetch git://github.com/jaynel/otp.git gen_stream Thanks. Included in 'pu' with whitespace fixes. -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From jay@REDACTED Mon May 17 18:29:09 2010 From: jay@REDACTED (Jay Nelson) Date: Mon, 17 May 2010 09:29:09 -0700 Subject: [erlang-patches] New gen_stream behaviour In-Reply-To: <20100517133330.GB15726@erix.ericsson.se> References: <86E6A8C5-A30D-4754-A839-FFD3FF6E6EB5@duomark.com> <20100517133330.GB15726@erix.ericsson.se> Message-ID: On May 17, 2010, at 6:33 AM, Raimo Niskanen wrote: > > I do not think so since it does not affect the language > nor the core modules. It may, however, need to be reviewed by > the OTP technical board. We would also like community feedback > on the behaviour of a new behaviour. Please, absolutely. I definitely want feedback. I am sure that there are many improvements possible that I have not considered. >> >> git fetch git://github.com/jaynel/otp.git gen_stream > > Thanks. Included in 'pu' with whitespace fixes. How is this done? I did 'git diff --check' and didn't get anything. How do you detect and fix whitespace issues? jay From jay@REDACTED Mon May 17 20:52:39 2010 From: jay@REDACTED (Jay Nelson) Date: Mon, 17 May 2010 11:52:39 -0700 Subject: Corrections to gen_stream commit Message-ID: <2238A915-84C9-4696-A21D-F7FE84C02149@duomark.com> I left out one data file used in the test suite: lib/stdlib/test/ gen_stream_SUITE_data/alpha.txt and I had some commented out code still in gen_stream_SUITE.erl. Both changes have been committed and pushed up. git fetch git://github.com/jaynel/otp.git gen_stream jay From cebernard@REDACTED Mon May 17 22:32:34 2010 From: cebernard@REDACTED (Chris Bernard) Date: Mon, 17 May 2010 16:32:34 -0400 Subject: Emacs EUnit -- Run the current test function Message-ID: <2C2642F1-BE00-457A-8F78-CF8C428EAE3E@gmail.com> Hi, This patch adds some emacs lisp to run just the current EUnit test (test under point). This feature is handy when using a broken test to drive new development; the focus is on one test at a time. ------- Patch Location git fetch git://github.com/cebernard/otp.git emacs-eunit-run-current- test ------- Tests This was tested on: - Emacs app (OS X) (v. 23.1.90.1) - Carbon Emacs (OS X) (v. 22.1.1) (Carbon v. 1.6.0) - GNU Emacs (Ubuntu) (v. 22.2.1) - GNU Emacs (Ubuntu) (v. 23.1.1) ------- Code Notes Since this added a third testing feature to erlang-eunit.el, there was some natural duplication that needed to be factored out. The notion of 'compile and run tests' was decoupled from the notion of exactly which tests to run. The definitions of default key bindings were converted to a list for clarity and conciseness. --- Comments welcome. Best Regards, Chris Bernard From mail@REDACTED Mon May 17 22:53:29 2010 From: mail@REDACTED (Tim Fletcher) Date: Mon, 17 May 2010 21:53:29 +0100 Subject: [erlang-patches] New gen_stream behaviour In-Reply-To: References: <86E6A8C5-A30D-4754-A839-FFD3FF6E6EB5@duomark.com> <20100517133330.GB15726@erix.ericsson.se> Message-ID: >> We would also like community feedback >> on the behaviour of a new behaviour. > > Please, absolutely. ?I definitely want feedback. ?I am sure that there are > many improvements possible that I have not considered. I haven't tried the code, but like the idea of a stream behaviour/API. How about including writable streams as well, similar to Node (http://nodejs.org/api.html#streams-20)? Tim From raimo+erlang-patches@REDACTED Tue May 18 10:21:40 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Tue, 18 May 2010 10:21:40 +0200 Subject: [erlang-patches] New gen_stream behaviour In-Reply-To: References: <86E6A8C5-A30D-4754-A839-FFD3FF6E6EB5@duomark.com> <20100517133330.GB15726@erix.ericsson.se> Message-ID: <20100518082140.GA23982@erix.ericsson.se> On Mon, May 17, 2010 at 09:29:09AM -0700, Jay Nelson wrote: > > On May 17, 2010, at 6:33 AM, Raimo Niskanen wrote: > > > >I do not think so since it does not affect the language > >nor the core modules. It may, however, need to be reviewed by > >the OTP technical board. We would also like community feedback > >on the behaviour of a new behaviour. > > Please, absolutely. I definitely want feedback. I am sure that > there are many improvements possible that I have not considered. > > >> > >>git fetch git://github.com/jaynel/otp.git gen_stream > > > >Thanks. Included in 'pu' with whitespace fixes. > > How is this done? I did 'git diff --check' and didn't get > anything. How do you detect and fix whitespace issues? There is a hook .git/hooks/pre-commit.sample that you rename to .git/hooks/pre-commit and then you can not commit any whitespace errors (some other problems are checked too). The argument --check to git diff checks for whitespace errors. To fix I use git rebase --whitespace=fix > > jay -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Tue May 18 14:33:14 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Tue, 18 May 2010 14:33:14 +0200 Subject: [erlang-patches] New gen_stream behaviour In-Reply-To: <20100518082140.GA23982@erix.ericsson.se> References: <86E6A8C5-A30D-4754-A839-FFD3FF6E6EB5@duomark.com> <20100517133330.GB15726@erix.ericsson.se> <20100518082140.GA23982@erix.ericsson.se> Message-ID: <20100518123314.GA28737@erix.ericsson.se> On Tue, May 18, 2010 at 10:21:40AM +0200, Raimo Niskanen wrote: > On Mon, May 17, 2010 at 09:29:09AM -0700, Jay Nelson wrote: > > > > On May 17, 2010, at 6:33 AM, Raimo Niskanen wrote: > > > > > >I do not think so since it does not affect the language > > >nor the core modules. It may, however, need to be reviewed by > > >the OTP technical board. We would also like community feedback > > >on the behaviour of a new behaviour. > > > > Please, absolutely. I definitely want feedback. I am sure that > > there are many improvements possible that I have not considered. > > > > >> > > >>git fetch git://github.com/jaynel/otp.git gen_stream > > > > > >Thanks. Included in 'pu' with whitespace fixes. > > > > How is this done? I did 'git diff --check' and didn't get > > anything. How do you detect and fix whitespace issues? > > There is a hook .git/hooks/pre-commit.sample > that you rename to .git/hooks/pre-commit > and then you can not commit any whitespace errors > (some other problems are checked too). > > The argument --check to git diff checks for whitespace errors. Oops, you tried that, i realized. Sorry for sloppy reading. Maybe you did `git diff --check' after commit. Then you compared the head with the head. Before commit it should work as intended. After commit you probably want `git diff --check HEAD^' or against something older than HEAD^ (the second to latest commit on current branch). > > To fix I use git rebase --whitespace=fix > > > > > jay > > -- > > / Raimo Niskanen, Erlang/OTP, Ericsson AB > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Tue May 18 15:18:53 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Tue, 18 May 2010 15:18:53 +0200 Subject: [erlang-patches] Corrections to gen_stream commit In-Reply-To: <2238A915-84C9-4696-A21D-F7FE84C02149@duomark.com> References: <2238A915-84C9-4696-A21D-F7FE84C02149@duomark.com> Message-ID: <20100518131853.GA31835@erix.ericsson.se> On Mon, May 17, 2010 at 11:52:39AM -0700, Jay Nelson wrote: > I left out one data file used in the test suite: lib/stdlib/test/ > gen_stream_SUITE_data/alpha.txt and I had some commented out code > still in gen_stream_SUITE.erl. Both changes have been committed and > pushed up. > > git fetch git://github.com/jaynel/otp.git gen_stream Thanks. Included in 'pu', squashed with the original into one commit, with whitespace fixes. If possible, please base further work on the squashed commit, i.e 540dbcc2a1fdc59e56aaf69ea9f2b0c4b59eebe4 that you can use after fetching 'pu'. -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Tue May 18 15:20:29 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Tue, 18 May 2010 15:20:29 +0200 Subject: [erlang-patches] Emacs EUnit -- Run the current test function In-Reply-To: <2C2642F1-BE00-457A-8F78-CF8C428EAE3E@gmail.com> References: <2C2642F1-BE00-457A-8F78-CF8C428EAE3E@gmail.com> Message-ID: <20100518132029.GB31835@erix.ericsson.se> On Mon, May 17, 2010 at 04:32:34PM -0400, Chris Bernard wrote: > Hi, > > This patch adds some emacs lisp to run just the current EUnit test > (test under point). > > This feature is handy when using a broken test to drive new > development; the focus is on one test at a time. > > ------- Patch Location > > git fetch git://github.com/cebernard/otp.git emacs-eunit-run-current- > test Thanks. Included in 'pu'. -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Tue May 18 15:18:34 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Tue, 18 May 2010 15:18:34 +0200 Subject: [erlang-patches] Montavista system call error handling patch In-Reply-To: References: <19436.31035.377395.977481@pilspetsen.it.uu.se> Message-ID: 2010/5/15 Bj?rn Gustavsson : > 2010/5/14 Steve Vinoski : >> >> Good point. I've amended my commit to include this information. > > Excellent! Included in 'pu'. Unfortunately this new version does not build: drivers/common/inet_drv.c: In function ?inet_fill_opts?: drivers/common/inet_drv.c:5646: error: ?SOCKET_ERROR? undeclared (first use in this function) drivers/common/inet_drv.c:5646: error: (Each undeclared identifier is reported only once drivers/common/inet_drv.c:5646: error: for each function it appears in.) The build problem exposes a place where the new IS_SOCKET_ERROR() macro is not used. Another thing is that the Windows version of the macro should still use SOCKET_ERROR: #define IS_SOCKET_ERROR(val) ((val) == SOCKET_ERROR) since SOCKET_ERROR is defined in a header file on Windows. Because of the build error, Raimo has taken out the branch from the pu branch. He will re-instate it as soon as you have fixed the build problem. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From davidw@REDACTED Tue May 18 15:42:11 2010 From: davidw@REDACTED (David Welton) Date: Tue, 18 May 2010 15:42:11 +0200 Subject: problem with ":" in http passwords Message-ID: Hi, I was trying to do something along the lines of http:request("http://foo:bar:bee:bop@REDACTED"), where, in theory, 'foo' is the username, and the rest is a password, but that causes problems - try it for yourself and see what sort of headers it generates. This patch seems to fix it, but I can't be 100% sure since doing make release_tests "doesn't work" (doesn't even start running tests) here. It should be pretty simple to ascertain, though. lib/inets/src/http_client/httpc_request.erl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/inets/src/http_client/httpc_request.erl b/lib/inets/src/http_client/httpc_request.erl index 55e0af4..e64d87a 100644 --- a/lib/inets/src/http_client/httpc_request.erl +++ b/lib/inets/src/http_client/httpc_request.erl @@ -236,8 +236,8 @@ handle_user_info([], Headers) -> Headers; handle_user_info(UserInfo, Headers) -> case string:tokens(UserInfo, ":") of - [User, Passwd] -> - UserPasswd = base64:encode_to_string(User ++ ":" ++ Passwd), + [User | Rest] -> + UserPasswd = base64:encode_to_string(User ++ ":" ++ string:join(Rest, ":")), Headers#http_request_h{authorization = "Basic " ++ UserPasswd}; [User] -> UserPasswd = base64:encode_to_string(User ++ ":"), -- 1.6.3.3 Thanks, -- David N. Welton http://www.welton.it/davidw/ http://www.dedasys.com/ From michael.santos@REDACTED Tue May 18 16:56:30 2010 From: michael.santos@REDACTED (Michael Santos) Date: Tue, 18 May 2010 10:56:30 -0400 Subject: [erlang-patches] problem with ":" in http passwords In-Reply-To: References: Message-ID: <20100518145630.GA30102@ecn.lan> On Tue, May 18, 2010 at 03:42:11PM +0200, David Welton wrote: > Hi, > > I was trying to do something along the lines of > > http:request("http://foo:bar:bee:bop@REDACTED"), where, in theory, > 'foo' is the username, and the rest is a password, but that causes > problems - try it for yourself and see what sort of headers it > generates. Looking at RFC 1738: The user name (and password), if present, are followed by a commercial at-sign "@". Within the user and password field, any ":", "@", or "/" must be encoded. See: http://www.faqs.org/rfcs/rfc1738.html Maybe try: edoc_lib:escape_uri("my:pass"). > This patch seems to fix it, but I can't be 100% sure since doing make > release_tests "doesn't work" (doesn't even start running tests) here. > It should be pretty simple to ascertain, though. > > lib/inets/src/http_client/httpc_request.erl | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/inets/src/http_client/httpc_request.erl > b/lib/inets/src/http_client/httpc_request.erl > index 55e0af4..e64d87a 100644 > --- a/lib/inets/src/http_client/httpc_request.erl > +++ b/lib/inets/src/http_client/httpc_request.erl > @@ -236,8 +236,8 @@ handle_user_info([], Headers) -> > Headers; > handle_user_info(UserInfo, Headers) -> > case string:tokens(UserInfo, ":") of > - [User, Passwd] -> > - UserPasswd = base64:encode_to_string(User ++ ":" ++ Passwd), > + [User | Rest] -> > + UserPasswd = base64:encode_to_string(User ++ ":" ++ > string:join(Rest, ":")), > Headers#http_request_h{authorization = "Basic " ++ UserPasswd}; > [User] -> > UserPasswd = base64:encode_to_string(User ++ ":"), > -- > 1.6.3.3 > > > Thanks, > -- > David N. Welton > > http://www.welton.it/davidw/ > > http://www.dedasys.com/ > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > From vinoski@REDACTED Tue May 18 21:52:02 2010 From: vinoski@REDACTED (Steve Vinoski) Date: Tue, 18 May 2010 15:52:02 -0400 Subject: [erlang-patches] Montavista system call error handling patch In-Reply-To: References: <19436.31035.377395.977481@pilspetsen.it.uu.se> Message-ID: 2010/5/18 Bj?rn Gustavsson : > 2010/5/15 Bj?rn Gustavsson : >> 2010/5/14 Steve Vinoski : >>> >>> Good point. I've amended my commit to include this information. >> >> Excellent! Included in 'pu'. > > Unfortunately this new version does not build: > > drivers/common/inet_drv.c: In function ?inet_fill_opts?: > drivers/common/inet_drv.c:5646: error: ?SOCKET_ERROR? undeclared > (first use in this function) > drivers/common/inet_drv.c:5646: error: (Each undeclared identifier is > reported only once > drivers/common/inet_drv.c:5646: error: for each function it appears in.) > > The build problem exposes a place where the new IS_SOCKET_ERROR() > macro is not used. > > Another thing is that the Windows version of the macro should still > use SOCKET_ERROR: > > #define IS_SOCKET_ERROR(val) ((val) == SOCKET_ERROR) > > since SOCKET_ERROR is defined in a header file on Windows. > > Because of the build error, Raimo has taken out the branch > from the pu branch. He will re-instate it as soon as you have > fixed the build problem. Sorry about that, I messed it up when I removed SOCKET_ERROR as you had suggested. I've restored SOCKET_ERROR since it's still used in the Windows code, and found and fixed the one place that needed the new IS_SOCKET_ERROR macro but wasn't using it. It all builds correctly again. --steve From magnus@REDACTED Wed May 19 00:08:02 2010 From: magnus@REDACTED (Magnus Henoch) Date: Tue, 18 May 2010 23:08:02 +0100 Subject: Use erlang-mode for escript files Message-ID: <841vd8kgn1.fsf@linux-b2a3.site> git fetch git://github.com/legoscia/otp.git escript-erlang-mode Associate files using interpreter "escript" with Erlang mode A file whose first line contains "#!/usr/bin/env escript" should be opened in erlang-mode, even if its name doesn't end in ".erl". Add an entry to interpreter-mode-alist to that effect. -- Magnus Henoch, magnus@REDACTED Erlang Solutions http://www.erlang-solutions.com/ --------------------------------------------------- --------------------------------------------------- WE'VE CHANGED NAMES! Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD. www.erlang-solutions.com From magnus@REDACTED Wed May 19 00:23:03 2010 From: magnus@REDACTED (Magnus Henoch) Date: Tue, 18 May 2010 23:23:03 +0100 Subject: New features for Emacs command inferior-erlang Message-ID: <84tyq4j1dk.fsf@linux-b2a3.site> git fetch git://github.com/legoscia/otp.git inferior-erlang-cmd-uniq Add a new feature to the command inferior-erlang: when called with a prefix argument, prompt for the command to execute to start the Erlang shell. When possible (i.e., in Emacs 23 and later), allow tab completion as in a normal shell. Also create the shell buffer in such a way that, if uniquify-buffer-name-style is not nil and several Erlang shell buffers are started in different directories, the names of those buffers reflect their working directories instead of being *erlang*, *erlang*<2>, etc. -- Magnus Henoch, magnus@REDACTED Erlang Solutions http://www.erlang-solutions.com/ --------------------------------------------------- --------------------------------------------------- WE'VE CHANGED NAMES! Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD. www.erlang-solutions.com From magnus@REDACTED Wed May 19 00:41:37 2010 From: magnus@REDACTED (Magnus Henoch) Date: Tue, 18 May 2010 23:41:37 +0100 Subject: Fix indentation of records with line breaks inside lists Message-ID: <84mxvwj0im.fsf@linux-b2a3.site> git fetch git://github.com/legoscia/otp.git fix-record-indentation Trying to indent this piece of code by hitting TAB on each line: foo() -> [#foo{ foo = foo}]. used to cause an error. Fix by ignoring errors when trying to skip backwards from a record. Also add this test case to test.erl.orig and test.erl.indented. -- Magnus Henoch, magnus@REDACTED Erlang Solutions http://www.erlang-solutions.com/ --------------------------------------------------- --------------------------------------------------- WE'VE CHANGED NAMES! Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD. www.erlang-solutions.com From sam@REDACTED Wed May 19 01:01:47 2010 From: sam@REDACTED (Sam Bobroff) Date: Wed, 19 May 2010 09:01:47 +1000 Subject: Behaviour of make:files vs. erlc and patch Message-ID: <4BF31C5B.2050604@m5net.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi everyone, I have sometimes had a problem with make:files failing mysteriously with 'error' and no message. Running erlc from the command line on the same files works successfully and I think I've tracked the issue to an unnecessary check in make:files that fails because the target .beam file exists but is owned by root. I have created a simple patch for this and I humbly present it for review. It's my first one so I hope it's OK! Here's the commit message: - ------ Change make:files to behave more like erlc Currently make:files will fail with the atom 'error' and no message when the input (.erl) file is unreadable or the output (.beam) file is unwritable. This differs from erlc which will print a useful error message, or when possible, remove the unwritable output file and continue successfully. This change removes an the unnecessary checks on the files when make:files is called and allows the error checking to be done in compile:file, where the error messages are produced. It does not effect the return value. In particular this resolves the mysterious problem of make:files failing but erlc succeeding, caused by an unwritable (usually root owned) beam file in an otherwise writable build directory. - ------ The patch location is: git fetch git://github.com/firx/otp.git make_files_like_erlc Cheers, Sam. - -- Sam Bobroff | sam@REDACTED | M5 Networks Why does my email have those funny headers? Because I use PGP to sign my email (and you should too!): that's how you know it's really from me. See: http://en.wikipedia.org/wiki/Pretty_Good_Privacy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkvzHFsACgkQm97/UHSa/ARwZgCdFE2AAg7AY+d0rXMSHRdAJvhx 8EEAn3heGIEw/bJxmvTowxvWbP1gV3jm =FJfG -----END PGP SIGNATURE----- From bgustavsson@REDACTED Wed May 19 08:49:21 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Wed, 19 May 2010 08:49:21 +0200 Subject: [erlang-patches] Montavista system call error handling patch In-Reply-To: References: <19436.31035.377395.977481@pilspetsen.it.uu.se> Message-ID: 2010/5/18 Steve Vinoski : > 2010/5/18 Bj?rn Gustavsson : >> The build problem exposes a place where the new IS_SOCKET_ERROR() >> macro is not used. >> >> Another thing is that the Windows version of the macro should still >> use SOCKET_ERROR: >> >> #define IS_SOCKET_ERROR(val) ((val) == SOCKET_ERROR) >> >> since SOCKET_ERROR is defined in a header file on Windows. >> >> Because of the build error, Raimo has taken out the branch >> from the pu branch. He will re-instate it as soon as you have >> fixed the build problem. > > Sorry about that, I messed it up when I removed SOCKET_ERROR as you > had suggested. I've restored SOCKET_ERROR since it's still used in the > Windows code, and found and fixed the one place that needed the new > IS_SOCKET_ERROR macro but wasn't using it. It all builds correctly > again. Thanks! SOCKET_ERROR really must be defined, but the reason why it must be defined is that the value of SOCKET_ERROR is returned from the functions erts_sock_send() and erts_sock_gethostname() at the end of the file. On Windows, SOCKET_ERROR is defined in the winsock2.h header file. One more change is necessary to get it build on Windows. The macro definition for IS_SOCKET_ERROR() is inside the #else part of a huge #ifdef and will only be defined on Unix systems. It must be moved like this: http://github.com/bjorng/otp/commit/6fc366caffca7a6cf9c5aff084d169da18ca9efa (That commit should be combined with the previous commit before including the branch in pu.) Since the #ifdef structure is complicated in the inet_drv.c, I suggest that a red herring (that fooled me for a while) should be eliminated: http://github.com/bjorng/otp/commit/fcc0f94ef1831751cf8ae8be209a5cb0f442854f My updated version of the branch can be found here: git fetch git://github.com/bjorng/otp.git sv/socket-error-portability -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From davidw@REDACTED Wed May 19 14:05:50 2010 From: davidw@REDACTED (David Welton) Date: Wed, 19 May 2010 14:05:50 +0200 Subject: [erlang-patches] problem with ":" in http passwords In-Reply-To: <20100518145630.GA30102@ecn.lan> References: <20100518145630.GA30102@ecn.lan> Message-ID: >> I was trying to do something along the lines of >> >> http:request("http://foo:bar:bee:bop@REDACTED"), where, in theory, >> 'foo' is the username, and the rest is a password, but that causes >> problems - try it for yourself and see what sort of headers it >> generates. > > Looking at RFC 1738: > > The user name (and password), if present, are followed by a commercial > at-sign "@". Within the user and password field, any ":", "@", or "/" > must be encoded. > > See: http://www.faqs.org/rfcs/rfc1738.html > > Maybe try: > > ? ?edoc_lib:escape_uri("my:pass"). Aha - I suspected as much, but I looked at the wrong RFC, I guess. A quick experiment shows that the service I'm trying to talk with (twitter's streaming API) does not like it if I encode the entire password, but does accept encoded ':' characters (as per the RFC, I suppose). It also accepts it unencoded. So the proper fix here will encode :, @ and / and nothing else. It'll probably take me a bit to get to that. Thanks, -- David N. Welton http://www.welton.it/davidw/ http://www.dedasys.com/ From raimo+erlang-patches@REDACTED Wed May 19 16:31:07 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Wed, 19 May 2010 16:31:07 +0200 Subject: [erlang-patches] Montavista system call error handling patch In-Reply-To: References: <19436.31035.377395.977481@pilspetsen.it.uu.se> <20100519085614.GA22939@erix.ericsson.se> Message-ID: <20100519143107.GA20392@erix.ericsson.se> On Wed, May 19, 2010 at 09:55:59AM -0400, Steve Vinoski wrote: > Thanks guys. Shall I still grab Bj?rn's changes and incorporate them > into my branch, or is the process on track without me doing that? I > guess you may not need anything from my branch at this point but I > should get Bj?rn's changes anyway, just for completeness and accuracy? I take it from Bj?rn's branch. If you want to continue or fix anything more, please continue on Bj?rn's branch too. > > thanks, > --steve > > 2010/5/19 Raimo Niskanen : > > I have fetched from Bj?rn's combined branch. > > > > So it will soon be included in 'pu'... even if I might have > > asked for more help from Steve earlier; I did not see > > Bj?rn had a ready made branch. Sloppy reading on my part. > > Sorry about that. > > > > On Wed, May 19, 2010 at 08:49:21AM +0200, Bj?rn Gustavsson wrote: > >> 2010/5/18 Steve Vinoski : > >> > 2010/5/18 Bj?rn Gustavsson : > >> >> The build problem exposes a place where the new IS_SOCKET_ERROR() > >> >> macro is not used. > >> >> > >> >> Another thing is that the Windows version of the macro should still > >> >> use SOCKET_ERROR: > >> >> > >> >> #define IS_SOCKET_ERROR(val) ((val) == SOCKET_ERROR) > >> >> > >> >> since SOCKET_ERROR is defined in a header file on Windows. > >> >> > >> >> Because of the build error, Raimo has taken out the branch > >> >> from the pu branch. He will re-instate it as soon as you have > >> >> fixed the build problem. > >> > > >> > Sorry about that, I messed it up when I removed SOCKET_ERROR as you > >> > had suggested. I've restored SOCKET_ERROR since it's still used in the > >> > Windows code, and found and fixed the one place that needed the new > >> > IS_SOCKET_ERROR macro but wasn't using it. It all builds correctly > >> > again. > >> > >> Thanks! > >> > >> SOCKET_ERROR really must be defined, but the reason > >> why it must be defined is that the value of SOCKET_ERROR > >> is returned from the functions erts_sock_send() and > >> erts_sock_gethostname() at the end of the file. On Windows, > >> SOCKET_ERROR is defined in the winsock2.h header file. > >> > >> One more change is necessary to get it build on Windows. > >> The macro definition for IS_SOCKET_ERROR() is inside > >> the #else part of a huge #ifdef and will only be defined on > >> Unix systems. It must be moved like this: > >> > >> http://github.com/bjorng/otp/commit/6fc366caffca7a6cf9c5aff084d169da18ca9efa > >> > >> (That commit should be combined with the previous > >> commit before including the branch in pu.) > >> > >> Since the #ifdef structure is complicated in the inet_drv.c, I suggest > >> that a red herring (that fooled me for a while) should be eliminated: > >> > >> http://github.com/bjorng/otp/commit/fcc0f94ef1831751cf8ae8be209a5cb0f442854f > >> > >> My updated version of the branch can be found here: > >> > >> git fetch git://github.com/bjorng/otp.git sv/socket-error-portability > >> > >> -- > >> Bj?rn Gustavsson, Erlang/OTP, Ericsson AB > >> > >> ________________________________________________________________ > >> erlang-patches (at) erlang.org mailing list. > >> See http://www.erlang.org/faq.html > >> To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > >> > > > > -- > > > > / Raimo Niskanen, Erlang/OTP, Ericsson AB > > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Wed May 19 16:50:09 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Wed, 19 May 2010 16:50:09 +0200 Subject: fm/file-operations Message-ID: We hope to graduate this branch soon, but with a few changes: The get_int64() macro that you used did not actually work (it was not actually used before), so I have corrected it in a separate commit: http://github.com/bjorng/otp/commit/1a4c6275d3cb1d91db376a854bdda083c63f0feb I also did a minor clean-up in a commit that is separate now, but I want to combine it with your commit: http://github.com/bjorng/otp/commit/1d477960292a6065231763e9691949aac818d3a8 If you don't like this change, please tell us so as soon as possible. Here is the fetch command to fetch the updated branch: git fetch git://github.com/bjorng/otp.git fm/file-operations -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From fdmanana@REDACTED Wed May 19 17:02:54 2010 From: fdmanana@REDACTED (Filipe David Manana) Date: Wed, 19 May 2010 16:02:54 +0100 Subject: fm/file-operations In-Reply-To: References: Message-ID: Your changes are perfectly fine for me. Please go on. cheers 2010/5/19 Bj?rn Gustavsson > We hope to graduate this branch soon, but with > a few changes: > > The get_int64() macro that you used did not actually > work (it was not actually used before), so I have corrected > it in a separate commit: > > > http://github.com/bjorng/otp/commit/1a4c6275d3cb1d91db376a854bdda083c63f0feb > > > I also did a minor clean-up in a commit that is separate now, but > I want to combine it with your commit: > > > http://github.com/bjorng/otp/commit/1d477960292a6065231763e9691949aac818d3a8 > > If you don't like this change, please tell us so as soon as possible. > > > Here is the fetch command to fetch the updated branch: > > git fetch git://github.com/bjorng/otp.git fm/file-operations > > -- > Bj?rn Gustavsson, Erlang/OTP, Ericsson AB > -- Filipe David Manana, fdmanana@REDACTED "Reasonable men adapt themselves to the world. Unreasonable men adapt the world to themselves. That's why all progress depends on unreasonable men." From tuncer.ayaz@REDACTED Wed May 19 17:49:03 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Wed, 19 May 2010 17:49:03 +0200 Subject: [erlang-patches] fm/file-operations In-Reply-To: References: Message-ID: 2010/5/19 Bj?rn Gustavsson: > We hope to graduate this branch soon, but with > a few changes: > > The get_int64() macro that you used did not actually > work (it was not actually used before), so I have corrected > it in a separate commit: > > http://github.com/bjorng/otp/commit/1a4c6275d3cb1d91db376a854bdda083c63f0feb > > > I also did a minor clean-up in a commit that is separate now, but > I want to combine it with your commit: > > http://github.com/bjorng/otp/commit/1d477960292a6065231763e9691949aac818d3a8 > > If you don't like this change, please tell us so as soon as possible. > > > Here is the fetch command to fetch the updated branch: > > git fetch git://github.com/bjorng/otp.git fm/file-operations I would prefer the documentation to be more in line with the existing text in file.xml, use the same order of advise values as in the original manpage and be less specific about the effect. --- a/file.xml +++ b/file.xml @@ -69,16 +69,15 @@ time() = {{Year, Month, Day}, {Hour, Minute, Second}} Offset = int() Length = int() Advise = posix_file_advise() - posix_file_advise() = normal | sequential | random | will_need - | dont_need | no_reuse + posix_file_advise() = normal | sequential | random | no_reuse + | will_need | dont_need Reason = ext_posix() -

This function allows the Operating System to perform caching - optimizations for accessing a file's data.

-

This function is available only on POSIX compliant systems. - For systems that are not POSIX compliant, this function has - no effect when invoked.

+

advise can be used to announce an intention to access file + data in a specific pattern in the future, thus allowing the + operating system to perform appropriate optimizations.

+

On some platforms, this function might have no effect.

From bgustavsson@REDACTED Thu May 20 10:59:34 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Thu, 20 May 2010 10:59:34 +0200 Subject: [erlang-patches] fm/file-operations In-Reply-To: References: Message-ID: 2010/5/19 Tuncer Ayaz : > I would prefer the documentation to be more in line with the existing > text in file.xml, use the same order of advise values as in the > original manpage and be less specific about the effect. I also like your version better, except for a minor detail which I have marked below. Filipe, is this change OK for you? > --- a/file.xml > +++ b/file.xml > @@ -69,16 +69,15 @@ time() = {{Year, Month, Day}, {Hour, Minute, Second}} > Offset = int() > Length = int() > Advise = posix_file_advise() > - posix_file_advise() = normal | sequential | random | will_need > - | dont_need | no_reuse > + posix_file_advise() = normal | sequential | random | no_reuse > + | will_need | dont_need > Reason = ext_posix() > > > -

This function allows the Operating System to perform caching > - optimizations for accessing a file's data.

> -

This function is available only on POSIX compliant systems. > - For systems that are not POSIX compliant, this function has > - no effect when invoked.

> +

advise can be used to announce an intention to access file In the documentation, we include the arity when referring to a function. Thus:

advise/4 can be used to announce an intention to access file > + data in a specific pattern in the future, thus allowing the > + operating system to perform appropriate optimizations.

> +

On some platforms, this function might have no effect.

>
>
> > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From fdmanana@REDACTED Thu May 20 11:02:53 2010 From: fdmanana@REDACTED (Filipe David Manana) Date: Thu, 20 May 2010 10:02:53 +0100 Subject: [erlang-patches] fm/file-operations In-Reply-To: References: Message-ID: 2010/5/20 Bj?rn Gustavsson > 2010/5/19 Tuncer Ayaz : > > > I would prefer the documentation to be more in line with the existing > > text in file.xml, use the same order of advise values as in the > > original manpage and be less specific about the effect. > > I also like your version better, except for a minor detail > which I have marked below. > > Filipe, is this change OK for you? > Perfectly fine. Thank you both for improving the documentation. > > > --- a/file.xml > > +++ b/file.xml > > @@ -69,16 +69,15 @@ time() = {{Year, Month, Day}, {Hour, Minute, Second}} > > Offset = int() > > Length = int() > > Advise = posix_file_advise() > > - posix_file_advise() = normal | sequential | random | > will_need > > - | dont_need | no_reuse > > + posix_file_advise() = normal | sequential | random | no_reuse > > + | will_need | dont_need > > Reason = ext_posix() > > > > > > -

This function allows the Operating System to perform caching > > - optimizations for accessing a file's data.

> > -

This function is available only on POSIX compliant systems. > > - For systems that are not POSIX compliant, this function has > > - no effect when invoked.

> > +

advise can be used to announce an intention to access > file > > In the documentation, we include the arity when referring to a function. > Thus: > >

advise/4 can be used to announce an intention to access file > > > + data in a specific pattern in the future, thus allowing the > > + operating system to perform appropriate optimizations.

> > +

On some platforms, this function might have no effect.

> >
> >
> > > > > > -- > Bj?rn Gustavsson, Erlang/OTP, Ericsson AB > -- Filipe David Manana, fdmanana@REDACTED "Reasonable men adapt themselves to the world. Unreasonable men adapt the world to themselves. That's why all progress depends on unreasonable men." From bgustavsson@REDACTED Thu May 20 14:54:56 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Thu, 20 May 2010 14:54:56 +0200 Subject: [erlang-patches] fm/file-operations In-Reply-To: References: Message-ID: 2010/5/20 Filipe David Manana : > Perfectly fine. > Thank you both for improving the documentation. OK. I have updated the branch to include the changes: git fetch git://github.com/bjorng/otp.git fm/file-operations -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Thu May 20 16:03:21 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Thu, 20 May 2010 16:03:21 +0200 Subject: [erlang-patches] fm/file-operations In-Reply-To: References: Message-ID: <20100520140321.GB11775@erix.ericsson.se> On Thu, May 20, 2010 at 02:54:56PM +0200, Bj?rn Gustavsson wrote: > 2010/5/20 Filipe David Manana : > > > Perfectly fine. > > Thank you both for improving the documentation. > > OK. I have updated the branch to include the changes: > > git fetch git://github.com/bjorng/otp.git fm/file-operations Thanks! Included in 'pu'. > > -- > Bj?rn Gustavsson, Erlang/OTP, Ericsson AB > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From tuncer.ayaz@REDACTED Thu May 20 19:42:26 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Thu, 20 May 2010 19:42:26 +0200 Subject: correct typos in eep-0031 impl Message-ID: Just a couple trivial typos noticed while reading the implementation. git fetch git://github.com/tuncer/otp.git eep31_typos Interestingly the often linked-to and cited AH animation applet is unreachable as Dieter Buehler's site seems to 404 (at the moment). I can confirm that it was available this January :). From magnus@REDACTED Thu May 20 22:56:47 2010 From: magnus@REDACTED (Magnus Henoch) Date: Thu, 20 May 2010 21:56:47 +0100 Subject: Set erlang-mode-map when erlang.el is loaded Message-ID: <848w7epa0g.fsf@linux-b2a3.site> git fetch git://github.com/legoscia/otp.git erlang-mode-map-init Set erlang-mode-map when loading erlang.el Create and assign the erlang-mode keymap to erlang-mode-map once erlang.el is loaded, not the first time it is used. This way of doing it follows the Emacs Lisp convention described at http://www.gnu.org/software/emacs/manual/html_node/elisp/Tips-for-Defining.html and also makes it easier for users to customize the keymap. Remove the now unneeded functions erlang-keymap-init and erlang-mode-commands. Also move the definition of inferior-erlang-use-cmm, so it is available when defining erlang-mode-map. -- Magnus Henoch, magnus@REDACTED Erlang Solutions http://www.erlang-solutions.com/ --------------------------------------------------- --------------------------------------------------- WE'VE CHANGED NAMES! Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD. www.erlang-solutions.com From magnus@REDACTED Thu May 20 23:07:46 2010 From: magnus@REDACTED (Magnus Henoch) Date: Thu, 20 May 2010 22:07:46 +0100 Subject: Add arity information to M-x imenu choices Message-ID: <844oi2p9i5.fsf@linux-b2a3.site> git fetch git://github.com/legoscia/otp.git imenu-arity Make the function names used by M-x imenu contain the function arity as well as the name. -- Magnus Henoch, magnus@REDACTED Erlang Solutions http://www.erlang-solutions.com/ --------------------------------------------------- --------------------------------------------------- WE'VE CHANGED NAMES! Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD. www.erlang-solutions.com From raimo+erlang-patches@REDACTED Fri May 21 09:22:41 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Fri, 21 May 2010 09:22:41 +0200 Subject: [erlang-patches] correct typos in eep-0031 impl In-Reply-To: References: Message-ID: <20100521072241.GA6553@erix.ericsson.se> On Thu, May 20, 2010 at 07:42:26PM +0200, Tuncer Ayaz wrote: > Just a couple trivial typos noticed while reading the implementation. > > git fetch git://github.com/tuncer/otp.git eep31_typos Thank you! Will be included directly in the dev branch... > > Interestingly the often linked-to and cited AH animation applet > is unreachable as Dieter Buehler's site seems to 404 (at the moment). > I can confirm that it was available this January :). > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Fri May 21 11:57:53 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Fri, 21 May 2010 11:57:53 +0200 Subject: What is cooking in erlang/otp Message-ID: <20100521095753.GA9379@erix.ericsson.se> After a looong delay, here is an action point for you, I hope you do'nt mind: * gl/jinterface-pom (jinterface, otp) (2010-02-15) 2 commits - Exclude jinterface build artifact from git (5acf5fa) - Add pom.xml for jinterface build (aa68190) The pom.xml file should be generated by the toplevel Makefile since it contains the version number of Jinterface. This is along the same line as the .app files are generated. There should be a pom.xml.src that Makefile sed's into pom.xml. See stdlib/src/Makefile. Action expected from: Topic author -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Fri May 21 12:00:12 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Fri, 21 May 2010 12:00:12 +0200 Subject: What's cooking in erlang/otp excerpt Message-ID: <20100521100012.GB9379@erix.ericsson.se> * jn/gen_stream (stdlib) (2010-05-17) 1 commit - Add new gen_stream behaviour for efficiently consuming serial streams (540dbcc) This topic branch has failing test cases. stdlib_suite:app_test; gen_stream is not included in the stdlib.app file. shell_SUITE:start_restricted_from_shell; Although the whole pu branch could be guilty this topic branch is our prime suspect. Action expected from: Topic author -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Fri May 21 16:55:45 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 21 May 2010 16:55:45 +0200 Subject: Avoiding false Dialyzer warnings for NIFs Message-ID: I have implemented a new erlang:nif_error/1 BIF that can be used in the stub for NIFs to avoid false Dialyzer warnings: http://github.com/bjorng/otp/commit/826c9574776ae931917e55d441ec0cfcb0acaf84 In a second commit, I have modified the crypto module to use erlang:nif_error/1. I have run the crypto test suite, but I have not yet verified that the false Dialyzer warnings disappear. Feedback welcome. The branch can be fetched like this: git fetch git://github.com/bjorng/otp.git bg/nif_error -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From jay@REDACTED Sat May 22 19:14:12 2010 From: jay@REDACTED (Jay Nelson) Date: Sat, 22 May 2010 10:14:12 -0700 Subject: What's cooking in erlang/otp excerpt In-Reply-To: <20100521100012.GB9379@erix.ericsson.se> References: <20100521100012.GB9379@erix.ericsson.se> Message-ID: <066547BF-20ED-4EBB-8A39-187382B5B170@duomark.com> > Thanks. Included in 'pu', squashed with the original into one commit, > with whitespace fixes. > If possible, please base further work on the squashed commit, > i.e 540dbcc2a1fdc59e56aaf69ea9f2b0c4b59eebe4 that you can use > after fetching 'pu'. I've got the basics of git, but I always seem to have problems if I do anything fancy. I did 'git fetch' and 'git pull upstream dev' and then I could see 540dbcc with 'git log'. I believe I then should have just done 'git branch 540dbcc' but I think at some point I deleted my branch and tried again. Eventually I got the changes locally but when I tried to push them up, it said there was no remote branch. I have since tried lots of things, eventually getting the message "Your branch is ahead of 'origin/dev' by 276 commits" (not sure how that happened). I did 'rm -rf otp' and started fresh from the instructions on the web site to track a new branch, but I am still in the 276 commits ahead of dev mode and I now can no longer see 540dbcc. 'git remote -v' doesn't show 'pu' or any other branches, just origin and upstream. Anybody have any advice how to get things back in sync? On May 21, 2010, at 3:00 AM, Raimo Niskanen wrote: > * jn/gen_stream (stdlib) (2010-05-17) 1 commit > - Add new gen_stream behaviour for efficiently consuming serial > streams (540dbcc) > > This topic branch has failing test cases. > > stdlib_suite:app_test; > gen_stream is not included in the stdlib.app file. lib/stdlib/src/stdlib.app.src => add the following line after 'gen_server,' gen_stream, Also missing was my change to lib/stdlib/doc/src/ref_man.xml => add the following line after '' > > shell_SUITE:start_restricted_from_shell; > Although the whole pu branch could be guilty > this topic branch is our prime suspect. The line of the failure is running rr(...) I don't really see how gen_stream could have affected this. I may be mistaken, but it isn't clear how the interaction could occur. > > Action expected from: Topic author > > -- > > / Raimo Niskanen, Erlang/OTP, Ericsson AB > From kagato@REDACTED Sun May 23 03:54:12 2010 From: kagato@REDACTED (Jayson Vantuyl) Date: Sat, 22 May 2010 18:54:12 -0700 Subject: Auto-Import binary_to_term/2 Message-ID: I previously added binary_to_term/2 in order to make the decoding of binaries from the network safer (in terms of leaking resources that aren't reclaimed). Since this was in the middle of the R13 stream, we did not auto-import the new function. Specifically, it was stated that this is only done on major releases. With the upcoming release of R14, it is now time to do so. Changes are on GitHub. Here's the fetch command: > git fetch git://github.com/jvantuyl/otp.git jv/autoimport-binary_to_term_2 Documentation has been updated. Tests explicitly adjusted to use the auto-imported name to detect regressions. It's a pretty simple patch, it compiles, works, and the tests pass. Please get it in if at all possible. :) -- Jayson Vantuyl 417-207-6962 (mobile) kagato@REDACTED From kostis@REDACTED Mon May 24 10:54:21 2010 From: kostis@REDACTED (Kostis Sagonas) Date: Mon, 24 May 2010 11:54:21 +0300 Subject: Avoiding false Dialyzer warnings for NIFs In-Reply-To: References: Message-ID: <4BFA3EBD.8080903@cs.ntua.gr> Bj?rn Gustavsson wrote: > I have implemented a new erlang:nif_error/1 BIF that can > be used in the stub for NIFs to avoid false Dialyzer > warnings: > > http://github.com/bjorng/otp/commit/826c9574776ae931917e55d441ec0cfcb0acaf84 > > In a second commit, I have modified the crypto > module to use erlang:nif_error/1. > > I have run the crypto test suite, but I have not yet > verified that the false Dialyzer warnings disappear. > > Feedback welcome. Bjorn, I've verified that your patch is OK and does what you want it to as far as dialyzer is concerned. However, a slightly better addition to the type/4 function of erl_bif_types is the following: ========================================================================= type(erlang, nif_error, 1, _) -> t_unit(); % this BIF and the next one are stubs for NIFs and never return type(erlang, nif_error, 2, Xs) -> strict(arg_types(erlang, nif_error, 2), Xs, fun (_) -> t_unit() end); ========================================================================= I suggest you use it. Make sure you also add t_unit/0 at the end of the list of imported functions from erl_types (i.e., immediately after t_tuple_subtypes/1). FYI, the unit() type is an internal type somewhere between any() and none(). It's main purpose is to be used for functions that do not return e.g. because they go into a loop. However, unlike none(), this return type can be overwritten by a spec that says that the function returns some other type. Also, the strict(...) call in the second BIF will make dialyzer catch accidental wrong uses of this BIF (those where the second argument to erlang:nif_error/2 is something other than a list). Obviously, the BIF with only one argument does not need this check since the type of its argument is any(). For your fix to be complete, I suggest you also add -specs for all crypto functions that are implemented as NIFs. With this patch, these can be added directly to the crypto.erl file and dialyzer will handle them properly. Kostis From raimo+erlang-patches@REDACTED Mon May 24 12:17:05 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Mon, 24 May 2010 12:17:05 +0200 Subject: What's cooking in erlang/otp excerpt In-Reply-To: <066547BF-20ED-4EBB-8A39-187382B5B170@duomark.com> References: <20100521100012.GB9379@erix.ericsson.se> <066547BF-20ED-4EBB-8A39-187382B5B170@duomark.com> Message-ID: <20100524101705.GA9104@erix.ericsson.se> On Sat, May 22, 2010 at 10:14:12AM -0700, Jay Nelson wrote: > > > Thanks. Included in 'pu', squashed with the original into one commit, > > with whitespace fixes. > > > If possible, please base further work on the squashed commit, > > i.e 540dbcc2a1fdc59e56aaf69ea9f2b0c4b59eebe4 that you can use > > after fetching 'pu'. > > I've got the basics of git, but I always seem to have problems if I > do anything fancy. I did 'git fetch' and 'git pull upstream dev' and > then I could see 540dbcc with 'git log'. > > I believe I then should have just done 'git branch 540dbcc' but I > think at some point I deleted my branch and tried again. Eventually > I got the changes locally but when I tried to push them up, it said > there was no remote branch. > > I have since tried lots of things, eventually getting the message > "Your branch is ahead of 'origin/dev' by 276 commits" (not sure how > that happened). > > I did 'rm -rf otp' and started fresh from the instructions on the web > site to track a new branch, but I am still in the 276 commits ahead > of dev mode and I now can no longer see 540dbcc. 'git remote -v' > doesn't show 'pu' or any other branches, just origin and upstream. 'git remote -v' only shows you your remotes. You probably want 'git branch -a' or 'git branch -r'. > > Anybody have any advice how to get things back in sync? With your new repository with remotes origin and upstream where origin is your clone and upstream is erlang/opt, e.g: git fetch upstream pu git branch pu upstream/pu git checkout -b jn/gen_stream 540dbcc > > > On May 21, 2010, at 3:00 AM, Raimo Niskanen wrote: > > >* jn/gen_stream (stdlib) (2010-05-17) 1 commit > > - Add new gen_stream behaviour for efficiently consuming serial > >streams (540dbcc) > > > >This topic branch has failing test cases. > > > >stdlib_suite:app_test; > > gen_stream is not included in the stdlib.app file. > > lib/stdlib/src/stdlib.app.src => add the following line after > 'gen_server,' > gen_stream, > > > Also missing was my change to lib/stdlib/doc/src/ref_man.xml => add > the following line after '' > > > > > >shell_SUITE:start_restricted_from_shell; > > Although the whole pu branch could be guilty > > this topic branch is our prime suspect. > > The line of the failure is running rr(...) I don't really see how > gen_stream could have affected this. I may be mistaken, but it isn't > clear how the interaction could occur. > > > > >Action expected from: Topic author > > > >-- > > > >/ Raimo Niskanen, Erlang/OTP, Ericsson AB > > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Mon May 24 14:00:58 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 24 May 2010 14:00:58 +0200 Subject: Test for BIFs without type information Message-ID: Add a test case that will fail if there are any BIFs without type information: git fetch git://github.com/bjorng/otp.git bg/bif-types According to the test case, the following BIFs don't have type information: [{erlang,adler32,1}, {erlang,adler32,2}, {erlang,adler32_combine,3}, {erlang,display_string,1}, {erlang,display_nl,0}, {erlang,garbage_collect_message_area,0}, {erlang,port_call,2}, {erlang,append,2}, {erlang,subtract,2}, {erts_debug,get_internal_state,1}, {erts_debug,set_internal_state,2}, {erts_debug,display,1}, {erts_debug,dump_monitors,1}, {erts_debug,dump_links,1}, {erlang,blocking_read_file,1}, {erlang,binary_part,2}, {erlang,binary_part,3}, {binary,compile_pattern,1}, {binary,match,2}, {binary,match,3}, {binary,matches,2}, {binary,matches,3}, {binary,longest_common_prefix,1}, {binary,longest_common_suffix,1}, {binary,first,1}, {binary,last,1}, {binary,at,2}, {binary,part,2}, {binary,part,3}, {binary,bin_to_list,1}, {binary,bin_to_list,2}, {binary,bin_to_list,3}, {binary,list_to_bin,1}, {binary,copy,1}, {binary,copy,2}, {binary,referenced_byte_size,1}, {binary,encode_unsigned,1}, {binary,encode_unsigned,2}, {binary,decode_unsigned,1}, {binary,decode_unsigned,2}] -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Mon May 24 14:04:19 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 24 May 2010 14:04:19 +0200 Subject: Remove broken SAE support Message-ID: Completely remove the now broken SAE support: git fetch git://github.com/bjorng/otp.git remove-stray-sae-support -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Mon May 24 14:11:27 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 24 May 2010 14:11:27 +0200 Subject: Avoiding false Dialyzer warnings for NIFs In-Reply-To: <4BFA3EBD.8080903@cs.ntua.gr> References: <4BFA3EBD.8080903@cs.ntua.gr> Message-ID: Thanks for the feedback. 2010/5/24 Kostis Sagonas : > > ========================================================================= > type(erlang, nif_error, 1, _) -> > t_unit(); % this BIF and the next one are stubs for NIFs and never > return > type(erlang, nif_error, 2, Xs) -> > strict(arg_types(erlang, nif_error, 2), Xs, fun (_) -> t_unit() end); > ========================================================================= OK. I have incorporated your change and revised the commit message. One question, though. Does this mean that you *must* write a type spec for functions that call erlang:nif_error/1,2? > For your fix to be complete, I suggest you also add -specs for all crypto > functions that are implemented as NIFs. With this patch, these can be added > directly to the crypto.erl file and dialyzer will handle them properly. Yes, will do that in the next iteration (probably tomorrow). The (updated) branch can be fetched like this: git fetch git://github.com/bjorng/otp.git bg/nif_error -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From kostis@REDACTED Mon May 24 14:45:12 2010 From: kostis@REDACTED (Kostis Sagonas) Date: Mon, 24 May 2010 15:45:12 +0300 Subject: Avoiding false Dialyzer warnings for NIFs In-Reply-To: References: <4BFA3EBD.8080903@cs.ntua.gr> Message-ID: <4BFA74D8.1070908@cs.ntua.gr> Bj?rn Gustavsson wrote: > Thanks for the feedback. > > 2010/5/24 Kostis Sagonas : > >> ========================================================================= >> type(erlang, nif_error, 1, _) -> >> t_unit(); % this BIF and the next one are stubs for NIFs and never >> return >> type(erlang, nif_error, 2, Xs) -> >> strict(arg_types(erlang, nif_error, 2), Xs, fun (_) -> t_unit() end); >> ========================================================================= > > OK. I have incorporated your change and revised the commit message. > > One question, though. Does this mean that you *must* write a type > spec for functions that call erlang:nif_error/1,2? No, there is no such obligation. Things will work smoothly even without any specs. Still, specs are recommended because they will give type information to code that uses these NIFs. Kostis From jay@REDACTED Mon May 24 17:21:29 2010 From: jay@REDACTED (Jay Nelson) Date: Mon, 24 May 2010 08:21:29 -0700 Subject: gen_stream missing references In-Reply-To: <20100524101705.GA9104@erix.ericsson.se> References: <20100521100012.GB9379@erix.ericsson.se> <066547BF-20ED-4EBB-8A39-187382B5B170@duomark.com> <20100524101705.GA9104@erix.ericsson.se> Message-ID: <14665048-A9EB-4BA4-B9AE-6116595F90C0@duomark.com> > > With your new repository with remotes origin and upstream > where origin is your clone and upstream is erlang/opt, e.g: > > git fetch upstream pu > git branch pu upstream/pu > git checkout -b jn/gen_stream 540dbcc git fetch git://github.com/jaynel/otp.git jn/gen_stream See if you got the changes for stdlib.app.src and stdlib/doc/src/ ref_man.xml From raimo+erlang-patches@REDACTED Tue May 25 09:56:04 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Tue, 25 May 2010 09:56:04 +0200 Subject: [erlang-patches] gen_stream missing references In-Reply-To: <14665048-A9EB-4BA4-B9AE-6116595F90C0@duomark.com> References: <20100521100012.GB9379@erix.ericsson.se> <066547BF-20ED-4EBB-8A39-187382B5B170@duomark.com> <20100524101705.GA9104@erix.ericsson.se> <14665048-A9EB-4BA4-B9AE-6116595F90C0@duomark.com> Message-ID: <20100525075604.GA3716@erix.ericsson.se> On Mon, May 24, 2010 at 08:21:29AM -0700, Jay Nelson wrote: > > > >With your new repository with remotes origin and upstream > >where origin is your clone and upstream is erlang/opt, e.g: > > > > git fetch upstream pu > > git branch pu upstream/pu > > git checkout -b jn/gen_stream 540dbcc > > > > git fetch git://github.com/jaynel/otp.git jn/gen_stream Sorry, I can not find any branch jn/gen_stream in that repository. I find gen_stream with latest commit f0286fc534e3905aba9b Merge branch 'bg/compiler-cover-and-clean' into dev which indicates it is 'dev' a few days ago. I also find gen_stream_refs which seems to be 'dev' a few months ago. Have you pushed your branch jn/gen_stream to your 'origin' repository? > > See if you got the changes for stdlib.app.src and stdlib/doc/src/ > ref_man.xml > > > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Tue May 25 10:51:50 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Tue, 25 May 2010 10:51:50 +0200 Subject: [erlang-patches] patch: emacs flymake support In-Reply-To: <4BF1587B.6070408@gmail.com> References: <4BEF8A3E.5030801@krondo.com> <20100517132440.GA15726@erix.ericsson.se> <4BF1587B.6070408@gmail.com> Message-ID: <20100525085150.GA7095@erix.ericsson.se> Hi. A few doubts about your contribusion: * The added files are missing from the Makefile. Can you please fix this? * flymaker.sh is a bash script and we have Solaris 8 on our list of supported platforms, so a /bin/sh script would be more portable. This will not not stop us from accepting your contribution, but is there anything bash specific in the script? A quick readthrough only revealed some '==' tests that is portably written as '=', but I saw no essential bash features used. * Could even flymaker.sh be an escript? That might even make it work on Windows. On Mon, May 17, 2010 at 07:53:47AM -0700, Dave Peticolas wrote: > On 05/17/2010 06:24 AM, Raimo Niskanen wrote: > >On Sat, May 15, 2010 at 11:01:34PM -0700, Dave Peticolas wrote: > > > >>This patch adds (optional) support for flymake mode > >>(on-the-fly syntax checking) on Emacs, for UNIX systems. > >> > >>This work was originally submitted to the Erlware version > >>of the Emacs mode by Mats Cronqvist. > >> > >> http://github.com/jdavisp3/otp/tree/emacs-flymake > >> > >Thanks. Included in 'pu' with minor tweaks of the commit message > >and whitespace fixes. > > > >For future contributions please use the recommended > >source format e.g: > > git fetch git://github.com/jdavisp3/otp.git emacs-flymake > > > > Will do, thanks! > > dave -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From kostis@REDACTED Tue May 25 16:55:20 2010 From: kostis@REDACTED (Kostis Sagonas) Date: Tue, 25 May 2010 17:55:20 +0300 Subject: [erlang-patches] Test for BIFs without type information In-Reply-To: References: Message-ID: <4BFBE4D8.5080802@cs.ntua.gr> Bj?rn Gustavsson wrote: > Add a test case that will fail if there are any > BIFs without type information: > > git fetch git://github.com/bjorng/otp.git bg/bif-types > > According to the test case, the following BIFs don't have > type information: > > [{erlang,adler32,1}, > {erlang,adler32,2}, > {erlang,adler32_combine,3}, Types for these three functions as well as some checksum-related cleanups to the erl_bif_types.erl file appear here: http://github.com/kostis/otp/commit/4072237cb582e7412a1a8914c3c11cdf5c303808 Kostis From raimo+erlang-patches@REDACTED Wed May 26 11:21:56 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Wed, 26 May 2010 11:21:56 +0200 Subject: [erlang-patches] Test for BIFs without type information In-Reply-To: <4BFBE4D8.5080802@cs.ntua.gr> References: <4BFBE4D8.5080802@cs.ntua.gr> Message-ID: <20100526092156.GB17931@erix.ericsson.se> On Tue, May 25, 2010 at 05:55:20PM +0300, Kostis Sagonas wrote: > Bj?rn Gustavsson wrote: > >Add a test case that will fail if there are any > >BIFs without type information: > > > >git fetch git://github.com/bjorng/otp.git bg/bif-types > > > >According to the test case, the following BIFs don't have > >type information: > > > >[{erlang,adler32,1}, > > {erlang,adler32,2}, > > {erlang,adler32_combine,3}, > > Types for these three functions as well as some checksum-related > cleanups to the erl_bif_types.erl file appear here: > > http://github.com/kostis/otp/commit/4072237cb582e7412a1a8914c3c11cdf5c303808 Can you please also tell me which branch to fetch from, since it seems to be impossible to fetch from a git commit... > > Kostis > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Wed May 26 11:58:18 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Wed, 26 May 2010 11:58:18 +0200 Subject: [erlang-patches] gen_stream missing references In-Reply-To: References: <20100521100012.GB9379@erix.ericsson.se> <066547BF-20ED-4EBB-8A39-187382B5B170@duomark.com> <20100524101705.GA9104@erix.ericsson.se> <14665048-A9EB-4BA4-B9AE-6116595F90C0@duomark.com> <20100525075604.GA3716@erix.ericsson.se> Message-ID: <20100526095818.GC17931@erix.ericsson.se> On Tue, May 25, 2010 at 08:03:07AM -0700, Jay Nelson wrote: > >Have you pushed your branch jn/gen_stream to your 'origin' repository? > > > > Did a 'git push origin HEAD' and it seems to be there now. > > > git fetch git://github.com/jaynel/otp.git jn/gen_stream > Yes, thank you. Will be included in 'pu'. -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Wed May 26 13:38:40 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Wed, 26 May 2010 13:38:40 +0200 Subject: [erlang-patches] Test for BIFs without type information In-Reply-To: <20100526092156.GB17931@erix.ericsson.se> References: <4BFBE4D8.5080802@cs.ntua.gr> <20100526092156.GB17931@erix.ericsson.se> Message-ID: <20100526113840.GA26850@erix.ericsson.se> Forget it. Bj?rn will take this directly into ClearCase. On Wed, May 26, 2010 at 11:21:56AM +0200, Raimo Niskanen wrote: > On Tue, May 25, 2010 at 05:55:20PM +0300, Kostis Sagonas wrote: > > Bj?rn Gustavsson wrote: > > >Add a test case that will fail if there are any > > >BIFs without type information: > > > > > >git fetch git://github.com/bjorng/otp.git bg/bif-types > > > > > >According to the test case, the following BIFs don't have > > >type information: > > > > > >[{erlang,adler32,1}, > > > {erlang,adler32,2}, > > > {erlang,adler32_combine,3}, > > > > Types for these three functions as well as some checksum-related > > cleanups to the erl_bif_types.erl file appear here: > > > > http://github.com/kostis/otp/commit/4072237cb582e7412a1a8914c3c11cdf5c303808 > > Can you please also tell me which branch to fetch from, since > it seems to be impossible to fetch from a git commit... > > > > > Kostis > > > > ________________________________________________________________ > > erlang-patches (at) erlang.org mailing list. > > See http://www.erlang.org/faq.html > > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > > -- > > / Raimo Niskanen, Erlang/OTP, Ericsson AB > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Wed May 26 16:11:56 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Wed, 26 May 2010 16:11:56 +0200 Subject: EEP 23 implemented Message-ID: Here is a branch that implements EEP 23: git fetch git://github.com/bjorng/otp.git bg/external-funs The branch also contains other improvements having to do with external funs, such as helping Dialyzer to analyze them better. Feedback welcome. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Wed May 26 17:04:12 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Wed, 26 May 2010 17:04:12 +0200 Subject: [erlang-patches] Test for BIFs without type information In-Reply-To: <20100526113840.GA26850@erix.ericsson.se> References: <4BFBE4D8.5080802@cs.ntua.gr> <20100526092156.GB17931@erix.ericsson.se> <20100526113840.GA26850@erix.ericsson.se> Message-ID: 2010/5/26 Raimo Niskanen : > Forget it. Bj?rn will take this directly into ClearCase. That was actually another branch. Since this branch is still in 'pu', I have cherry-picked and cleaned up your commits and included them in the branch: git fetch git://github.com/bjorng/otp.git bg/bif-types -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Thu May 27 11:03:50 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Thu, 27 May 2010 11:03:50 +0200 Subject: [erlang-patches] EEP 23 implemented In-Reply-To: References: Message-ID: <20100527090350.GA3044@erix.ericsson.se> On Wed, May 26, 2010 at 04:11:56PM +0200, Bj?rn Gustavsson wrote: > Here is a branch that implements EEP 23: > > git fetch git://github.com/bjorng/otp.git bg/external-funs > Thanks, will include in 'pu'. > The branch also contains other improvements having to do with external funs, > such as helping Dialyzer to analyze them better. > > Feedback welcome. > > -- > Bj?rn Gustavsson, Erlang/OTP, Ericsson AB > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Thu May 27 11:04:26 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Thu, 27 May 2010 11:04:26 +0200 Subject: [erlang-patches] Test for BIFs without type information In-Reply-To: References: <4BFBE4D8.5080802@cs.ntua.gr> <20100526092156.GB17931@erix.ericsson.se> <20100526113840.GA26850@erix.ericsson.se> Message-ID: <20100527090426.GB3044@erix.ericsson.se> On Wed, May 26, 2010 at 05:04:12PM +0200, Bj?rn Gustavsson wrote: > 2010/5/26 Raimo Niskanen : > > Forget it. Bj?rn will take this directly into ClearCase. > > That was actually another branch. > > Since this branch is still in 'pu', I have cherry-picked and cleaned > up your commits and included them in the branch: > > git fetch git://github.com/bjorng/otp.git bg/bif-types Thanks, will be updated in 'pu'. > > -- > Bj?rn Gustavsson, Erlang/OTP, Ericsson AB > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Thu May 27 14:05:34 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Thu, 27 May 2010 14:05:34 +0200 Subject: sv/format_status-name-handling Message-ID: We are ready to graduate this branch, but I would like make one small change as described in this commit: http://github.com/bjorng/otp/commit/0b4fe326f4ae9d90c9a7a20095303f72c15d7557 Steve, is this OK? Here is the branch with the extra commit: git fetch git://github.com/bjorng/otp.git sv/format_status-name-handling -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Thu May 27 15:16:56 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Thu, 27 May 2010 15:16:56 +0200 Subject: Eliminate an ugly error report when list_to_existing_atom/1 fails in dist_utils Message-ID: git fetch git://github.com/bjorng/otp.git bg/dist_utils -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Thu May 27 16:09:27 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Thu, 27 May 2010 16:09:27 +0200 Subject: [erlang-patches] Eliminate an ugly error report when list_to_existing_atom/1 fails in dist_utils In-Reply-To: References: Message-ID: <20100527140927.GA14544@erix.ericsson.se> On Thu, May 27, 2010 at 03:16:56PM +0200, Bj?rn Gustavsson wrote: > git fetch git://github.com/bjorng/otp.git bg/dist_utils Thanks! Will be included in 'pu'. > > -- > Bj?rn Gustavsson, Erlang/OTP, Ericsson AB > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From bob@REDACTED Thu May 27 16:11:03 2010 From: bob@REDACTED (Bob Ippolito) Date: Thu, 27 May 2010 07:11:03 -0700 Subject: [erlang-bugs] R13B04 inet_res:resolve/4 inet_udp Port leak In-Reply-To: <20100527100248.GA3917@erix.ericsson.se> References: <20100526090626.GA17931@erix.ericsson.se> <20100527074354.GA5584@erix.ericsson.se> <20100527100248.GA3917@erix.ericsson.se> Message-ID: I can confirm that the first commit fixes the port leak bug. On Thu, May 27, 2010 at 3:02 AM, Raimo Niskanen wrote: > I have created a fix for these problems: > ? ?git fetch git://github.com/RaimoNiskanen/otp.git rn/resolver-leaking-ports > > It will be included in 'pu'. > > Unfortunately, the second commit eliminates the bug trigger > for what the first commit fixes. So to test if the bug fix > is fixing the bug, one should apply the first commit only. > > On Thu, May 27, 2010 at 09:43:54AM +0200, Raimo Niskanen wrote: >> On Wed, May 26, 2010 at 11:59:26AM -0700, Bob Ippolito wrote: >> > Here's the DNS packet that is being received as a response to the query: >> > >> > 1> inet_dns:decode(<<0,1,131,128,0,1,0,60,0,0,0,0,8,109,111,99,104,105,115,118,110, >> > 3,101,114,108,10,109,111,99,104,105,109,101,100,105,97,3,110, >> > 101,116,0,0,1,0,1>>). >> > {error,fmt} >> >> Thank you very much! I was about to give you detailed instructions >> about how to dig that up :-) >> >> I have spotted the problem. >> >> The DNS reply packet has got the TC (TrunCation) bit set and claims to contain >> 60 answer records, but actually contains zero. inet_dns expects to find >> 60 answer records if it says so. This is a hazy part of the >> DNS specifications and the resolver I tested truncation on did >> not do this kind of self-contradiction, but it _may_ be allowed >> by the specification... >> >> I regard it as a bug (or at least need-to-fix-problem) in inet_dns >> since it should be real-world compatible not just specification compatible. >> It should allow record shortage in a section if the TC bit is set. >> I'll try to fix it in R14A. >> >> Can you try my patch adding a missing udp_close(S) to see >> if it stops the leaking port problem? That is a more serious bug. >> >> > >> > On Wed, May 26, 2010 at 8:02 AM, Bob Ippolito wrote: >> > > Well, I'm not sure exactly which scenario is happening because I >> > > haven't looked at the packets yet, but the manual TCP retry is >> > > required. >> > > >> > > mochi@REDACTED:~$ /mochi/opt/erlang-R13B04/bin/erl >> > > Erlang R13B04 (erts-5.7.5) [source] [64-bit] [smp:8:8] [rq:8] >> > > [async-threads:4] [hipe] [kernel-poll:true] >> > > >> > > Eshell V5.7.5 ?(abort with ^G) >> > > 1> lists:filter(fun erlang:is_port/1, element(2, >> > > erlang:process_info(self(), links))). >> > > [] >> > > 2> inet_res:resolve("mochisvn.erl.mochimedia.net", in, a, []). >> > > {error,timeout} >> > > 3> lists:filter(fun erlang:is_port/1, element(2, >> > > erlang:process_info(self(), links))). >> > > [#Port<0.514>] >> > > 4> element(1, inet_res:resolve("mochisvn.erl.mochimedia.net", in, a, [usevc])). >> > > ok >> > > >> > > >> > > On Wed, May 26, 2010 at 2:06 AM, Raimo Niskanen >> > > wrote: >> > >> By reading the code it seems there is a bug when all nameservers >> > >> return an answer that causes decode errors, or can not be >> > >> contacted (enetunreach or econnrefused); then an >> > >> UDP port (or maybe two; one inet and one inet6) is leaked >> > >> since the inet_res:udp_close/1 is not called. >> > >> >> > >> This should be fixed with: >> > >> >> > >> diff --git a/lib/kernel/src/inet_res.erl b/lib/kernel/src/inet_res.erl >> > >> index 9b9e078..3d38a01 100644 >> > >> --- a/lib/kernel/src/inet_res.erl >> > >> +++ b/lib/kernel/src/inet_res.erl >> > >> @@ -592,6 +592,7 @@ query_retries(_Q, _NSs, _Timer, Retry, Retry, S) -> >> > >> ?query_retries(Q, NSs, Timer, Retry, I, S0) -> >> > >> ? ? Num = length(NSs), >> > >> ? ? if Num =:= 0 -> >> > >> + ? ? ? ? ? udp_close(S), >> > >> ? ? ? ? ? ?{error,timeout}; >> > >> ? ? ? ?true -> >> > >> ? ? ? ? ? ?case query_nss(Q, NSs, Timer, Retry, I, S0, []) of >> > >> >> > >> This "retry with TCP" trick of yours should really not be necessary >> > >> since inet_res retries with TCP if it gets a truncated UDP answer. >> > >> Have you got some other case when retrying with TCP is essential? >> > >> >> > >> Or, does your DNS server produce a (valid?) result that >> > >> triggers a debug bug in inet_res, causing the decode error, >> > >> triggering the port leak bug, forcing you to retry with TCP? >> > >> >> > >> On Tue, May 25, 2010 at 05:00:39PM -0700, Bob Ippolito wrote: >> > >>> It appears that there may be an inet_udp Port leak in >> > >>> inet_res:resolve/4, our current workaround is to spawn a new process >> > >>> to call this function. We've noticed this primarily for a service that >> > >>> regularly does a UDP DNS query that fails (because the response is too >> > >>> big) and then we retry over TCP. >> > >>> >> > >>> This is what the state of the process looked like when it was leaking ports: >> > >>> >> > >>> (node@REDACTED)1> length(lists:filter(fun erlang:is_port/1, element(2, >> > >>> erlang:process_info(whereis(dns_gen_server), links)))). >> > >>> 577 >> > >>> (node@REDACTED)2> lists:usort([erlang:port_info(P, name) || P <- >> > >>> lists:filter(fun erlang:is_port/1, element(2, >> > >>> erlang:process_info(whereis(dns_gen_server), links)))]). >> > >>> [{name,"udp_inet"}] >> > >>> >> > >>> The code looked like this, before the workaround was implemented: >> > >>> >> > >>> %% @spec dns(string()) -> [string()] >> > >>> %% @doc Return the A records (IPv4 IPs) as strings for the given Host name. >> > >>> %% ? ? This may return an empty list if there no A records for this Host name. >> > >>> dns(Host) when is_list(Host) -> >> > >>> ? ? dns(Host, fun inet_res:resolve/4). >> > >>> >> > >>> dns(Host, ResolveFun) -> >> > >>> ? ? case ResolveFun(Host, in, a, []) of >> > >>> ? ? ? ? {ok, Msg} -> >> > >>> ? ? ? ? ? ? ips_for_answers(Msg); >> > >>> ? ? ? ? {error, {nxdomain, _}} -> >> > >>> ? ? ? ? ? ? []; >> > >>> ? ? ? ? {error, timeout} -> >> > >>> ? ? ? ? ? ? %% retry with TCP >> > >>> ? ? ? ? ? ? case ResolveFun(Host, in, a, [{usevc, true}]) of >> > >>> ? ? ? ? ? ? ? ? {ok, Msg} -> >> > >>> ? ? ? ? ? ? ? ? ? ? ips_for_answers(Msg); >> > >>> ? ? ? ? ? ? ? ? {error, {nxdomain, _}} -> >> > >>> ? ? ? ? ? ? ? ? ? ? []; >> > >>> ? ? ? ? ? ? ? ? Error = {error, _} -> >> > >>> ? ? ? ? ? ? ? ? ? ? Error >> > >>> ? ? ? ? ? ? end; >> > >>> ? ? ? ? Error = {error, _} -> >> > >>> ? ? ? ? ? ? Error >> > >>> ? ? end. >> > >>> >> > >>> ips_for_answers(Msg) -> >> > >>> ? ? [inet_parse:ntoa(inet_dns:rr(Answer, data)) >> > >>> ? ? ?|| Answer <- inet_dns:msg(Msg, anlist)]. >> > >>> >> > >>> The workaround we used was to call it indirectly with this function, I >> > >>> couldn't find anything in OTP that did the same thing that didn't have >> > >>> local call optimizations. >> > >>> >> > >>> %% @spec process_apply(atom(), atom(), [term()]) -> term() >> > >>> %% @doc erlang:apply(M, F, A) in a temporary process and return the results. >> > >>> process_apply(M,F,A) -> >> > >>> ? ? %% We can't just use rpc here because there's a local call optimization. >> > >>> ? ? Parent = self(), >> > >>> ? ? Fun = fun () -> >> > >>> ? ? ? ? ? ? ? ? ? try >> > >>> ? ? ? ? ? ? ? ? ? ? ? Parent ! {self(), erlang:apply(M, F, A)} >> > >>> ? ? ? ? ? ? ? ? ? catch >> > >>> ? ? ? ? ? ? ? ? ? ? ? Class:Reason -> >> > >>> ? ? ? ? ? ? ? ? ? ? ? ? ? Stacktrace = erlang:get_stacktrace(), >> > >>> ? ? ? ? ? ? ? ? ? ? ? ? ? Parent ! {self(), Class, Reason, Stacktrace} >> > >>> ? ? ? ? ? ? ? ? ? end >> > >>> ? ? ? ? ? end, >> > >>> ? ? {Pid, Ref} = erlang:spawn_monitor(Fun), >> > >>> ? ? receive >> > >>> ? ? ? ? {Pid, Res} -> >> > >>> ? ? ? ? ? ? receive {'DOWN', Ref, process, Pid, _} -> ok end, >> > >>> ? ? ? ? ? ? Res; >> > >>> ? ? ? ? {Pid, Class, Reason, Stacktrace} -> >> > >>> ? ? ? ? ? ? receive {'DOWN', Ref, process, Pid, _} -> ok end, >> > >>> ? ? ? ? ? ? erlang:error(erlang:raise(Class, Reason, Stacktrace)); >> > >>> ? ? ? ? {'DOWN', Ref, process, Pid, Reason} -> >> > >>> ? ? ? ? ? ? erlang:exit(Reason) >> > >>> ? ? end. >> > >>> >> > >>> ________________________________________________________________ >> > >>> erlang-bugs (at) erlang.org mailing list. >> > >>> See http://www.erlang.org/faq.html >> > >>> To unsubscribe; mailto:erlang-bugs-unsubscribe@REDACTED >> > >> >> > >> -- >> > >> >> > >> / Raimo Niskanen, Erlang/OTP, Ericsson AB >> > >> >> > > >> > >> > ________________________________________________________________ >> > erlang-bugs (at) erlang.org mailing list. >> > See http://www.erlang.org/faq.html >> > To unsubscribe; mailto:erlang-bugs-unsubscribe@REDACTED >> > >> >> -- >> >> / Raimo Niskanen, Erlang/OTP, Ericsson AB >> >> ________________________________________________________________ >> erlang-bugs (at) erlang.org mailing list. >> See http://www.erlang.org/faq.html >> To unsubscribe; mailto:erlang-bugs-unsubscribe@REDACTED > > -- > > / Raimo Niskanen, Erlang/OTP, Ericsson AB > From vinoski@REDACTED Thu May 27 16:16:53 2010 From: vinoski@REDACTED (Steve Vinoski) Date: Thu, 27 May 2010 10:16:53 -0400 Subject: [erlang-patches] sv/format_status-name-handling In-Reply-To: References: Message-ID: 2010/5/27 Bj?rn Gustavsson : > We are ready to graduate this branch, but I would like make > one small change as described in this commit: > > http://github.com/bjorng/otp/commit/0b4fe326f4ae9d90c9a7a20095303f72c15d7557 > > Steve, is this OK? Yes, that looks fine. thanks, --steve From klas.johansson@REDACTED Thu May 27 23:01:20 2010 From: klas.johansson@REDACTED (Klas Johansson) Date: Thu, 27 May 2010 23:01:20 +0200 Subject: erlang-eunit: optionally run code coverage analysis during eunit tests Message-ID: Hi, This patch adds code coverage analysis support to the EUnit additions for Emacs that I contributed last year. erlang-eunit: Optionally run code coverage analysis during eunit tests Add a number of features to the emacs mode which make it easier to work with eunit test cases while keeping track of code coverage. * C-cC-ec: Compile the module under test for code coverage analysis, run tests and show the results of the coverage analysis in a new buffer. * C-c-C-ev: Compile the current module for code coverage analysis. * C-cC-ea: Show the results of the coverage analysis in a new buffer. Since Chris Bernard added some features recently [1] to erlang-eunit.el and our changes overlap a bit, I chose to base my changes on his branch. This was before his changes were merged into 'pu'. I hope that's OK. git fetch git://github.com/klajo/otp.git emacs-eunit-with-cover-from-run-current-test Cheers, Klas From klas.johansson@REDACTED Thu May 27 23:44:42 2010 From: klas.johansson@REDACTED (Klas Johansson) Date: Thu, 27 May 2010 23:44:42 +0200 Subject: [erlang-patches] patch: emacs flymake support In-Reply-To: <20100525085150.GA7095@erix.ericsson.se> References: <4BEF8A3E.5030801@krondo.com> <20100517132440.GA15726@erix.ericsson.se> <4BF1587B.6070408@gmail.com> <20100525085150.GA7095@erix.ericsson.se> Message-ID: >> >>This patch adds (optional) support for flymake mode >> >>(on-the-fly syntax checking) on Emacs, for UNIX systems. >> >> >> >>This work was originally submitted to the Erlware version >> >>of the Emacs mode by Mats Cronqvist. Hi, I took a different approach, which perhaps is of interest to someone. I'll post it here for the record. This patch is a pure elisp implementation and seems to work on linux, mac osx and windows (provided that erlc is in the path). ;; Syntax check erlang source code on the fly (integrates with flymake). ;; ;; Start using flymake with erlang by putting the following somewhere ;; in your .emacs file: ;; ;; (require 'erlang-flymake) ;; ;; Flymake is rather eager and does its syntax checks frequently by ;; default and if you are bothered by this, you might want to put the ;; following in your .emacs as well: ;; ;; (erlang-flymake-only-on-save) ;; ;; There are a couple of variables which control the compilation options: ;; * erlang-flymake-get-code-path-dirs-function ;; * erlang-flymake-get-include-dirs-function ;; * erlang-flymake-extra-opts ;; ;; This code is inspired by http://www.emacswiki.org/emacs/FlymakeErlang. There are a few differences that I've spotted. The previously posted version adds include and code paths whereas mine are by default empty (any takers? :-) ). They are configurable though. I've used this in a setting where include and code paths are stated in a special file within the application. I wrote functions which produced lists of paths based on that file. The following variables can be set to point at such functions: * erlang-flymake-get-code-path-dirs-function and * erlang-flymake-get-include-dirs-function The flags used to specify compiler warnings differ as well. There's another variable that can be used to specify the options one wants to use: * erlang-flymake-extra-opts Code here: git fetch git://github.com/klajo/otp.git erlang-flymake Cheers, Klas From dave@REDACTED Fri May 28 05:53:20 2010 From: dave@REDACTED (Dave Peticolas) Date: Thu, 27 May 2010 20:53:20 -0700 Subject: [erlang-patches] patch: emacs flymake support In-Reply-To: References: <4BEF8A3E.5030801@krondo.com> <20100517132440.GA15726@erix.ericsson.se> <4BF1587B.6070408@gmail.com> <20100525085150.GA7095@erix.ericsson.se> Message-ID: <4BFF3E30.3050205@krondo.com> On 05/27/2010 02:44 PM, Klas Johansson wrote: >>>>> This patch adds (optional) support for flymake mode >>>>> (on-the-fly syntax checking) on Emacs, for UNIX systems. >>>>> >>>>> This work was originally submitted to the Erlware version >>>>> of the Emacs mode by Mats Cronqvist. >>>>> > Hi, > > I took a different approach, which perhaps is of interest to > someone. I'll post it here for the record. This patch is a pure > elisp implementation and seems to work on linux, mac osx and > windows (provided that erlc is in the path). > > ;; Syntax check erlang source code on the fly (integrates with flymake). > ;; > ;; Start using flymake with erlang by putting the following somewhere > ;; in your .emacs file: > ;; > ;; (require 'erlang-flymake) > ;; > ;; Flymake is rather eager and does its syntax checks frequently by > ;; default and if you are bothered by this, you might want to put the > ;; following in your .emacs as well: > ;; > ;; (erlang-flymake-only-on-save) > ;; > ;; There are a couple of variables which control the compilation options: > ;; * erlang-flymake-get-code-path-dirs-function > ;; * erlang-flymake-get-include-dirs-function > ;; * erlang-flymake-extra-opts > ;; > ;; This code is inspired by http://www.emacswiki.org/emacs/FlymakeErlang. > > There are a few differences that I've spotted. The previously > posted version adds include and code paths whereas mine are by > default empty (any takers? :-) ). They are configurable though. > I've used this in a setting where include and code paths are > stated in a special file within the application. I wrote > functions which produced lists of paths based on that file. The > following variables can be set to point at such functions: > > * erlang-flymake-get-code-path-dirs-function and > * erlang-flymake-get-include-dirs-function > > The flags used to specify compiler warnings differ as well. > There's another variable that can be used to specify the options > one wants to use: > > * erlang-flymake-extra-opts > > > Code here: > > git fetch git://github.com/klajo/otp.git erlang-flymake > > An all-elisp solution seems like an improvement over the patch I sent. What do you think about providing a default implementation of the include and code path functions that assume the typical directory layouts for otp apps? That way folks who use the standard layout don't have to add anything extra to their configs. dave From kostis@REDACTED Fri May 28 13:56:31 2010 From: kostis@REDACTED (Kostis Sagonas) Date: Fri, 28 May 2010 14:56:31 +0300 Subject: tid() is not a predefined type anymore Message-ID: <4BFFAF6F.60606@cs.ntua.gr> There is a patch that removes tid() from the list of predefined types. It can be included as is provided that the 'export_type' branch is first included in OTP. Otherwise, one has to manually remove the line which reads: -export_type([tab/0, tid/0]). from file ets.erl git fetch git://github.com/kostis/otp.git ets-tid-type Kostis From raimo+erlang-patches@REDACTED Fri May 28 10:15:00 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Fri May 28 10:15:00 2010 Subject: What's cooking in erlang/otp (2010-05-28) Message-ID: <20100528134939.36D6311BC@fingolfin.du.uab.ericsson.se> R14A is planned to be released on June 16. Our internal feature freeze is June 2, and for any submission to be included in the release it must by then have been running in the 'pu' branch for a few days, without problems. You do the math. (Hint: a submission on May 31 will _not_ make it) And, of course we must have time to think about if we like the submission or not. ------------------------------------------------------------ [Graduated] * bg/wx_objects (wx) (2010-05-10) 1 commit + wx_objects: Fix calls to unexported gen_server:print_event/3 (89266f2) * cb/emacs-eunit-run-current-test (tools) (2010-04-23) 1 commit + Add Emacs EUnit utility feature: run current test function. (e946a61) * fm/file-operations (erts, kernel) (2010-05-19) 4 commits + Update preloaded modules (329aff8) + Add file:advise/4 - a wrapper to the POSIX syscall posix_fadvise (21a67b7) + Add file:datasync/1 for syncing file contents only (3f53a96) + sys.h: Correct the get_int64() macro (80b231a) * ks/cleanup-leex (parsetools) (2010-02-13) 1 commit + leex: Clean up as suggested by tidier (30d4585) * mh/erlang-mode-imenu-arity (tools) (2010-05-20) 1 commit + Let imenu distinguish functions by arity (85d5b73) * mh/erlang-mode-map-init (tools) (2010-05-20) 1 commit + Set erlang-mode-map when loading erlang.el (b3787b0) * mh/escript-erlang-mode (tools) (2010-05-18) 1 commit + Associate files using interpreter "escript" with Erlang mode (9480662) * mh/fix-record-indentation (tools) (2010-05-18) 1 commit + Fix indentation of records with line breaks inside lists (1f32cb4) * mh/inferior-erlang-cmd-uniq (tools) (2010-05-18) 1 commit + inferior-erlang: specify command to run, uniquify buffer names (2c1dca7) * se/spawn_drv_win_deadlock (erts) (2010-04-28) 1 commit + Fix deadlock in spawn driver on windows (cb42b3d) * sv/format_status-name-handling (stdlib, wx) (2010-05-09) 1 commit + handle {global, term()} names in format_status/2 (dab11bf) * sv/socket-error-portability (erts) (2010-05-19) 2 commits + inet_drv.c: Remove red herring (48d3eec) + use macro to portably test for socket system call errors (a75105b) * ta/extend-nif-api (erts) (2010-05-07) 3 commits + erl_nif: add make_atom_len, make_existing_atom_len and make_string_len (dc47b56) + erl_nif: add enif_get_atom_length and enif_get_list_length (8c8663f) + erl_nif: add enif_is_list and enif_is_tuple (08d67b9) ------------------------------------------------------------ [New topics] * bg/bif-types (erts, hipe) (2010-05-26) 5 commits - Add type info for erlang:append/2 and erlang:subtract/2 (3befddf) - Add type information for the erlang:adler32* BIFs (60f298a) - Add ppc64 return for erlang:system_info(hipe_architecture) (3580e1c) - Test that all BIFs have known types (7f9c581) - utils/make_tables: Produce bifs.lists to support testing (efcc66e) * bg/dist_utils (kernel) (2010-05-27) 1 commit - dist_utils: Eliminate crash when list_to_existing_atom/1 fails (3cb4719) * bg/external-funs (compiler, erts, otp, stdlib) (2010-05-25) 5 commits - sys_pre_expand: Help tools by rewriting external funs to internal (12f36d6) - v3_kernel: Rewrite a fun that does an external call to an external fun (e516dca) - EEP-23: Allow variables in fun M:F/A (7fa52b3) - Reference manual: Improve the documentation for external funs (67e6d15) - beam_loader: Support external funs in the literal pool (629954b) * bg/nif_error (crypto, erts, hipe) (2010-05-24) 3 commits - crypto: Add type specs for all documented functions (1c64277) - crypto: Use erlang:nif_error/1 to squelch false Dialyzer warnings (46dfebc) - Add erlang:nif_error/1,2 (031a12b) * bg/remove-stray-sae-support (erts) (2010-05-22) 2 commits - Remove unsupported erlang:blocking_read_file/1 (450aa4f) - Remove stray SAE support (6e888f0) * dgud/emacs-catch-improvements (tools) (2010-05-28) 2 commits - Improved indentation of old catch. (f50c1df) - Added more type highlighting and fixed record indentation with types. (1a78a13) * egil/call-time-trace-patterns (erts) (2010-05-25) 17 commits - Teach erlang:system_info/1 to list snifs (bcca5dd) - Add bif tests to call time trace tests (d69c204) - Teach call time trace patterns to include bifs (58b235b) - Fix BeamInstr code array in export.h (5909a84) - Add trace call_time tests for nifs and bifs (7d01c3e) - Teach call count tracing to use atomics (0e894bd) - Add first phase of trace call time test suite (1645bb2) - Add a scheduler array for BpData at BeamInstr[-4] (5843955) - Add search keys in breakpoints and a searchfunction (e88cf42) - Fix BeamInstr for call_time (84866a4) - Teach call_time trace to use intruction pointers (e84aa75) - Add return_time trace and PSD deletions (eda2e9a) . . . * jv/autoimport-binary_to_term_2 (erts, stdlib) (2010-05-22) 1 commit - Change binary_to_term/2 to be auto-imported (a62abc9) * ks/dialyzer-unresolved-types (hipe) (2010-05-27) 1 commit - dialyzer: Build the PLT even if there are unresolved remote types (6b47e15) * pa/common_test-r14_dev-1 (common_test, erts, otp, test_server, webtool) (2010-05-28) 38 commits - Fix error installing the run_test program (d247071) - Fix minor problems (8ce8e5d) - Improve documentation (467a9a4) - Update Webtool documentation (ccfb378) - Add run_test program for Common Test (ef9990e) - Documentation update (1f7f0b1) - Move 'node_start' and 'eval' terms into new 'init' term (aa95275) - Document ct_slave and 'eval' terms (849af59) - Change monitor_master option to false by default (731bdf6) - Improve eval and node_start and add new options for ct_slave (0ec2c8d) - Modify cookie handling in ct_slave (366383f) - Introduce ct_slave module (0ca4d60) . . . * rn/resolver-leaking-ports (kernel) (2010-05-27) 2 commits - Resolver: make inet_dns decode ugly truncated reply (f015f66) - Resolver: stop inet_res leaking ports (02c1f42) ------------------------------------------------------------ [Stalled] * bg/safer-local_to_univ (erts) (2010-02-11) 1 commit - erl_time_sup.c: test for error return from mktime() (0f62f0b) We will not include this branch in R13B04 for two reasons: o We are not 100% sure that this change is harmless on all platforms in all timezones. o We have an idea how the underlying problem can be fixed in the calendar module (only) and I plan to try it out after the release. We will keep this branch in pu as a reminder. Action expected from: Bj??rn Gustavsson * db/tv_nthtail_fix (tv) (2009-12-01) 1 commit - Fix for tv which restarts while trying to open a table (abe0759) Since our long-term goal is to migrate from gs towards wx, maintaining the old gs applications has a low priority for the Erlang/OTP team. Therefore, we will accept patches that seem sound, but we are unlikely to spend much of our own time fixing bugs. The author of this topic branch has found the real reason for the problem, but uncovered additional issues. Action expected from: The topic author - to decide whether to include the topic branch (which is a workaround, but does eliminate the crash) or to wait for a better fix from himself or someone else with an interest to advance the topic. * er/ei-decode_msg (erl_interface) (2010-03-11) 1 commit - Add function to decode distribution header (864091a) Needs documentation and test cases. Action expected from: Topic author * gl/jinterface-pom (jinterface, otp) (2010-02-15) 2 commits - Exclude jinterface build artifact from git (5acf5fa) - Add pom.xml for jinterface build (aa68190) The pom.xml file should be generated by the toplevel Makefile since it contains the version number of Jinterface. This is along the same line as the .app files are generated. There should be a pom.xml.src that Makefile sed's into pom.xml. See stdlib/src/Makefile. Action expected from: Topic author * jn/gen_stream (stdlib) (2010-05-24) 2 commits - Add missing references to gen_stream in stdlib XML documentation and stdlib app. (b6f2320) - Add new gen_stream behaviour for efficiently consuming serial streams (540dbcc) This topic branch has failing test cases. shell_SUITE:start_restricted_from_shell; Although the whole pu branch could be guilty this topic branch is our prime suspect. The test case does not fail when run standalone so this has to be invesigated further. Action expected from: OTP team * jp/dependencies_makefile (compiler, erts) (2010-02-14) 3 commits - squash! eliminate dialyzer warning (434e2ca) - squash! fix snprintf for Windows (bf2708d) - Add dependencies Makefile generation to erlc(1) and compile(3) (7cbc437) Approved in principle by the OTP Technical Board; now awaits a closer review of the implementation. Action expected from: Bj??rn Gustavsson (the reviewer) * kr/gs-browser (gs) (2010-02-10) 1 commit - Change lib/gs/src/tool_utils.erl to select multiple browsers other than Netscape (802d159) This topic branch introduces a new call to the deprecated regexp module. Action expected from: Topic author or anyone else with an interest to advance the topic ------------------------------------------------------------ [Cooking] * am/kernel-stops (kernel) (2010-02-21) 1 commit - Change restart behavior of network apps from permanent to transient (397343b) * am/net_kernel_catchall (kernel) (2010-02-20) 1 commit - Add catch all handle_call to net_kernel (77ee109) * bg/compiler (compiler, stdlib) (2010-03-12) 5 commits - beam_peep: Remove optimization already done by beam_dead (a3e54e8) - beam_dead: Combine is_eq_exact instructions into select_val instructions (fc8f05e) - Evaluate is_record/3 at compile-time using type information (1a23d96) - Evaluate element/2 at compile-time using type information (d4474e9) - erl_expand_records: Replace is_record() with matching (ae283f7) * bg/temp-hipe-fixes (compiler, hipe, kernel) (2010-03-15) 6 commits - Avoid crash by skipping compilation_SUITE:on_load/1 (234e13e) - Inline less aggressively for native-code compilation (9fcb48b) - Crudely fix return type for the lists:key{search,find,member}/3 (ef71597) - seq_trace_SUITE: Don't native-compile (2a81b1a) - Disable native code if on_load is used (3befa76) - andor_SUITE: Don't native-compile (97aa2da) This branch contains temporary workarounds to avoid failing test cases and is never intended to graduate. * cf/timer_tc (stdlib) (2010-04-06) 1 commit - Add timer:tc/2 to measure the elapsed time of anonymous functions (2cca650) * dp/emacs-flymake (tools) (2010-05-15) 1 commit - Add optional Emacs flymake support (for unix systems) (1c99f24) * hb/edoc (edoc) (2010-04-01) 1 commit - EDoc and Dialyzer specs and types (516e16c) * hm/reltool-find-regular (reltool) (2010-05-19) 1 commit - Improve lookup of erl files (05e0238) * jf/run_erl-disable-flow-control (erts) (2010-03-05) 1 commit - Teach run_erl RUN_ERL_DISABLE_FLOWCNTRL for disabling flow control (d0775cd) * jl/windows-file-share-delete (erts) (2010-02-22) 1 commit - Windows: Open files with FILE_SHARE_DELETE to get closer to UNIX semantics (0544a2c) * jr/cover-src-path (tools) (2010-04-23) 1 commit - Fix searching for source files in analyse_to_file/* (b9d5068) * ks/cleanups (compiler, debugger, docbuilder, gs, stdlib) (2010-04-10) 5 commits - compiler: Fix incorrect types and specs (9021667) - escript: Add more types to records (edfbc4b) - debugger: Clean up as suggested by tidier (42c0c33) - docbuilder: Clean up as suggested by tidier (c22830a) - gs: Clean up as suggested by tidier (eda4f7a) Was formerly called ks/cleanups-after-r13b04. * ks/export_type (compiler, dialyzer, hipe, kernel, stdlib, syntax_tools) (2010-05-24) 14 commits - proplists: Export the type property() (63ee35b) - erl_lint: Issue warnings for undefined exported types (bd69213) - Minor fix in a print message (f572074) - Add handling of unknown types (3df77f5) - Add declaration for exported types (7ac08e7) - Add types and specs; performed some cleanups also (84a9713) - erl_scan: Add declarations for exported types (9d62345) - stdlib: Add declarations for exported types (d7ee998) - hipe: Add declarations for exported types (a2e9943) - compiler: Add declarations for exported types (2b792f6) - syntax_tools: Add declarations for exported types (6f3f9cb) - kernel: Add declaration for exported types (0fcaf3c) . . . . . . . . . * ms/file-exclusive-mode (erts, kernel) (2010-04-30) 1 commit - Support opening files in exclusive mode (5d1253d) * sb/make-files-like-erlc (tools) (2010-05-18) 1 commit - Change make:files to behave more like erlc (5e9d051) * ta/asn1-reporting (asn1) (2010-04-23) 1 commit - asn1ct: Make formatting of errors and warnings consistent (93face2) * uw/epmd-fullnames (kernel) (2010-05-07) 1 commit - Allow the erlang nodename host part to differ from the hostname (e0774be) * uw/mnesia-overload (mnesia) (2010-05-09) 1 commit - Enable continuous monitoring of mnesia overload status (82c0904) * uw/mnesia-schema-merge (mnesia) (2010-05-09) 1 commit - Allow a user_defined function to wrap mnesia_schema:merge_schema() (3f70f3d) From raimo+erlang-patches@REDACTED Fri May 28 16:43:02 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Fri, 28 May 2010 16:43:02 +0200 Subject: [erlang-patches] erlang-eunit: optionally run code coverage analysis during eunit tests In-Reply-To: References: Message-ID: <20100528144302.GA4234@erix.ericsson.se> On Thu, May 27, 2010 at 11:01:20PM +0200, Klas Johansson wrote: > Hi, > > This patch adds code coverage analysis support to the EUnit > additions for Emacs that I contributed last year. > > erlang-eunit: Optionally run code coverage analysis during eunit tests > > Add a number of features to the emacs mode which make it easier to > work with eunit test cases while keeping track of code coverage. > > * C-cC-ec: > Compile the module under test for code coverage analysis, run tests > and show the results of the coverage analysis in a new buffer. > > * C-c-C-ev: > Compile the current module for code coverage analysis. > > * C-cC-ea: > Show the results of the coverage analysis in a new buffer. > > Since Chris Bernard added some features recently [1] to > erlang-eunit.el and our changes overlap a bit, I chose to base my > changes on his branch. This was before his changes were merged > into 'pu'. I hope that's OK. > > git fetch git://github.com/klajo/otp.git > emacs-eunit-with-cover-from-run-current-test That caused some headace. I think I made a succesful rebase onto the current 'dev'. Next time, instead of branching off 'dev' and merging from 'cb/emacs-eunit-run-current-test' (the merge causes rebase difficulties), just branch off 'cb/emacs-eunit-run-current-test' in his repository and develop on top of that branch. That branch does not exist in the git://github.com/erlang/otp.git repository but it was the parent commit to 9ac8fb78f4463a3a26b0c40c7f5f5aa90898f605 "Merge branch 'cb/emacs-eunit-run-current-test' into dev" by Chris Bernard, in this case e946a61a0a41c6592931d7cdfbb2dc618f582100 "Add Emacs EUnit utility feature: run current test function." Or, in this case since 'cb/emacs-eunit-run-current-test' was merged into 'dev', just branch off 'dev' and develop from there. But I guess when you started, 'cb/emacs-eunit-run-current-test' was not merged into 'dev', leaving you only the previous suggestion... Nevertheless. Thank you! It will be included in 'pu', but not today, it became too late... > > > Cheers, > Klas > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From vinoski@REDACTED Sun May 30 02:44:15 2010 From: vinoski@REDACTED (Steve Vinoski) Date: Sat, 29 May 2010 20:44:15 -0400 Subject: Serge's ei float patch Message-ID: This is a submission of Serge Aleynikov's ei patch that implements binary encoding for floats: git fetch git://github.com/vinoski/otp.git serge_new_float_ext Note there are two commits on this branch: 3b3bae9 and a1ae64e. One just fixes a typo in the ei_decode_ei_term documentation -- I kept that commit separate since it's independent. The other commit is Serge's original R12B-2 patch adjusted as needed for the current code base and with the addition of fixing all areas across Erlang/OTP affected by the change. The only exception is that I didn't change erl_marshal.c because it's "legacy" so I'm not sure it has to handle this new encoding or not. If anyone wants to see the exact changes for each commit, the links to the two commits are: http://github.com/vinoski/otp/commit/3b3bae9397b405ce5e782d684ed88e0442eab65e http://github.com/vinoski/otp/commit/a1ae64e5c30f89a2c6b9d1b83777a72235ffc003 --steve From serge@REDACTED Sun May 30 03:18:07 2010 From: serge@REDACTED (Serge Aleynikov) Date: Sat, 29 May 2010 21:18:07 -0400 Subject: Serge's ei float patch In-Reply-To: References: Message-ID: <4C01BCCF.9010207@aleynikov.org> Steve, Thanks for taking time to rework it for proper submission! Serge On 5/29/2010 8:44 PM, Steve Vinoski wrote: > This is a submission of Serge Aleynikov's ei patch that implements > binary encoding for floats: > > git fetch git://github.com/vinoski/otp.git serge_new_float_ext > > Note there are two commits on this branch: 3b3bae9 and a1ae64e. One > just fixes a typo in the ei_decode_ei_term documentation -- I kept > that commit separate since it's independent. The other commit is > Serge's original R12B-2 patch adjusted as needed for the current code > base and with the addition of fixing all areas across Erlang/OTP > affected by the change. The only exception is that I didn't change > erl_marshal.c because it's "legacy" so I'm not sure it has to handle > this new encoding or not. > > If anyone wants to see the exact changes for each commit, the links to > the two commits are: > > http://github.com/vinoski/otp/commit/3b3bae9397b405ce5e782d684ed88e0442eab65e > http://github.com/vinoski/otp/commit/a1ae64e5c30f89a2c6b9d1b83777a72235ffc003 > > --steve From cebernard@REDACTED Sun May 30 04:06:45 2010 From: cebernard@REDACTED (Chris Bernard) Date: Sat, 29 May 2010 22:06:45 -0400 Subject: Emacs EUnit: Run Recent Message-ID: Hi, This patch adds the ability to re-run the most recent EUnit test invocation. This is especially handy when running one test repeatedly as it eliminates the need to position point over the test just to run it again (most often point is in code under test). The default keybinding is C-c-C-el git fetch git://github.com/cebernard/otp.git emacs-eunit-run-recent There is also a second commit in this the patch which allows an optional 'autosave' feature. If the variable 'erlang-eunit-autosave' is non-nil, buffers will be automatically saved just before running tests -- the "Do you want to save?" prompt will be inhibited. This can be useful, reducing the save-compile-load-test cycle to just one keychord. Raimo, based on your suggestion to Klas, I branched this work off Klas' branch (git://github.com/klajo/otp.git emacs-eunit-with-cover- from-run-current-test -- parent commit: 940ab361) rather than branching off 'dev' and merging his changes in to my patch branch. Our changes overlap and I don't see his patch in dev yet. Hopefully this makes things easier. Cheers, Chris Bernard From bgustavsson@REDACTED Sun May 30 11:42:39 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Sun, 30 May 2010 11:42:39 +0200 Subject: EEP 23 implemented In-Reply-To: References: Message-ID: I have updated this branch: git fetch git://github.com/bjorng/otp.git bg/external-funs I have removed the attempt to help Dialyzer analyze external funs better. Instead I have documented erlang:make_fun/3. The reason is explained in this commit: http://github.com/bjorng/otp/commit/4a3bc9f9ebd31dc092dcccbfc21cdd9cca6af6c9 -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From klas.johansson@REDACTED Sun May 30 21:25:23 2010 From: klas.johansson@REDACTED (Klas Johansson) Date: Sun, 30 May 2010 21:25:23 +0200 Subject: [erlang-patches] erlang-eunit: optionally run code coverage analysis during eunit tests In-Reply-To: <20100528144302.GA4234@erix.ericsson.se> References: <20100528144302.GA4234@erix.ericsson.se> Message-ID: >> This patch adds code coverage analysis support to the EUnit >> additions for Emacs that I contributed last year. >> [...] > That caused some headace. I think I made a succesful rebase > onto the current 'dev'. Next time, instead of branching > off 'dev' and merging from 'cb/emacs-eunit-run-current-test' > (the merge causes rebase difficulties), just branch off > 'cb/emacs-eunit-run-current-test' in his repository and develop > on top of that branch. [...] Oups, that wasn't my intention. Sorry about that headache Raimo. > Or, in this case since 'cb/emacs-eunit-run-current-test' was > merged into 'dev', just branch off 'dev' and develop > from there. But I guess when you started, > 'cb/emacs-eunit-run-current-test' was not merged into 'dev', > leaving you only the previous suggestion... Yep, that was the case. > Nevertheless. Thank you! It will be included in 'pu', > but not today, it became too late... Thanks. Cheers, Klas From klas.johansson@REDACTED Sun May 30 23:05:32 2010 From: klas.johansson@REDACTED (Klas Johansson) Date: Sun, 30 May 2010 23:05:32 +0200 Subject: [erlang-patches] patch: emacs flymake support In-Reply-To: <4BFF3E30.3050205@krondo.com> References: <4BEF8A3E.5030801@krondo.com> <20100517132440.GA15726@erix.ericsson.se> <4BF1587B.6070408@gmail.com> <20100525085150.GA7095@erix.ericsson.se> <4BFF3E30.3050205@krondo.com> Message-ID: On Fri, May 28, 2010 at 5:53 AM, Dave Peticolas wrote: > On 05/27/2010 02:44 PM, Klas Johansson wrote: >>>>>> >>>>>> This patch adds (optional) support for flymake mode >>>>>> (on-the-fly syntax checking) on Emacs, for UNIX systems. >>>>>> >>>>>> This work was originally submitted to the Erlware version >>>>>> of the Emacs mode by Mats Cronqvist. >>>>>> >> >> Hi, >> >> I took a different approach, which perhaps is of interest to >> someone. ?I'll post it here for the record. ?This patch is a pure >> elisp implementation and seems to work on linux, mac osx and >> windows (provided that erlc is in the path). >> >> ? ? ;; Syntax check erlang source code on the fly (integrates with >> flymake). >> ? ? ;; >> ? ? ;; Start using flymake with erlang by putting the following somewhere >> ? ? ;; in your .emacs file: >> ? ? ;; >> ? ? ;; ? ? (require 'erlang-flymake) >> ? ? ;; >> ? ? ;; Flymake is rather eager and does its syntax checks frequently by >> ? ? ;; default and if you are bothered by this, you might want to put the >> ? ? ;; following in your .emacs as well: >> ? ? ;; >> ? ? ;; ? ? (erlang-flymake-only-on-save) >> ? ? ;; >> ? ? ;; There are a couple of variables which control the compilation >> options: >> ? ? ;; * erlang-flymake-get-code-path-dirs-function >> ? ? ;; * erlang-flymake-get-include-dirs-function >> ? ? ;; * erlang-flymake-extra-opts >> ? ? ;; >> ? ? ;; This code is inspired by >> http://www.emacswiki.org/emacs/FlymakeErlang. >> >> There are a few differences that I've spotted. ?The previously >> posted version adds include and code paths whereas mine are by >> default empty (any takers? :-) ). ?They are configurable though. >> I've used this in a setting where include and code paths are >> stated in a special file within the application. ?I wrote >> functions which produced lists of paths based on that file. ?The >> following variables can be set to point at such functions: >> >> ? * erlang-flymake-get-code-path-dirs-function and >> ? * erlang-flymake-get-include-dirs-function >> >> The flags used to specify compiler warnings differ as well. >> There's another variable that can be used to specify the options >> one wants to use: >> >> ? * erlang-flymake-extra-opts >> >> >> Code here: >> >> ? ? git fetch git://github.com/klajo/otp.git erlang-flymake >> > > An all-elisp solution seems like an improvement over the patch I sent. > > What do you think about providing a default implementation of the include > and code path functions that assume the typical directory layouts for otp > apps? > That way folks who use the standard layout don't have to add anything extra > to their > configs. > > dave Hi again, I've made a couple of additional commits: * Include erlang-flymake.el in Makefile * By default pass /include and /ebin to compiler (note, this covers only the "current" application, not all applications on the same level as in the other version, hopefully this makes the erlang-flymake more useful out-of-the-box) * Make the syntax check command configurable (i.e. now you aren't restricted to erlc, you could for example use a wrapper script instead if you want to) * Document in README Code here: git fetch git://github.com/klajo/otp.git erlang-flymake Cheers, Klas From bgustavsson@REDACTED Mon May 31 09:57:44 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 31 May 2010 09:57:44 +0200 Subject: Dialyzer warnings for gen_stream Message-ID: ./gen_stream.erl:305: gen_stream.erl:305: Invalid type specification for function gen_stream:init/1. The success typing is (#gstr_state{mod_state::'ignore' | 'undefined' | {'ok',_} | {'stop',_} | {'ok',_,_}}) -> 'ignore' | {'ok',#gstr_state{stream_type::'undefined' | {'behaviour',atom()} | {'binary',binary()} | {'file',[any()]},options::#gstr_opts{x_mfa::'undefined' | {_,_}},procs::{pid()}}} | {'stop',_} | {'ok',#gstr_state{stream_type::'undefined' | {'behaviour',atom()} | {'binary',binary()} | {'file',[any()]},options::#gstr_opts{x_mfa::'undefined' | {_,_}},procs::{pid()}},_} ./gen_stream.erl:351: gen_stream.erl:351: The specification for gen_stream:handle_call/3 states that the function might also return {'stop','normal',{'gstr_state','undefined' | {'behaviour',atom()} | {'binary',binary()} | {'file',string()},_,'end_of_stream' | {pid()},_,non_neg_integer(),atom() | non_neg_integer(),atom() | non_neg_integer(),_}} but the inferred return is {'reply',{'next_block',_} | {'pct_complete',atom() | integer()} | {'stream_pos',_} | {'stream_size',atom() | non_neg_integer()} | {'unknown_request',_},_} | {'stop','normal','stopped',_} ./gen_stream.erl:439: gen_stream.erl:439: The pattern can never match the type <_,_> ./gen_stream.erl:462: gen_stream.erl:462: The pattern can never match the type <_,_,_> ./gen_stream.erl:596: gen_stream.erl:596: The pattern <{'behaviour', Module, _ModInitArgs}, Seen, Chunk> can never match the type <'undefined' | {'behaviour',atom()} | {'binary',binary()} | {'file',string()},_,_> ./gen_stream.erl:627: gen_stream.erl:627: The pattern can never match the type <#gstr_args{stream_type::'undefined' | {'behaviour',atom()},source_size::atom() | non_neg_integer()},[integer()]> ./gen_stream.erl:631: gen_stream.erl:631: Function will never be called -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Mon May 31 11:53:28 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Mon, 31 May 2010 11:53:28 +0200 Subject: [erlang-patches] Serge's ei float patch In-Reply-To: References: Message-ID: <20100531095328.GC6170@erix.ericsson.se> On Sat, May 29, 2010 at 08:44:15PM -0400, Steve Vinoski wrote: > This is a submission of Serge Aleynikov's ei patch that implements > binary encoding for floats: > > git fetch git://github.com/vinoski/otp.git serge_new_float_ext Thank you, will be included in 'pu' as sv/serge-new_float_ext. > > Note there are two commits on this branch: 3b3bae9 and a1ae64e. One > just fixes a typo in the ei_decode_ei_term documentation -- I kept > that commit separate since it's independent. The other commit is > Serge's original R12B-2 patch adjusted as needed for the current code > base and with the addition of fixing all areas across Erlang/OTP > affected by the change. The only exception is that I didn't change > erl_marshal.c because it's "legacy" so I'm not sure it has to handle > this new encoding or not. > > If anyone wants to see the exact changes for each commit, the links to > the two commits are: > > http://github.com/vinoski/otp/commit/3b3bae9397b405ce5e782d684ed88e0442eab65e > http://github.com/vinoski/otp/commit/a1ae64e5c30f89a2c6b9d1b83777a72235ffc003 > > --steve > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Mon May 31 11:59:33 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Mon, 31 May 2010 11:59:33 +0200 Subject: [erlang-patches] Emacs EUnit: Run Recent In-Reply-To: References: Message-ID: <20100531095933.GD6170@erix.ericsson.se> On Sat, May 29, 2010 at 10:06:45PM -0400, Chris Bernard wrote: > Hi, > > This patch adds the ability to re-run the most recent EUnit test > invocation. This is especially handy when running one test repeatedly > as it eliminates the need to position point over the test just to run > it again (most often point is in code under test). > > The default keybinding is C-c-C-el > > git fetch git://github.com/cebernard/otp.git emacs-eunit-run-recent Thank you, will be included in 'pu' as cb/emacs-eunit-run-recent. > > There is also a second commit in this the patch which allows an > optional 'autosave' feature. If the variable 'erlang-eunit-autosave' > is non-nil, buffers will be automatically saved just before running > tests -- the "Do you want to save?" prompt will be inhibited. This > can be useful, reducing the save-compile-load-test cycle to just one > keychord. > > Raimo, based on your suggestion to Klas, I branched this work off > Klas' branch (git://github.com/klajo/otp.git emacs-eunit-with-cover- > from-run-current-test -- parent commit: 940ab361) rather than > branching off 'dev' and merging his changes in to my patch branch. > Our changes overlap and I don't see his patch in dev yet. Hopefully > this makes things easier. I presume so. It looks nice and clean. > > Cheers, > Chris Bernard > > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Mon May 31 12:01:26 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Mon, 31 May 2010 12:01:26 +0200 Subject: [erlang-patches] Re: EEP 23 implemented In-Reply-To: References: Message-ID: <20100531100126.GE6170@erix.ericsson.se> On Sun, May 30, 2010 at 11:42:39AM +0200, Bj?rn Gustavsson wrote: > I have updated this branch: > > git fetch git://github.com/bjorng/otp.git bg/external-funs Ok, 'pu' will be updated accordingly. > > > I have removed the attempt to help Dialyzer analyze > external funs better. Instead I have documented > erlang:make_fun/3. The reason is explained in > this commit: > > http://github.com/bjorng/otp/commit/4a3bc9f9ebd31dc092dcccbfc21cdd9cca6af6c9 > > -- > Bj?rn Gustavsson, Erlang/OTP, Ericsson AB > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From kostis@REDACTED Mon May 31 12:06:27 2010 From: kostis@REDACTED (Kostis Sagonas) Date: Mon, 31 May 2010 13:06:27 +0300 Subject: [erlang-patches] Dialyzer warnings for gen_stream In-Reply-To: References: Message-ID: <4C038A23.6040709@cs.ntua.gr> Bj?rn Gustavsson wrote: > .... > > ./gen_stream.erl:439: gen_stream.erl:439: The pattern {'gstr_state', {'behaviour', Module, _ModArgs}, _, Procs, ModState, _, > _, _, _}> can never match the type <_,_> > > .... > These dialyzer warnings are correct but some of them look a bit weird. For example, the one above should read: gen_stream.erl:439: The pattern can never match the type <_,#gstr_state{stream_type::'undefined' | {'behaviour',atom()} | {'binary',binary()} | {'file',string()},procs::'end_of_stream' | {pid()},active_proc::non_neg_integer(),source_size::atom() | non_neg_integer(),report_size::atom() | non_neg_integer()}> and this is the one I get on my version of dialyzer. Also, perhaps a detail, but I am not sure how the double: ./gen_stream.erl:439: gen_stream.erl:439: prefix gets generated. Kostis From egil@REDACTED Mon May 31 12:08:08 2010 From: egil@REDACTED (=?ISO-8859-1?Q?Bj=F6rn-Egil_Dahlberg?=) Date: Mon, 31 May 2010 12:08:08 +0200 Subject: [erlang-patches] Serge's ei float patch In-Reply-To: References: Message-ID: <4C038A88.3010002@erix.ericsson.se> This looks good but I have some concerns: - Aesthetics, coding convention: please refrain from C++ commenting. - Distribution flags, the DFLAG_NEW_FLOATS option should be enabled in lib/erl_interface/src/connect/ei_connect.c: static int send_name_or_challenge. See lib/erl_interface/src/connect/ei_connect_int.h and lib/kernel/src/dist.hrl for some details. - I think that "legacy" should include this as well. It should, unless someone can think of a reason not to include it. Anyway, with DFLAGS_NEW_FLOATS flag enabled the code would be tested as well which is a necessity in order for it to be included in the otp relase. Regards, Bj?rn-Egil Erlang/OTP On 2010-05-30 02:44, Steve Vinoski wrote: > This is a submission of Serge Aleynikov's ei patch that implements > binary encoding for floats: > > git fetch git://github.com/vinoski/otp.git serge_new_float_ext > > Note there are two commits on this branch: 3b3bae9 and a1ae64e. One > just fixes a typo in the ei_decode_ei_term documentation -- I kept > that commit separate since it's independent. The other commit is > Serge's original R12B-2 patch adjusted as needed for the current code > base and with the addition of fixing all areas across Erlang/OTP > affected by the change. The only exception is that I didn't change > erl_marshal.c because it's "legacy" so I'm not sure it has to handle > this new encoding or not. > > If anyone wants to see the exact changes for each commit, the links to > the two commits are: > > http://github.com/vinoski/otp/commit/3b3bae9397b405ce5e782d684ed88e0442eab65e > http://github.com/vinoski/otp/commit/a1ae64e5c30f89a2c6b9d1b83777a72235ffc003 > > --steve > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > From bgustavsson@REDACTED Mon May 31 12:24:03 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 31 May 2010 12:24:03 +0200 Subject: [erlang-patches] Dialyzer warnings for gen_stream In-Reply-To: <4C038A23.6040709@cs.ntua.gr> References: <4C038A23.6040709@cs.ntua.gr> Message-ID: 2010/5/31 Kostis Sagonas : > These dialyzer warnings are correct but some of them look a bit weird. It is dialyzer run based on the 'pu' branch, using an escript that formats the warnings as HTML code. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Mon May 31 13:43:24 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Mon, 31 May 2010 13:43:24 +0200 Subject: [erlang-patches] patch: emacs flymake support In-Reply-To: References: <4BEF8A3E.5030801@krondo.com> <20100517132440.GA15726@erix.ericsson.se> <4BF1587B.6070408@gmail.com> <20100525085150.GA7095@erix.ericsson.se> <4BFF3E30.3050205@krondo.com> Message-ID: <20100531114324.GA13221@erix.ericsson.se> On Sun, May 30, 2010 at 11:05:32PM +0200, Klas Johansson wrote: > On Fri, May 28, 2010 at 5:53 AM, Dave Peticolas wrote: : : > > > > An all-elisp solution seems like an improvement over the patch I sent. > > > > What do you think about providing a default implementation of the include > > and code path functions that assume the typical directory layouts for otp > > apps? > > That way folks who use the standard layout don't have to add anything extra > > to their > > configs. > > > > dave > > Hi again, > > I've made a couple of additional commits: > * Include erlang-flymake.el in Makefile > * By default pass /include and /ebin to compiler > (note, this covers only the "current" application, not all > applications on the same level as in the other version, > hopefully this makes the erlang-flymake more useful > out-of-the-box) > * Make the syntax check command configurable > (i.e. now you aren't restricted to erlc, you could for example > use a wrapper script instead if you want to) > * Document in README > > Code here: > > git fetch git://github.com/klajo/otp.git erlang-flymake Thank you, it will be included in 'pu', replacing Dave Peticolas contribution for now... > > > Cheers, > Klas > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From kostis@REDACTED Mon May 31 13:43:52 2010 From: kostis@REDACTED (Kostis Sagonas) Date: Mon, 31 May 2010 14:43:52 +0300 Subject: [erlang-patches] Dialyzer warnings for gen_stream In-Reply-To: References: <4C038A23.6040709@cs.ntua.gr> Message-ID: <4C03A0F8.7060000@cs.ntua.gr> Bj?rn Gustavsson wrote: > 2010/5/31 Kostis Sagonas : > >> These dialyzer warnings are correct but some of them look a bit weird. > > It is dialyzer run based on the 'pu' branch, using an escript > that formats the warnings as HTML code. Bjorn, The problem is that the warnings as output by the escript do not make much sense. For example, the warning: ./gen_stream.erl:439: gen_stream.erl:439: The pattern can never match the type <_,_> is problematic because the type contains two underscores, i.e. two any() Instead, the vanilla dialyzer specifies some type which indeed does not match the pattern: gen_stream.erl:439: The pattern can never match the type <_,#gstr_state{stream_type::'undefined' | {'behaviour',atom()} | {'binary',binary()} | {'file',string()},procs::'end_of_stream' | {pid()},active_proc::non_neg_integer(),source_size::atom() | non_neg_integer(),report_size::atom() | non_neg_integer()}> the stream_type is {'behaviour',Module,_ModArgs} while the type declaration of the #gstr_state{} record reads: {'behaviour',atom()} (among others). So, either the dialyzer in 'pu' or the escript needs fixing here. Kostis From bgustavsson@REDACTED Mon May 31 14:11:08 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 31 May 2010 14:11:08 +0200 Subject: [erlang-patches] Dialyzer warnings for gen_stream In-Reply-To: <4C03A0F8.7060000@cs.ntua.gr> References: <4C038A23.6040709@cs.ntua.gr> <4C03A0F8.7060000@cs.ntua.gr> Message-ID: 2010/5/31 Kostis Sagonas : > Bj?rn Gustavsson wrote: >> >> 2010/5/31 Kostis Sagonas : >> >>> These dialyzer warnings are correct but some of them look a bit weird. >> >> It is dialyzer run based on the 'pu' branch, using an escript >> that formats the warnings as HTML code. > > Bjorn, > > The problem is that the warnings as output by the escript do not make much > sense. For example, the warning: Yes, I got that. I have done some further investigation. Since the details are probably not interesting for this mailing, I'll send them in a separate email off-list. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Mon May 31 15:06:01 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 31 May 2010 15:06:01 +0200 Subject: bg/nif_error Message-ID: Further corrections: git fetch git://github.com/bjorng/otp.git bg/nif_error -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Mon May 31 16:33:51 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Mon, 31 May 2010 16:33:51 +0200 Subject: [erlang-patches] tid() is not a predefined type anymore In-Reply-To: <4BFFAF6F.60606@cs.ntua.gr> References: <4BFFAF6F.60606@cs.ntua.gr> Message-ID: <20100531143351.GA21175@erix.ericsson.se> On Fri, May 28, 2010 at 02:56:31PM +0300, Kostis Sagonas wrote: > There is a patch that removes tid() from the list of predefined types. > It can be included as is provided that the 'export_type' branch is first > included in OTP. Otherwise, one has to manually remove the line which > reads: > > -export_type([tab/0, tid/0]). > > from file ets.erl > > > git fetch git://github.com/kostis/otp.git ets-tid-type I got into merge conflicts due to the bootstrap code update and more. I will have to take this tomorrow... > > Kostis > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From vinoski@REDACTED Mon May 31 16:42:30 2010 From: vinoski@REDACTED (Steve Vinoski) Date: Mon, 31 May 2010 10:42:30 -0400 Subject: [erlang-patches] Serge's ei float patch In-Reply-To: <4C038A88.3010002@erix.ericsson.se> References: <4C038A88.3010002@erix.ericsson.se> Message-ID: 2010/5/31 Bj?rn-Egil Dahlberg : > This looks good but I have some concerns: > > ?- Aesthetics, coding convention: please refrain from C++ commenting. Oops, I didn't even notice this in the original R12B-2 patch. Will fix. > ?- Distribution flags, the DFLAG_NEW_FLOATS option should be enabled in > ? lib/erl_interface/src/connect/ei_connect.c: static int > send_name_or_challenge. > ? See lib/erl_interface/src/connect/ei_connect_int.h and > lib/kernel/src/dist.hrl for some details. Does the recv_challenge function in ei_connect.c need to verify that DFLAG_NEW_FLOATS is set in the flags, treating it as an error if not set (e.g. the same way DFLAG_EXTENDED_REFERENCES is handled)? > ?- I think that "legacy" should include this as well. It should, unless > someone can think of a reason not to include it. OK, I'll work on that. > Anyway, with DFLAGS_NEW_FLOATS flag enabled the code would be tested as well > which is a necessity in order for it to be included in the otp relase. Which tests would exercise the DFLAGS_NEW_FLOATS flag? Note that the code already submitted in this patch is definitely tested by the erl_interface ei_print suite, since tests there were failing with just the original R12B-2 patch. thanks, --steve From dave@REDACTED Mon May 31 17:12:00 2010 From: dave@REDACTED (Dave Peticolas) Date: Mon, 31 May 2010 08:12:00 -0700 Subject: [erlang-patches] patch: emacs flymake support In-Reply-To: <20100531114324.GA13221@erix.ericsson.se> References: <4BEF8A3E.5030801@krondo.com> <20100517132440.GA15726@erix.ericsson.se> <4BF1587B.6070408@gmail.com> <20100525085150.GA7095@erix.ericsson.se> <4BFF3E30.3050205@krondo.com> <20100531114324.GA13221@erix.ericsson.se> Message-ID: <4C03D1C0.6030605@krondo.com> On 05/31/2010 04:43 AM, Raimo Niskanen wrote: > On Sun, May 30, 2010 at 11:05:32PM +0200, Klas Johansson wrote: > >> On Fri, May 28, 2010 at 5:53 AM, Dave Peticolas wrote: >> > : : > >>> An all-elisp solution seems like an improvement over the patch I sent. >>> >>> What do you think about providing a default implementation of the include >>> and code path functions that assume the typical directory layouts for otp >>> apps? >>> That way folks who use the standard layout don't have to add anything extra >>> to their >>> configs. >>> >>> dave >>> >> Hi again, >> >> I've made a couple of additional commits: >> * Include erlang-flymake.el in Makefile >> * By default pass/include and/ebin to compiler >> (note, this covers only the "current" application, not all >> applications on the same level as in the other version, >> hopefully this makes the erlang-flymake more useful >> out-of-the-box) >> * Make the syntax check command configurable >> (i.e. now you aren't restricted to erlc, you could for example >> use a wrapper script instead if you want to) >> * Document in README >> >> Code here: >> >> git fetch git://github.com/klajo/otp.git erlang-flymake >> > Thank you, it will be included in 'pu', replacing Dave Peticolas > contribution for now... > > I concur, Klas's patch is better. I'll happily withdraw mine. dave From egil@REDACTED Mon May 31 17:30:39 2010 From: egil@REDACTED (=?ISO-8859-1?Q?Bj=F6rn-Egil_Dahlberg?=) Date: Mon, 31 May 2010 17:30:39 +0200 Subject: [erlang-patches] Serge's ei float patch In-Reply-To: References: <4C038A88.3010002@erix.ericsson.se> Message-ID: <4C03D61F.7030008@erix.ericsson.se> On 2010-05-31 16:42, Steve Vinoski wrote: > 2010/5/31 Bj?rn-Egil Dahlberg: >> - Distribution flags, the DFLAG_NEW_FLOATS option should be enabled in >> lib/erl_interface/src/connect/ei_connect.c: static int >> send_name_or_challenge. >> See lib/erl_interface/src/connect/ei_connect_int.h and >> lib/kernel/src/dist.hrl for some details. > > Does the recv_challenge function in ei_connect.c need to verify that > DFLAG_NEW_FLOATS is set in the flags, treating it as an error if not > set (e.g. the same way DFLAG_EXTENDED_REFERENCES is handled)? Right, need to ponder on that one. Should newer erl_interface be able to handle ancient erts? Well, it can't since encode_double will always encode with the new float. Hence yes, give them an error and let them upgrade erlang. This will be incompatible with releases before R12B. >> Anyway, with DFLAGS_NEW_FLOATS flag enabled the code would be tested as well >> which is a necessity in order for it to be included in the otp relase. > > Which tests would exercise the DFLAGS_NEW_FLOATS flag? > > Note that the code already submitted in this patch is definitely > tested by the erl_interface ei_print suite, since tests there were > failing with just the original R12B-2 patch. Perhaps that is what I saw in code coverage. I see now that for some vxworks reason the match_float is commented in the ei_encode/decode suites. It shouldn't be. Regards, Bj?rn-Egil Erlang/OTP > > thanks, > --steve > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > >