Skip to content

Print out more information about the effective configuration when you build #3945

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

Closed
ezyang opened this issue Oct 6, 2016 · 7 comments
Closed

Comments

@ezyang
Copy link
Contributor

ezyang commented Oct 6, 2016

I have a lot of Cabal projects set to all different versions of GHC, and I often forget if I've specified a constraint on GHC in cabal.project.local. In fact, there isn't an easy way to tell what version we're building with at all. It would be nice if new-build printed out some diagnostic info stating basic information in this regard.

Should it output all information that could be in cabal.project.local? No, I think that is too much. I think we should simply output enough information so you can tell which build profile (ala #3343) you are building into. That's probably what users actually care about. So specifically, here's what they want to know:

  • What version of GHC are they building with?
  • What optimization level are they building with?
  • (Eventually) what build profile is "active"
  • (Maybe) what architecture we are building for (this is always "obvious" so maybe we don't have to output it.)

So, when I run cabal new-build, I should see something like:

ezyang@sabre:~/Dev/cabal-shake$ cabal new-build -O0 cabal
Build profile:
  with-compiler: ghc-8.0.1
  optimization: False
Resolving dependencies...
In order, the following will be built (use -v for more details):
 - Cabal-1.25.0.0 (lib) (cannot read state cache)
 - hackage-security-0.5.2.2 (lib) (cannot read state cache)
 - cabal-install-1.25.0.0 (exe:cabal) (cannot read state cache)

What you will learn. You'll learn how new-build projects are configured, and the frontend code which drives the overall new-build process.

@alexeyzab
Copy link

Hi there! Is this issue still relevant? If so, would any of the maintainers be interested in providing some mentorship/general help on resolving this so that the newcomers and first-time contributors would have an easier time?

I would like to add this as one of the issues for the upcoming Haskell Weekly's Call for Participation section. See discussion in #75.

These are the guidelines we'd like to stick to in the future:

  • Ensure that your project has at least one open-source licence. (we've decided to not define the term "open-source" and it is left to your own interpretation).
  • Ensure that the issue tracker for your project is publicly accessible.
  • Create a new issue in your issue tracker and clearly describe the task. Also mention the difficulty level (easy/medium/hard/tedious), either as a tag/label or somewhere in the title/description.
  • If you have specific requirements for contributors (e.g., copyright waiver), it must be mentioned in the description of the task (preferably with a link to CONTRIBUTING.md).

Thank you!

@23Skidoo
Copy link
Member

23Skidoo commented Jul 8, 2017

Yes, it's still relevant, and we can help with mentoring.

@hvr
Copy link
Member

hvr commented Jul 8, 2017

Minor bikeshedding suggestion to @ezyang's description: please try to use a more compact output; ideally all extra information would fit into a single line.

@ezyang
Copy link
Contributor Author

ezyang commented Jul 12, 2017

Hi @alexeyzab, yes it is! I'd be happy to mentor. I think the other bullet points are handled.

@fgaz
Copy link
Member

fgaz commented Jul 20, 2017

Is this fixed with #4605?

@23Skidoo
Copy link
Member

I'm closing this as fixed; @ezyang - if you think that there is something more to do here, feel free to reopen.

@ezyang
Copy link
Contributor Author

ezyang commented Jul 21, 2017

Nope, I'm very pleased. Thank you @amir!

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