- Notifications
You must be signed in to change notification settings - Fork 351
Warning based on refs #1233
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
Warning based on refs #1233
Conversation
Please do not squash the commits |
be67210
to 143c75b
Compare fcc1fb6
to b577cda
Compare I tested this branch against Elixir docs and got these warnings:
|
It is the last missing piece to be implemented |
b577cda
to f533827
Compare f8e5e3b
to c7a8e03
Compare Rebased to master. |
686fbb2
to 16939df
Compare test/ex_doc/autolink_test.exs Outdated
assert warn(~m"[an unknown task](`mix unknown.task`)") =~ | ||
"documentation references \"mix unknown.task\" but it is undefined" | ||
| ||
assert_unchanged(~m"[an unknown task](`mix unknown.task`)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a lot of these new assertions were already present in the warnings tests, could you remove the duplicates and move remaining ones to the warnings test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have moved all the warnings to its own test, regarding the non warning ones. the Elixir ones are only checked in the test named "special case links" and the Erlang ones are not checked anywhere. I would say it is better to leave them in this test
test/ex_doc/autolink_test.exs Outdated
@@ -1,5 +1,5 @@ | |||
defmodule ExDoc.AutolinkTest do | |||
use ExUnit.Case, async: true | |||
use ExUnit.Case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we test all warnings in that one test we could run it concurrently again, should we do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests do not run concurrently within the same module, regardless of the :async
option, so that wouldn't be the limitation, if that is what you mean.
Concurrency was disabled because there are two ExUnit cases that are capturing :stderr, the other one is ExDoc.CLITest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is supported on Elixir v1.11 though so let's leave the option in and push everyone to more recent Elixir versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is supported on Elixir v1.11 though so let's leave the option in and push everyone to more recent Elixir versions.
@josevalim Sorry, but what is supported in v1.11?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we test all warnings in that one test we could run it concurrently again, should we do that?
Do we really have a limitation having different tests emitting a warning since they are in the same test case , since they do not run concurrently within the same test case?
6d3f749
to 16669a1
Compare Concurrent captures of stderr. -- *José Valimhttps://dashbit.co/ <https://dashbit.co/>* |
Oh.. I was not aware of. Is this documented somewhere? I couldn't find any reference nor in the ExUnit.CaptureIO docs neither in the CHANGELOG |
Maybe it is in 1.10 then? -- *José Valimhttps://dashbit.co/ <https://dashbit.co/>* |
is this the PR? elixir-lang/elixir#9527 |
16669a1
to ec8c885
Compare Yes! |
ec8c885
to d436281
Compare d436281
to 68b71f2
Compare Sorry, I accidentally closed this, and I am unable to reopen it. Can anybody reopen it? |
Apparently I cannot reopen it either. |
I accidentally force pushed to a version that was a the same commit as master, and GitHub automatically closed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you. I added a few comments. Please also rebase with latest master.
* Fine grain when to emit warning based on Ref's visibility and kind of link (custom or regular) * Improve building of extra and custom links
All suggestions implemented. And code has been rebased to master. |
a34b496
to 3d75cc0
Compare Thanks! |
Thank you @wojtekmach for reviewing this one |
This PR spawned from #1205 tackling most of the issues addressed there.