summaryrefslogtreecommitdiff
path: root/lib/elixir/lib
Commit message (Collapse)AuthorAgeFilesLines
* FIXUPal/access-guardsAndrea Leopardi2018-05-111-7/+7
|
* Improve guards in Kernel.*_in (Access-related) functionsAndrea Leopardi2018-05-111-7/+7
|
* Polish docs around Access and Access-related functions in KernelAndrea Leopardi2018-05-112-45/+83
|
* Consider if definition should be checked for @implGlauber Campinho2018-05-101-69/+53
| | | | | | Fixes #7617 Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
* Doc String functions that accept compiled patterns (#7665)Fernando Tapia Rico2018-05-101-16/+37
|
* No longer make DynamicSupervisor sup_flags opaque, closes #7666José Valim2018-05-101-7/+8
|
* Fixed `Supervisor.child_spec/2` param name used in docs (#7657)David Sulc2018-05-081-2/+2
| | | The second arg is now `overrides`, not `config`.
* Add helpful error message for improperly formatted type definitions (#7650)Devon Estes2018-05-071-2/+22
| | | | | | | | | | | | | The original issue (#7647) was posted in a very specific context, but I figured that this implementation would both address that issue as well as provide helpful feedback if someone were to attempt to write types with variables incorrectly in general, since that was what was being raised here. I've also added more tests to ensure that we're catching all these cases. All the allowed cases were already covered extensively in tests, so we're good on that front. Resolves #7647
* Improve docs for DynamicSupervisor.count_children, closes #7656José Valim2018-05-071-1/+1
|
* Count children restarting on exit in DynamicSupervisor max_childrenJosé Valim2018-05-071-12/+10
| | | | Closes #7655
* Fix link to Kernel.elem/2 (#7654)Marian Bäuerle2018-05-071-1/+1
|
* Condititionally compile and lazily compute __STACKTRACE__ (#7648)José Valim2018-05-075-79/+35
| | | | | | | | | | | | | | | | Erlang/OTP 20 warns if the stacktrace is read outside of a catch/rescue. This commit mirrors this behaviour by consistently warning on `System.stacktrace/0` being used outside of a catch/rescue. Erlang/OTP 21 warns whenever System.stacktrace/:erlang.get_stacktrace are used. Therefore we need to promote the usage of `__STACKTRACE__` and make sure to conditionally compile it according to the OTP version. This requires changes to the Exception normalization mechanism so we compute `__STACKTRACE__` only when strictly required. In future Elixir releases, `System.stacktrace/0` will warn when used even inside catch/rescue.
* Document Process.monitor/1 behavior for already dead processes (#7652)David Sulc2018-05-071-0/+3
| | | | This information is provided in the Registry documentation (see https://hexdocs.pm/elixir/Registry.html#module-registrations), but was missing here.
* Optimize Keyword.merge/2 for empty listsJosé Valim2018-05-061-0/+5
|
* Optimize Enum.to_list/1 for mapsJosé Valim2018-05-061-7/+4
|
* Move stdlib deprecations to `@deprecated` attribute (#7637)José Valim2018-05-0321-60/+210
|
* Improving wording on String.splitter docs (#7636)Bas Dirks2018-05-021-2/+2
|
* Pass tracker destination forward to dynamicly defined modulesJosé Valim2018-05-022-19/+10
|
* keys and values of decoded query are always binary (#7635)Peter Saxton2018-05-021-1/+1
|
* Support infinity timeout on yield_many, closes #7633José Valim2018-05-021-2/+6
|
* Improve test names and regroup assertions in Inspect.BitStringTestAleksei Magusev2018-05-011-2/+0
|
* Update page list in Kernel (#7632)Eksperimental2018-05-011-1/+5
|
* Deprecate Exception.normalize/2 and Exception.format/2 (#7628)Henning L2018-05-011-2/+3
|
* Remove throw/catch pattern for Keyword.delete/2 and friends (#7622)Andrew Bennett2018-04-301-23/+41
| | | | | | | | | This prevents stacktrace corruption. Additionally short-circuit with `lists:keymember` for cases where the key to delete is not in the list. It seems to be a relatively common case and adds comparatively little overhead. Benchmarks: https://gist.github.com/potatosalad/f4fea8490bea09eb000a3a346a52cb6e
* Optimise String.ends_with?/2 (#7593)Michał Muskała2018-04-301-12/+13
| | | | | The new implementation is 10-70 times faster on the benchmark data. Full benchmark: https://gist.github.com/michalmuskala/74ebb0456c8cfbfe8e012ce4aae2b6e5
* Optimise String.starts_with?/2 (#7592)Michał Muskała2018-04-301-5/+17
| | | | | The new implementation is 10x to 150x faster on the benchmark data. The full benchmark: https://gist.github.com/michalmuskala/b8dea400a9902356f5bc53c201161a05
* Use binary_part/3 instead of :binary.part/3Michał Muskała2018-04-302-2/+2
| | | | | binary_part is a guard BIF and is slightly more efficient to use then :binary.part which does a fully qualified external call.
* Provide more examples on how to improve the formatter outputJosé Valim2018-04-291-41/+95
|
* Standardize use of Erlang, OTP and Erlang/OTP names (#7618)Eksperimental2018-04-285-8/+8
| | | | | | | | | | | | | | | | | | | This touches only messages directed to the end user, so comments are ignored. This is important, specially for newcomers, who may be confused by the interchangeable use of Erlang and OTP. The expressions used consistenly across the documentation are: - Erlang/OTP version - Erlang/OTP 20+ - Erlang/OTP release, - Erlang/OTP documentation - Erlang process - Erlang project - Erlang's error logger - Erlang log message - OTP application - OTP behaviour
* Leave blank line before closing comment if idented (#7609)Eksperimental2018-04-2811-0/+18
| | | | | | | | | If last line in the docs is idented, leave an emptyline before closing the comment. Mentioned by @whatyouhide in https://github.com/elixir-lang/elixir/pull/7606#discussion_r184348514 The command/regexp used to find these offending lines is: ag "\ {4,}[^\n]+\n\s{2}[\"']{3}"
* Allow multiple DynamicSupervisors to be started easily (#7594)Lee Marlow2018-04-261-1/+8
|
* Consider the owner process may be deadJosé Valim2018-04-263-5/+6
|
* Include endianness in the regex version (#7600)José Valim2018-04-261-5/+5
| | | | This addresses issues with precompiled archives on different endianness, such as: https://github.com/hexpm/hex/issues/469
* Mention in the docs every function inlined by the compilereksperimental2018-04-265-21/+35
| | | | | | | elixir_rewrite.erl has been audited, function by function: - All missing "Inlined by the compiler." lines have been added. - Standardize sentence avoid mentioning the function its inline to (System module). - "Inline by the compiler." goes always before ##Options or ##Examples
* Fix an "unused variable" warning in the String module (#7603)Fernando Tapia Rico2018-04-251-1/+1
|
* Fix typespec for DynamicSupervisor.init/1 (#7596)Bryan Paxton2018-04-251-1/+1
|
* Mention that Map.merge/2 is "Inlined by the compiler" (#7598)Eksperimental2018-04-251-0/+2
|
* Improve String.printable?/2 (#7580)Eksperimental2018-04-251-19/+29
| | | | | | | | | * Improve specs to reflect that when limit is 0, it will return true, and mention this in the docs. * Remove unecessary spec for arity 1 * Add guards so it will fail when wrong types are given * Rename arg "limit" and "counter" to "character_limit" * Mention "character_limit" in function summary
* Do not release missing structs in the compilerJosé Valim2018-04-242-5/+19
|
* Do not depend on Supervisor.start_childJosé Valim2018-04-241-1/+5
|
* Fix typespec for DynamicSupervisor.on_start_child (#7590)Lasse Skindstad Ebert2018-04-241-1/+4
|
* Clarify behavior of strategies regarding the restart option (#7589)David Sulc2018-04-241-1/+5
|
* Add informations about `Code.compile_string/2` insecurities (#7587)Łukasz Jan Niemier2018-04-241-0/+6
| | | As it can execute any code.
* Use descriptive argument name in Kernel.Utils.raise/1 (#7588)Eksperimental2018-04-241-2/+2
|
* Fix typo in code formatter (#7582)Bas Dirks2018-04-221-1/+1
|
* Use timeout() typespec in Supervisor (#7579)Eksperimental2018-04-221-1/+1
|
* Add __STACKTRACE__/0 to Naming Conventions page (#7578)Eksperimental2018-04-221-1/+1
| | | Additionally sort special forms alphabetically.
* Make clear Process.alive? is for local node only (#7572)Julius Beckmann2018-04-201-2/+2
|
* Fix typespecs for named records (#7569)Glauber Campinho2018-04-201-10/+10
| | | Closes #7530
* Talk about not using processes for organizationJosé Valim2018-04-201-52/+92
|