-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
A dependency on path = "."
should have a good error message
#9518
Comments
cc #9245 and #3921 (comment) |
Will probably fix #9454 too (by making it an error). |
path = "."
shuld have a good error mesegepath = "."
shuld have a good error message
path = "."
shuld have a good error messagepath = "."
should have a good error message
@rustbot claim |
Does anyone have an example of a good error message we want to show in this case? |
I don't have a good suggestion, but how does this sound: |
@Eh2406 Great, thanks! It's better than "Something went wrong" I planned to use as a placeholder :) |
This does have a good use case, it's a workaround for #2911 and works as intended as far as I've worked with it and tested it. I left a comment (#2911 (comment)) explaining why, I think, there was a misconception around it not working as intended. |
@daxpedda - OTOH, we learned recently in PyO3 that using |
Thanks for the heads up, I'm not really concerned though if tests work with |
TBH I reached the same conclusion in discussion on PyO3/pyo3#1817 Having a way to specify features which are required for |
Hi @daxpedda. You left a comment in #9702 saying that dependency on @Eh2406 Do we have a decision on whether my PR is wanted or not? cc @ehuss and @alexcrichton as they are reviewing the PR in question. |
I agree that it should eventually become an error, but currently it provides a workaround for a problem that has no other solution. Namely #2911. Until there is a solution for this problem or a different workaround, I believe this should not become a hard error. |
We were able to remove the self-dev-dependency in PyO3 by using the If |
@yerke let me start off by apologizing. You deserve a prompt and knowledgeable response from me. This response is certainly not prompt and not as thorough as I would like it to be. In the time since I posted this issue, all the context has gone out of my head. I am doing my best to reconstruct it now. For On the other hand it happens to be that with I will bring it up at the next Cargo Team meeting, and get back to you. |
@Eh2406 Thank you very much for getting back to me and explaining the context. |
I did bring it up at last week's Cargo meeting and then forgot to write the update here 🤦 , Sorry.
build.rs can set rust features, but it can not turn on optional dependencies. So this is also only a workaround. We agreed that we do want to ban this syntax, eventually. Given that the most pressing bugs so far reported is #9454 (not very pressing) and that people are using it to work around #2911 we decided to not make it a hard error at this time. This decision can and will be re evaluated when better alternatives are available or we find more pressing bugs. @yerke your PR is significantly more robust then the code I had in mind. Thank you for your contribution! When we ban this behavior, it will be based on your code. I am sorry I was slow and confusing in my communications, and that I left |
In a package
foo
a[dev-dependencies] foo = { path = "." }
should be an error.As there is no use case for it, and it does not do what most people expect.
There are not many people that will try this, and there are few configurations that don't error already. So I don't think we need to get too fancy with the comparison. A check for a path
"."
would be a big step foreword.The text was updated successfully, but these errors were encountered: