Skip to content

Store current_dir in Cfg#3859

Merged
djc merged 6 commits intomasterfrom
cfg-current-dir
Jun 5, 2024
Merged

Store current_dir in Cfg#3859
djc merged 6 commits intomasterfrom
cfg-current-dir

Conversation

@djc
Copy link
Copy Markdown
Contributor

@djc djc commented Jun 4, 2024

Stores the current_dir in Cfg to avoid having to pass it into a number of its methods. Eventually I think we can use this to completely get rid of utils::current_dir() and Process::current_dir() in favor of passing down the current_dir from the original main() in rustup-init.rs, but that last step is triggering some weird stuff that needs more investigation.

@djc djc requested a review from rami3l June 4, 2024 21:56
Copy link
Copy Markdown
Member

@rami3l rami3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks legit, as long as this doesn't make certain tests harder to perform :)

Eventually I think we can use this to completely get rid of utils::current_dir() and Process::current_dir() in favor of passing down the current_dir from the original main() in rustup-init.rs, but that last step is triggering some weird stuff that needs more investigation.

Would you mind sharing more info regarding this point?

@rami3l rami3l added this to the 1.28.0 milestone Jun 5, 2024
@djc djc added this pull request to the merge queue Jun 5, 2024
@djc
Copy link
Copy Markdown
Contributor Author

djc commented Jun 5, 2024

If I make all of the changes to remove those functions, I get stack overflows from a whole bunch of tests.

Merged via the queue into master with commit 84495dc Jun 5, 2024
@djc djc deleted the cfg-current-dir branch June 5, 2024 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants