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

Fixed new haddock 2.2 - resolves partly https://github.com/haskell/cabal/issues/5232 #5269

Closed
wants to merge 3 commits into from

Conversation

cartazio
Copy link
Contributor

attempt at fixing #5232

Please include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • If the change is docs-only, [ci skip] is used to avoid triggering the build bots.

Please also shortly describe how you tested your change. Bonus points for added tests!

@cartazio cartazio changed the base branch from master to 2.2 April 17, 2018 23:09
@cartazio
Copy link
Contributor Author

woops, initially based it on master rather than 2.2 for the PR, fixed that

@cartazio cartazio requested review from alexbiehl and hvr April 17, 2018 23:10
@cartazio
Copy link
Contributor Author

@hvr @alexbiehl @gbaz the more precise fix is also needed, but I also dont know how to wire up the warning logging to the usual output....

even this PR alone should fix up the main main issue in 2.2 cabal-install ... though the more polished one is needed to...

how do we get this IN and released?

@cartazio
Copy link
Contributor Author

@23Skidoo thoughts?

@alexbiehl
Copy link
Member

Sorry for the late reply. I think this is an OK way to go. Cabal doesn't give us too many opportunities to hook into error handling. But: I think we should really reuse error reporting from the hard failing one to have consistent look of error messages.

@cartazio
Copy link
Contributor Author

cartazio commented May 30, 2018 via email

]
where
handler :: Exception e => e -> IO ()
handler except= do putStr system ; putStrLn (show except)
Copy link
Member

Choose a reason for hiding this comment

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

Should use warn instead of putStr[Ln].

@23Skidoo
Copy link
Member

23Skidoo commented Jun 9, 2018

But: I think we should really reuse error reporting from the hard failing one to have consistent look of error messages.

See Distribution.Client.ProjectOrchestration.dieOnBuildFailures.

@cartazio
Copy link
Contributor Author

cartazio commented Jun 9, 2018 via email

@cartazio
Copy link
Contributor Author

so action items i'm gonna update this for today

  1. dont run haddock when a package is empty

  2. move to using warn

@23Skidoo hrmm, beyond adding warn, how do you propose i use/adapt the dieOnBuildFailures to this case?

@cartazio
Copy link
Contributor Author

ok, i pushed some partially done changes,
I added to the haddock exports a "compute input files " function,
though i'm not sure how i get the arguments i need for it in the ProjectBuilding.hs file

haddockInputFilesFromLibrary :: Verbosity
            -> LocalBuildInfo
            -> ComponentLocalBuildInfo
            -> Library
            -> IO [FilePath]
haddockInputFilesFromLibrary  verbosity lbi clbi lib =
  map snd `fmap` getLibSourceFiles verbosity lbi lib clbi

@typedrat
Copy link
Collaborator

Superseded by #5459.

@typedrat typedrat closed this Jul 27, 2018
@typedrat typedrat moved this from In Progress to Done in Have new-build become build (GSOC2018) Jul 27, 2018
@hvr hvr deleted the fixed-new-haddock-2.2 branch August 8, 2018 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants