Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building docs when module compiled using +deterministic fails #1881

Open
garazdawi opened this issue Mar 25, 2024 · 4 comments
Open

Building docs when module compiled using +deterministic fails #1881

garazdawi opened this issue Mar 25, 2024 · 4 comments

Comments

@garazdawi
Copy link
Contributor

In erlang/otp#8295 I discovered that it is not possible to build documentation for Erlang (and possibly Elixir?) modules build using the +deterministic compiler flag.

When +deterministic is used, it will no longer be possible to locate the location of the source file, so I think that in such case ExDoc should not emit any links to the source code and all warnings/errors have to be emitted as best they can be.

@josevalim
Copy link
Member

Sounds good to me. Although missing the source code links would certainly be a shame.

@garazdawi
Copy link
Contributor Author

Not much that can be done about that without fixing the Erlang compiler to not strip the path from file names when compiling using +deterministic.

@josevalim
Copy link
Member

One option perhaps is to store the relative path to the file in relation to the cwd (assuming the file is inside cwd). This way it is always deterministic if you compile from the same directory (which is the most common scenario anyway).

@garazdawi
Copy link
Contributor Author

I don't recall the details on why it is done the way it is, but part of the answer is in this pr: erlang/otp#1976

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

No branches or pull requests

2 participants