Skip to content

Conversation

@dmitrykleymenov
Copy link
Contributor

According to #14519

iex> my_function = fn x, y -> x + y end
iex> my_function.(42)
my_function = fn x, y -> x + y end
Copy link
Contributor Author

@dmitrykleymenov dmitrykleymenov May 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the message there is a dynamic info on the first line, so we can't doctest

This is typically raised by functions in the `Code` module, for example:
iex> Code.require_file("missing_file.exs")
Code.require_file("missing_file.exs")
Copy link
Contributor Author

@dmitrykleymenov dmitrykleymenov May 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the message there is an absolute path to the file, I've tried to make an absolute path like /missing_file.exs, but windows server runs failed(expected d:/file.exs instead of /file.exs), so it can't be doctested too

For example:
1 = y
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know how to correctly doctest CompileError, if it's possible

@josevalim josevalim merged commit b4bcc3b into elixir-lang:main May 23, 2025
13 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

Nezteb pushed a commit to Nezteb/elixir that referenced this pull request Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants