-
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
Improve error message when there's a colon in the project directory name #3736
Comments
IIRC a colon is an illegal character in a path on Windows, but we probably shouldn't fail like this on Unix. |
Would it be worth promoting this issue as beginner-friendly ? |
Ah no unfortunately I don't think this'll be easy to fix, all we can really do is probably provide a better error message :( |
As there hasn't been any activity here in over 6 months I've marked this as stale and if no further activity happens for 7 days I will close it. I'm a bot so this may be in error! If this issue should remain open, could someone (the author, a team member, or any interested party) please comment to that effect? The team would be especially grateful if such a comment included details such as:
Thank you for contributing! (The cargo team is currently evaluating the use of Stale bot, and using #6035 as the tracking issue to gather feedback.) If you're reading this comment from the distant future, fear not if this was closed automatically. If you believe it's still an issue please leave a comment and a team member can reopen this issue. Opening a new issue is also acceptable! |
As I didn't see any updates in 30 days I'm going to close this. Please see the previous comment for more information! |
I just ran into this issue: |
I can reopen, adding a better error message probably shouldn't be too difficult. |
This is a massive problem for me while building openSUSE packages, because our project names always include a colon. See building of python-maturin package: maturin-0.11.2@kusansky$ env|grep LIB
PERL5LIB=/home/matej/.local/share/perl5
LIBVIRT_DEFAULT_URI=qemu:///system
RUBYLIB=/home/matej/.gem/local
maturin-0.11.2@kusansky$ pwd
/home/matej/build/devel:languages:python/python-maturin/maturin-0.11.2
maturin-0.11.2@kusansky$ cargo build
error: failed to join search paths together
Does $LD_LIBRARY_PATH have an unterminated quote character?
Caused by:
failed to join path array: ["/home/matej/build/devel:languages:python/python-maturin/maturin-0.11.2/target/debug/deps", "/usr/lib"]
Caused by:
path segment contains separator `:`
maturin-0.11.2@kusansky$ I don’t think I do anything illegal Unix-wise, but And yes, technically, I could build Rust packages in specifically non-colon-using directories, but it seems like me working around a broken tool. |
Just wanted to mention that I also encountered this error on macOS. (which is an UNIX) And I would like Cargo to warn for it when you call |
Here are some steps to resolve part of this issue from
In addition, these error messages could be collapsed into one message, like:
|
What we wanted to emphasize here is that |
@mcepl, you're absolutely correct. However, Cargo still cannot join paths that contain
What I proposed doesn't devalue your needs. Just a warning to tell people “paths containing such characters might not be built for now” for general cases. I am not sure whether there is a workaround for your situation 😞. Could you share how you solve it these days? |
Poorly. |
@rustbot claim |
I should have time to add a better error message over the next couple of weeks. |
Steps to reproduce:
cargo new bla
mv bla "bla:"
cd "bla:"
cargo test --verbose
Error:
As LD_LIBRARY_PATH is a Unix thingy, I don't know if it is reproducible in Windows ;-)
Meta:
The text was updated successfully, but these errors were encountered: