Skip to content
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

Support for no_recursive and only_runtime flags. Fix print_deps #32

Merged
merged 3 commits into from
Mar 23, 2017

Conversation

bkase
Copy link
Contributor

@bkase bkase commented Mar 22, 2017

--no_recursive only makes the schemas passed in
and
--only_runtime just makes the PlankRuntime files
and
--print_deps outputs with :s separating the paths of each dependency (like the $PATH variable)

These are needed for better incremental builds with Bazel

case help = "help"

func needsArgument() -> Bool {
switch self {
case .outputDirectory: return true
case .objectiveCClassPrefix: return true
case .printDeps: return false
case .noRecursive: return false
case .onlyRuntime: return false
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you run --only_runtime by itself without any schemas specified?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

var d = dict
if let v = tuple.1 {
d[tuple.0] = v
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: strange indent

@@ -35,6 +39,8 @@ extension FlagOptions : HelpCommandOutput {
" --\(FlagOptions.objectiveCClassPrefix.rawValue) - The prefix to add to all generated class names.",
" --\(FlagOptions.outputDirectory.rawValue) - The directory where generated code will be written.",
" --\(FlagOptions.printDeps.rawValue) - Just print the path to the dependent schemas necessary to generate the schemas provided and exit.",
" --\(FlagOptions.noRecursive.rawValue) - Don't generate files recursively. Only generate the one file I ask for.",
" --\(FlagOptions.onlyRuntime.rawValue) - Only the plank generate runtime files and exit.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: ordering of words is a bit off here. Should be "Only generate runtime files and exit."

@bkase bkase changed the title Support for no_recursive and only_runtime flags Support for no_recursive and only_runtime flags. Fix print_deps Mar 22, 2017
@rahul-malik rahul-malik merged commit 9fefe3a into pinterest:master Mar 23, 2017
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