forked from atomvm/AtomVM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes atomvm#1022 Signed-off-by: Peter M <[email protected]>
- Loading branch information
Showing
1 changed file
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# This file is part of AtomVM. | ||
# | ||
# Copyright 2021 Davide Bettio <[email protected]> | ||
# Copyright 2024 Davide Bettio <[email protected]> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -20,7 +20,24 @@ | |
|
||
defmodule Code do | ||
@compile {:autoload, false} | ||
@moduledoc """ | ||
This module is to satisfy certain code loading checks in Elixir, | ||
specifically with regards to protocols support. | ||
The functions are noop, and doesn't perform the actual checks, | ||
as they are not relevant on AtomVM. | ||
""" | ||
|
||
@doc """ | ||
required for protocols to work Elixir >= 1.16, due to code loading checks. | ||
""" | ||
def ensure_compiled(module) do | ||
{:module, module} | ||
end | ||
|
||
@doc """ | ||
previously required for protocols support, due to code loading checks. | ||
""" | ||
@deprecated "Use Code.ensure_compiled/1 instead" | ||
def ensure_compiled?(_) do | ||
true | ||
end | ||
|