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

Add a configuration file and a quiet mode #490

Merged
2 commits merged into from
Feb 7, 2018
Merged

Conversation

ghost
Copy link

@ghost ghost commented Feb 6, 2018

Once we don't stop at the first error, the output becomes messy. This PR adds display modes:

  • quiet: only print errors
  • progress: interactive display showing the number of rules processed so far and the number of parallel jobs running. This is the new default
  • short: current default
  • verbose: same as current --verbose

The display mode can be selected via the --display command line argument, or via the configuration file ~/.config/dune/config.

TODO:

  • Document display modes in the manual
  • Document the configuration file in the manual

fiber)
(Fiber.fork_and_join_unit
(fun () -> go_rec t)
(fun () -> fiber))
Copy link
Member

Choose a reason for hiding this comment

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

Previously, this change was simply omitted, right? I assume this is just for perf.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it was a mistake. This showed up after this patch as sometimes the status line wasn't cleaned up at the end

include Jbuilder.Scheduler

let go ?log ~common fiber =
Scheduler.go ?log ~config:common.config fiber
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should just initialize the log here from ~common. I think that's what we always do anywhere.

Copy link
Author

Choose a reason for hiding this comment

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

indeed, although I think there is a case where we call the scheduler twice

Copy link
Member

@rgrinberg rgrinberg left a comment

Choose a reason for hiding this comment

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

Seems to work well for me and the new output is definitely an improvement. Other candidates for this config file are things like the diff cmd.

@rgrinberg
Copy link
Member

Also it would be nice to enumerate the display options in --help as well. It's a bit of overkill to view the manual just for this.

@ghost
Copy link
Author

ghost commented Feb 7, 2018

Seems to work well for me and the new output is definitely an improvement. Other candidates for this config file are things like the diff cmd.

Indeed. We could also allow to customize the status line:

(status_line "foo: ${todo}, jobs: ${jobs}")

One things I'm going to add straight after that is:

(jobs 20)

Also it would be nice to enumerate the display options in --help as well. It's a bit of overkill to view the manual just for this.

indeed

@ghost
Copy link
Author

ghost commented Feb 7, 2018

I added the doc. I was finding that the man page was getting big, so I added jbuilder help config. I haven't updated the manual yet, though I find it painful to document things twice...

@ghost ghost merged commit 0570e09 into master Feb 7, 2018
@ghost ghost deleted the config-file-and-quiet-mode branch February 7, 2018 14:47
This pull request was closed.
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.

1 participant