-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Extend LLBuildManifestWriter to let shell commands specify environment and initial working directory #3332
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
Extend LLBuildManifestWriter to let shell commands specify environment and initial working directory #3332
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,6 +134,16 @@ public final class ManifestToolStream { | |
stream <<< " \(key): " <<< Format.asJSON(newValue) <<< "\n" | ||
} | ||
} | ||
|
||
public subscript(key: String) -> [String: String] { | ||
get { fatalError() } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would it be better to use a func instead of subscript so we don't have this potential runtime issue? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree in general but figured it was better to stay with the existing approach for this PR, i.e. the cognitive cost of something completely different for this one case would be more than the benefit. Seems to me that we should redo all of these at some point. |
||
set { | ||
stream <<< " \(key):\n" | ||
for (key, value) in newValue.sorted(by: { $0.key < $1.key }) { | ||
stream <<< " " <<< Format.asJSON(key) <<< ": " <<< Format.asJSON(value) <<< "\n" | ||
} | ||
} | ||
} | ||
} | ||
|
||
extension Format { | ||
|
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.
nit: environ -> environment (more swifty)
Uh oh!
There was an error while loading. Please reload this page.
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.
Agreed. I was trying to follow the style of "args" above. I could change this but would probably also want to change '
args
etc. Let's do that in a follow-up where we can clean them all up.