-
Notifications
You must be signed in to change notification settings - Fork 13.3k
x.py: chdir to rust root folder, so that x.py can be called from other directories #42689
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
just as a random hint, |
@bors r+ |
📌 Commit 3bb283f has been approved by |
Hm, I just noticed this chdir screws up clicking on filenames in the errors in emacs. So it's not perfect either. I will look at |
@bors r-
That's exactly the point. |
Well, but it's annoying for the directory to matter:
|
I'm against changing cwd. Most of the |
D'oh, my bad. This seems like an "obviously ok" change, but I should have solicited broader comment. |
I suggest we just close this, and @RalfJung uses |
And that target directory is the pwd? I guess I am not sure what you mean by "root aware". But, well, I can write a little wrapper script for myself. |
I use |
I didn't even know that's possible (changing the config.toml depending on the pwd) -- is this documented anywhere? Anyway, clearly |
I have my emacs "M-x compile" set up to do
~/path/to/rust/x.py build ...
, but emacs will call this from whatever directory the current file is in, which is how I noticed that the working directory does matter forx.py
. For example, after changing it, it re-downloads the bootstrap compiler, because that is stored somewhere relative.Given that cargo also makes it so that the working directory doesn't matter for the build, I felt it'd make sense to implement the same for
x.py
.