-
-
Notifications
You must be signed in to change notification settings - Fork 323
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
Refactor embedded files #2350
base: master
Are you sure you want to change the base?
Refactor embedded files #2350
Conversation
@@ -31,9 +31,10 @@ tested-with: | |||
extra-source-files: | |||
CHANGES.md | |||
README.md |
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.
Hmm, changing the location of the man pages (from ./hledger-ui.1
to ./embeddedfiles/hledger-ui.1
) will probably cause busy work for package maintainers.
Perhaps I should just leave the files where they were.
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.
FWIW I suspect the majority of packagers get man pages from a github or hackage tarball.
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.
Or at least, I'm not too worried about this. Will look.
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.
Yes, so this changes the hackage tarball I believe.
Compare
hledger: https://hackage.haskell.org/package/hledger-1.42/src/
hledger-ui: https://hackage.haskell.org/package/hledger-ui-1.42/src/
The man pages in the hledger tarball are inside the subdirectory embeddedfiles, and so package maintainers have to find them there, while the man pages in hledger-ui are currently in the toplevel directory.
We should probably not change this setup without a good reason.
Thank you! I hope to look at this soon. |
The goal of this refactoring is to remove the symlinks from
hledger/embeddedfiles
tohledger-ui
andhledger-web
:I recently caught the Nix bug, and those symlinks across cabal projects are causing problems when trying to build hledger from inside a git repository (as mentioned in #2063, and #2044 is relevant).
This refactoring:
printHelpForTopic'
,runManForTopic'
,runInfoForTopic'
,runPagerForTopic
andrunTldrForPage'
tohledger-lib:Hledger.Utils.Docfiles
.Hledger.Web.DocFiles
tohledger-web
andHledger.UI.DocFIles to hledger-ui
, which now embed their own info/man/tldr pages directlyhledger/embeddedfiles
tohledger-ui
andhledger-web
There are still symlinks to
../../docs/utils
, also outside of the cabal project, but those are less problematic.I tested the builds both with nix and cabal. There should not be any user visible changes.