Commit Graph
48 Commits
Author SHA1 Message Date
José Valim bcf747f080 Add code comments about async purging 2024-03-30 18:30:22 +01:00
José Valim 38a571b73a Purge modules asynchronously (#13350) 2024-02-15 20:33:31 +01:00
José Valim 04e2724591 Do not purge compiler modules during compilation, only after (#13346)
The compiler freezing is mostly caused by a bug upstream,
but it may be speed up compilation to avoid purging as
we compile, as purging blocks the code server.

A potential downside is higher memory usage during
compilation.

Closes #13264.
2024-02-15 12:48:53 +01:00
José Valim 9dd1c3210c Remove unused compilation_status code 2020-02-29 11:46:18 +01:00
José Valim 37e9ddd6e5 Use infinity timeout in internal services 2019-11-27 11:17:09 +01:00
José Valim a0017f73cf Use read-only naming for Module operations 2019-08-09 16:11:16 +02:00
Aleksei Matiushkin 70b2968ce9 Make Module.open?/1 and family to match their docs (#9278)
* Make Module.open?/1 and family to match their docs.

* Cosmetics.

* Introduced internal not_closing state for modules.

It’s stored in a separate ETS and the last field of #elixir_code_server state to minimize impact.

* Use the same ETS for the state.
2019-08-09 15:43:43 +02:00
José Valim 737bd24128 Store each compiler option directly in elixir_config, closes #9208 2019-07-18 17:13:10 +02:00
José Valim 1a9d6fb550 Simplify acquiring lock on Code.require_file 2019-03-14 21:55:46 +01:00
José Valim c015323f15 Add Code.purge_compiler_modules/0
Closes #7047
2018-06-20 20:51:05 +02:00
José Valim 882e7b8af4 Share Bag and Set tables across a module functionality
Previously we kept a Set table for attributes and a Bag table
for function definitions and clauses. This led to suboptimal
usage of ets tables.

With this commit, we start using both Bag and Set tables
to store function/macro definition information. In the next
commits we will continue generalizing the tables, storing
specs, docs and accumulated attributes in the Bag and keep
the remaining functionality in Set.
2018-03-20 10:30:37 +01:00
José Valim e622a8aeaf Replace Code.load_file/2 by Code.compile_file/2 (#7201)
Currently there is no way to compile a file without leaving
footprints on the system. Plus, the term load_file/2 is very
confusing as loaded is the notation used by modules.

This commit focuses the whole loaded aspect of files exclusively
on require_file/2 (and renames two functions accordingly) and
introduces compile_file/2 which is semantically simpler than
load_file/2.
2018-01-13 22:04:22 +01:00
José Valim f3af2cc350 Serialize lookups to avoid race in tests 2016-11-03 13:45:33 +01:00
eksperimental 685e87bdf0 Formmating: Add white space around vertical bar (#4507) 2016-04-25 00:55:49 +02:00
José Valim 1fff515255 Move code server and compiler away from ord* 2015-10-19 12:19:15 +02:00
José Valim 56688d09ec Remove readd_paths 2015-04-02 18:07:54 +02:00
eksperimental f9bcdd5c1c Add space after comma: Format consistently 2015-03-17 22:55:27 +07:00
José Valim 8475ab813b Merge pull request #2801 from fishcakez/app_env
Move application state out of application env
Conflicts:
	lib/elixir/lib/uri.ex
	lib/iex/lib/iex/server.ex
2015-01-24 14:07:46 +01:00
José Valim 5341bfc150 Fix bootstrap issues 2014-12-23 22:26:04 +01:00
José Valim cbd9d83adc Ensure compilation does not leave random spurious data on failure
Prior to this patch, the parallel compiler could leave spurious
processes and the module definition could leave stale data
in the elixir_modules table.

The issue has been fixed by emitting the proper exit signals
and by using monitors.
2014-11-21 17:40:06 +01:00
José Valim 54b95c426e Add comments to code:ensure_loaded/1 snippets 2014-07-08 11:28:24 +02:00
James Fish efc1f4a1ef Fix unmatched returns dialyzer warnings 2014-07-04 02:45:16 +01:00
José Valim 705d217641 Ensure mix preserves -pa and -pz given to the command line 2014-07-02 17:30:20 +02:00
José Valim 56f15d9f4e Do not add spaces after { and before }
This makes the source code consistent with the result
returned by inspect/2.
2014-04-21 19:06:35 +02:00
José Valim 5f682023a6 Deprecate usage of @behavior in favor of @behaviour 2014-01-28 11:21:55 +01:00
José Valim cba7c5bd80 Only expand __ENV__.call if it is a known function 2014-01-03 22:39:48 +01:00
José Valim 83c93beaa6 Get rid of environment macro counter in favor of a global one 2013-12-30 11:45:23 +01:00
José Valim 219ded1b91 Rename DispatchTracker to LocalsTracker 2013-12-22 09:20:41 +01:00
Samuel Tonini 427e5ed712 use a separat compilation status per parallel compilation 2013-11-03 16:52:56 +01:00
José Valim 5bd12f9cb9 Move lexical tracker to scope 2013-11-01 16:03:12 +01:00
José Valim 3c151d5357 Add Kernel.LexicalTracker 2013-11-01 16:03:12 +01:00
José Valim 1d8e39a2df Only change compilation status if warnings_as_errors 2013-06-15 09:46:10 +02:00
José Valim 21db352039 Always print warnings to stderr 2013-06-15 09:32:53 +02:00
Geoffrey Clements 93d5128db3 Implement José's suggestions.
1. Detect all places in elixir_errors:handle_file_warning/3 where we
output something with io
2. Change those places to go through an internal function that will
call elixir_compiler:get_opt and figure out if we should print to
stdout or stderr and act accordingly
3. In the same function above, whenever we print a warning as an error,
we should store somewhere that a warning as an error happened. I
recommend storing that in the elixir_code_server gen server
4. Provide a Code.compilation_status that would return it
2013-06-09 07:49:38 -04:00
José Valim 3137bfc614 Move bootstrap code for IEx to IEx.CLI 2013-01-29 12:30:09 -07:00
José Valim ba528f0f92 Add default timeout to elixir_code_server and unify all call points 2013-01-27 11:48:27 -07:00
José Valim a061528731 Ensure IEx runs only after Elixir's CLI process its options 2012-11-30 17:07:12 +01:00
Yurii Rashkovskii b8d16dae6f elixir_code_server should not trap exits and should not log on terminate 2012-11-28 18:51:42 -08:00
José Valim 956773ee7e Make ExUnit exit happen in two steps.
This allows developers to hook custom mechanisms
after the tests are run but before the system halts.
2012-11-28 11:57:38 +01:00
José Valim 401ad781c3 Ensure debug_info is actually set to true 2012-11-28 09:48:04 +01:00
José Valim e801cbd380 Convert integer to a list in order to generate the module name 2012-11-16 09:50:13 +01:00
José Valim ad37d5f67a No need for lists:concat 2012-11-15 16:56:29 +01:00
José Valim 40efeb48d7 Reduce atom footprint when compiling code
Previously, we were generating atom names based on
the file or the module name. This commit replaces
it by a pool of atom names. After a module name
is used and purged with success, it is added back
to the pool so it can be reused many times.
2012-11-15 16:44:27 +01:00
José Valim 0632e01f44 Use references instead of relying on file names 2012-10-01 23:39:40 -07:00
José Valim 2a94699d79 Allow files to be unloaded 2012-08-21 10:37:31 -03:00
José Valim cd6aedc8f2 Code.require_file blocks until file is available 2012-08-20 18:14:41 -03:00
José Valim c186bb19df Add d to print docs in IEx console, compile by default with docs 2012-07-16 15:29:29 +02:00
José Valim d5031b6347 Move all code to erlang style apps 2012-07-05 20:20:16 +02:00