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
Cabal cleanup #5693
Cabal cleanup #5693
Conversation
Support for GHC 7.10 has been dropped.
cabal.project
Outdated
|
||
package pandoc-citeproc | ||
flags: +embed_data_files +bibutils -unicode_collation -test_citeproc -debug | ||
ghc-options: -Wall -fno-warn-unused-do-bind -Wincomplete-record-updates -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances -Wincomplete-uni-patterns -Widentities -j +RTS -A32M -RTS | ||
ghc-options: -fhide-source-paths -j +RTS -A32M -RTS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that options here get added to the ghc-options in the cabal file, rather than replacing them altogether?
I think I believed the latter, perhaps as a result of experience.
But this should be easy to test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Options were combined when I tested it (cabal-install 2.4.0.0).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if we put -fhide-source-paths
in pandoc-citeproc.cabal, we're just left with -j +RTS -A32M -RTS
. I wonder if those should also go in pandoc-citeproc.cabal?
pandoc.cabal
Outdated
@@ -182,6 +182,8 @@ extra-source-files: | |||
INSTALL.md, AUTHORS.md, README.md, | |||
CONTRIBUTING.md, BUGS, changelog, | |||
man/pandoc.1 | |||
-- Makefile | |||
Makefile | |||
-- cabal and stack build plans |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The argument against adding this is that the Makefile isn't necessary to build pandoc.
It's really just a convenience for developers, like some of the things in tools/
.
|
||
package pandoc-citeproc | ||
flags: +embed_data_files +bibutils -unicode_collation -test_citeproc -debug | ||
ghc-options: -fhide-source-paths -j +RTS -A32M -RTS | ||
ghc-options: -j +RTS -A32M -RTS | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just add -fhide-source-paths
in pandoc.cabal, conditionally on ghc version?
That would eliminate the need for an extra makefile target and a cabal.project.local.
And (I think) people could still override this default by adding -fno-hide-source-paths
in their cabal.project.local (though I haven't tested this).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was afraid that this would be too opinionated and wouldn't quite belong in a cabal file. I'll happily change it.
I realized only yesterday that cabal new-configure
overwrites cabal.project.local, which makes my approach even worse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand your thinking here -- but I think being a bit opinionated is okay if it lets us avoid some complexity.
I'm still not totally sure what I think about |
This consolidates handling of GHC options in the build. The ghc-options specified in
pandoc.cabal
are no longer repeated incabal.project
. Some options – those changing only console output – are moved tocabal.project.local
, which can be generated viamake cabal.project.local
. The make target respects theGHC_VERSION
variable, so only valid options are added.Closes: #5691