`undefined parse transform' parse transforms which call non-existing modules

Klas Johansson <[email protected]>
Newsgroups gmane.comp.lang.erlang.bugs
Message-ID <CAH16hfb+hwf_qi6AoV9w5gWw1qpYXuwUcLo3+f1BszRYqHawsQ@mail.gmail.com>
Hi,

I noticed that a warning has been added to the compiler which says
`undefined parse transform' instead of throwing a (potentially large) parse
tree in the face of the user.  Nice!  This is the commit:

dba5396 compile: Give a friendler error message if a parse transform cannot
be found

I discovered that is has an unfortunate side-effect:

If an existing parse transform calls a non-existing module, the check will
misinterpret this and print the `undefined parse transform' error.

Tested with compiler-5.0.3 on Erlang/OTP 17.4.

Example parse transform:

-module(x).

-compile(export_all).

parse_transform(_Forms, _Opts) ->
    non:existing().



Cheers,
Klas

_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.