-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[driver] Add -working-directory option #14746
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
Merged
+388
−117
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd prefer to make this a field on the Compilation object. It's of a similar provenance to the other things stored there and it looks like you're having to thread it through lots of calls that already take a Compilation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh fun. I was following the example of
OutputFileMap
,OutputInfo
andToolChain
. Now that I look more carefully atCompilation
, I see we have fields for all three of those (and they appear to me to be the same objects), so I don't know why we also thread them through every call too. I'm happy to move working dir into Compilation assuming @jrose-apple agrees.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love it because it seems like something that's only used while building up the Compilation, and not something you need once it's fully-built and ready to, well, compile things. But maybe that distinction's only in my head.
(Originally, none of the three things you mentioned were in Compilation. They've all migrated there because of batch mode, which needs to construct jobs "late".)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The OutputFileMap held in the compilation is a derived one (holding all the aux and intermediates in a compilation), whereas the one being passed around as args here is an input. This is a somewhat recent development and perhaps not ideal, but they're not the same object.
The ToolChain and OutputInfo args are the same as those being threaded around though, it's true; I guess we can just pull them out of Compilation now (they're new arrivals).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, ok. On matters of taste here I'm happy to defer to @jrose-apple, passed-as-an-arg it is!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll admit I don't love another argument being passed around either. I'm just not sure Compilation is the place to put it. And Ben doesn't have to be the one to clean this up.