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

Write a message similar to 'make' when building in another dir #2642

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@corngood
Copy link
Collaborator

corngood commented Jun 4, 2015

Writes something like

cabal: Entering directory '...'

around the contents of log files for installs.

This allows stock vim (using gcc errorformat) to figure out the correct paths to diagnostics in add-source packages, when they just print src/Foo.hs:1:1: to the log.

  • Is there a way to do this without changing cabal? I couldn't find anything in the output (without -v) that would determine the working directory for a diagnostic.
  • Does it help with other editors?
  • cabal: prefix is required for the gcc.vim regex, but isn't very cabal-like. Maybe it should use a custom errorformat instead?
@dcoutts

This comment has been minimized.

Copy link
Member

dcoutts commented Jul 3, 2015

Patch itself looks fine. Anyone have any opinions on if we want this by default? It's clearly helpful for vim etc, does it add too much noise for everyone else, or useful more widely?

@23Skidoo

This comment has been minimized.

Copy link
Member

23Skidoo commented Jul 3, 2015

LGTM as well.

@corngood corngood changed the title WIP: Write a message similar to 'make' when building in another dir Write a message similar to 'make' when building in another dir Jul 3, 2015

@corngood

This comment has been minimized.

Copy link
Collaborator

corngood commented Jul 3, 2015

I've been running with it as is for a while, so I took off WIP.

@corngood corngood closed this Aug 26, 2015

@corngood corngood force-pushed the corngood:makelike_dir_messages branch from e17d147 to 7a715a1 Aug 26, 2015

@corngood corngood reopened this Aug 26, 2015

@corngood

This comment has been minimized.

Copy link
Collaborator

corngood commented Aug 26, 2015

rebased on master

@ezyang

This comment has been minimized.

Copy link
Contributor

ezyang commented Sep 24, 2015

I'm confused. Wouldn't it make more sense for this to be tied to the actual directory change? The log function is unconnected and seems easy to forget to add this message.

@corngood

This comment has been minimized.

Copy link
Collaborator

corngood commented Jan 28, 2016

Sorry, I somehow missed your comment. It's been a while since I looked at this change, but I believe the jobs are all executed asynchronously, and this is where the results are collected. I don't think the working directory is actually set anywhere (for build steps) in this process, due to concurrent builds.

Does that make sense? Was there somewhere you had in mind?

@23Skidoo

This comment has been minimized.

Copy link
Member

23Skidoo commented Jan 28, 2016

Merged in 4214572. This only changes the log files, so the noise issue is not a big deal.

@23Skidoo 23Skidoo closed this Jan 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment