Skip to content

Conversation

@petermm
Copy link
Contributor

@petermm petermm commented Jan 25, 2026

eg:

Warning: following modules or functions are not available on AtomVM:
* Elixir.GenServer:cast/2
    in: lib/scanner.ex (stop/0)
* Elixir.GenServer:start_link/3
    in: lib/scanner.ex (start_link/1)

Fixes #67

Signed-off-by: Peter M <petermm@gmail.com>
Signed-off-by: Peter M <petermm@gmail.com>
@a-maze-d
Copy link

Yes, it does

Generated fledex_atomvm app
Warning: following modules or functions are not available on AtomVM:
* Elixir.Macro:escape/1
    in: lib/fledex_atomvm.ex (start/0)
* elixir_module:compile/6
    in: lib/fledex_atomvm.ex (start/0)

(Using them may not be supported; make sure ExAtomVM is fully updated.)

even though (at least in my case) it's not really helping too much, because it's caused by some macros (that get expanded into my app) defined in a library and not by my app. Of course it reports it in my app and I'm also not surprised it's in start/0 neither, since it's the entry point.

The change surely doesn't harm, but not sure how much it really helps :-( Probably for normal functions (i.e. not macros) it would help to figure out which function introduces the issue.

Signed-off-by: Peter M <petermm@gmail.com>
@petermm
Copy link
Contributor Author

petermm commented Jan 25, 2026

Yeah, I feared that - I've added an experimental macro tracer (or rather claude did) - can you give it a whirl?

otherwise I feel like this may not warrant that much effort, but an minimal repro could be nice to have for reference..

@a-maze-d
Copy link

Not sure this is really helpful:

Warning: following modules or functions are not available on AtomVM:
* elixir_module:compile/6
    in: lib/fledex_atomvm.ex (start/0)

Note: The following appear to come from macros defined in dependencies:
* elixir_module:compile/6
    macro in: /home/runner/work/elixir/elixir/lib/elixir/lib/kernel.ex (defmodule/2)

(Using them may not be supported; make sure ExAtomVM is fully updated.)

Signed-off-by: Peter M <petermm@gmail.com>
@a-maze-d
Copy link

I don't think it's really worth to spend too much time on it. Probably it's better to look at documenting on how to chase the issue.
In my case I took the following approach:

  • I made a search through all dependencies
  • I made some changes to the code to see which of the potentially many instances caused the issue
  • By narrowing down the instance I could start to understand what the issue was.

The deps can easily be changed, but you have to make sure that you actually recompile them. After making the changes to the dep, I played it safe (and I add an IO.puts to see that my changes are really applied):

mix clean
mix deps.compile
MIX_ENV=prod mix atomvm.packbeam

@petermm
Copy link
Contributor Author

petermm commented Jan 25, 2026

Agreed, I did make one final attempt - but pending a minimal repro, I can't do much more.. (you can also just add me to some private github repo, doesn't have to be pretty, just if I can pull it and add as dep and get the warnings..)

@a-maze-d
Copy link

I'll make the repo public anyway... now just a couple of days earlier. Let me try to do it this evening

@a-maze-d
Copy link

a-maze-d commented Jan 25, 2026

Find the repo here:
https://github.com/fled-ex/fledex_atomvm

It currently uses the fledex main branch which has the Macro.escape issues. but a PR is waiting for being submitted into main that fixes the issues: a-maze-d/fledex#121

The other issue can easily be triggered by changing the code in start/0 to (i.e. comment out the color definitions):

  def start do
    # we need to disable the color selection, because it uses
    # functions that are not available in atomvm
    use Fledex # , colors: nil

    # lets' include the CSS colors so we can skip the module name
    # import Fledex.Color.Names.CSS
    ...

@a-maze-d
Copy link

Actually while preparing the code for uploading, I felt that the warning is not soo bad :-)

Warning: following modules or functions are not available on AtomVM:
* Elixir.Macro:escape/1
    in: lib/fledex_atomvm.ex (start/0)

Note: The following appear to come from macros defined in dependencies:
* Elixir.Macro:escape/1
    macro in: deps/fledex/lib/fledex.ex (__using__/1)

(Using them may not be supported; make sure ExAtomVM is fully updated.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve not available warning with path

2 participants