You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today is not my day! I was trying to create a test case for another bug and I bumped into this ICE:
fnfoo() -> (int,int){(0,return(0,0))}fnmain(){}
I don't think this is a useful pattern (the original involved a try! which I had simplified to return just for the sake of bug reproduction --- with try! it doesn't ICE) but it probably shouldn't ICE.
The text was updated successfully, but these errors were encountered:
Fix inconsistent cwd of `run` and `debug` command in client
Fixrust-lang#17012. Also related to rust-lang#13022 and rust-lang#15993.
When the `kind` of runnable is `bin`, Cargo would use the workspace root as the cwd for the `run` command; otherwise, Cargo defaults to the package root as the cwd for `run`.
Initially, r-a assumed the workspace root as the cwd for all runnables in `debug` command, which led to issue rust-lang#13022. In this case, during unit testing, the `run` command would use the package root while `debug` would use the workspace root, causing inconsistency.
PR rust-lang#15993 addressed this problem by using the package root as the cwd for `debug` command. However, it also resulted in an inconsistency: when executing the `run` command within the main fn of a package (whose target is `bin`), Cargo would use the workspace root, whereas `debug` would use the package root, leading to issue rust-lang#17012.
The preferable approach is to determine the cwd based on the runnable's type. To resolve this, this PR introduces a new `cwd` field within `CargoRunnable`, allowing r-a to decide the appropriate cwd depending on the specific kind of the runnable.
Today is not my day! I was trying to create a test case for another bug and I bumped into this ICE:
I don't think this is a useful pattern (the original involved a
try!
which I had simplified toreturn
just for the sake of bug reproduction --- withtry!
it doesn't ICE) but it probably shouldn't ICE.The text was updated successfully, but these errors were encountered: