Commit Graph

8966 Commits

Author SHA1 Message Date
Stephen Morgan
103308e795 lib,cli: Store StringFormat in ReportOpts, rather than unparsed String.
StringFormat now also takes an optional overline width, which is
currently only used by defaultBalanceLineFormat.
2020-10-23 14:14:11 -07:00
Stephen Morgan
f76cdc4317 lib: Remove checkReportOpts and checkRawOpts.
checkRawOpts has been a no-op for at least four years, and
checkReportOpts only makes sure that depth_ is positive, which is taken
care of by the maybeposintopt parser.
2020-10-23 14:14:11 -07:00
TANIGUCHI Kohei
906da6e6bd Fix hledger-web description
Slashes need to be escaped or they introduce unexpected italic style
due to Haddock markup.
2020-10-22 00:33:47 -07:00
Simon Michael
291a35d8b4 ;lib: refactor 2020-10-19 09:09:38 -07:00
Simon Michael
2761324404 journal: apply commodity styles to forecasted transactions (#1371) 2020-10-19 08:59:25 -07:00
Simon Michael
831ec0dcf0 ;lib: refactor journalAddForecast 2020-10-19 08:52:00 -07:00
Simon Michael
fe5a97be81 ;ci: mac: try 8.10 to avoid no symbol warnings 2020-10-18 23:04:03 -07:00
Simon Michael
035a590227 ;ci: mac: try ghc 8.8 to fix cannot execute binary file 2020-10-18 22:57:11 -07:00
Simon Michael
f316e40657 ;ci: tweak 2020-10-18 22:55:42 -07:00
Simon Michael
a41237e487 ;ci: push: shouldn't need to restore timestamps with new stack 2020-10-18 22:49:17 -07:00
Simon Michael
8c9ca24adf ci: tweak 2020-10-18 22:45:25 -07:00
Simon Michael
b2fcdcda16 ;ci: tweak 2020-10-18 22:35:22 -07:00
Simon Michael
0457945044 ;ci: tweak 2020-10-18 22:27:36 -07:00
Simon Michael
917cbdb2fa ;ci tweak 2020-10-18 22:23:37 -07:00
Simon Michael
655ae2a9bb ;ci: tweak 2020-10-18 22:18:48 -07:00
Simon Michael
aaaa1bd5cc ;ci: tweak 2020-10-18 22:10:57 -07:00
Simon Michael
484c69f795 ;ci: work on getting latest stack on all platforms 2020-10-18 22:04:32 -07:00
Simon Michael
506d521615 ;cli: more tests for #1363 2020-10-18 21:47:01 -07:00
Stephen Morgan
5a6d38fdf2 lib: For ymd date parsing, don't consume invalid date components. 2020-10-18 21:28:46 -07:00
Stephen Morgan
97545018f4 lib: quoteIfNeeded should not escape the backslashes in unicode code points. 2020-10-18 21:08:25 -07:00
Simon Michael
08ee311875 journal: fix error when P directive has a zero price (#1373) 2020-10-18 20:48:14 -07:00
Simon Michael
4388ce72f6 ;shake: manuals: commit the defs.m4 files also 2020-10-18 16:02:35 -07:00
Simon Michael
f0db3fb157 ;update manuals 2020-10-18 16:01:59 -07:00
Simon Michael
3fb3c9c19f ;doc: journal: directives: simpler wording, not possible issue 2020-10-18 15:56:52 -07:00
Simon Michael
c35f05f6fc ;doc: journal: note that directives table should be scrolled 2020-10-18 15:56:52 -07:00
Stephen Morgan
7808aae682 lib: Remove un-necessary silencing of deprecation warning (relevant functions are no longer used) 2020-10-09 01:47:57 -07:00
Stephen Morgan
e57d911355 lib: Export OrdPlus and constructors. 2020-10-09 01:47:57 -07:00
Simon Michael
1f81730a00 balcmds: mention --no-elide's new commodity-revealing function 2020-10-05 08:57:08 -07:00
Simon Michael
80146f6143 ;web: fix yet another typo (#1362) 2020-09-30 15:55:09 -07:00
Simon Michael
0cb4bbf105
;web: fix typo (#1362) 2020-09-30 14:02:05 -07:00
Simon Michael
e66a862681 ;web: /version: use hledger-web's version, not hledger's (#1152) 2020-09-29 17:56:00 -07:00
Simon Michael
83087daa40 ;update manuals 2020-09-29 17:32:51 -07:00
Simon Michael
fd200a85af web: /version provides hledger version string as JSON (#1152) 2020-09-29 17:28:03 -07:00
Simon Michael
f2b9ac2af1 ;ui: cleanup (#1359) 2020-09-29 17:02:09 -07:00
Simon Michael
9dad59b0cc ui: E ignores file extension, should help positioning on windows 2020-09-29 16:57:14 -07:00
Simon Michael
1cd2995c77 ui: E supports positioning when EDITOR is code (VS Code) (#1359) 2020-09-29 16:54:28 -07:00
Simon Michael
66acb2c317 ;ui: refactor editFileAtPositionCommand (#1359) 2020-09-29 16:53:28 -07:00
Simon Michael
d9738dd633 gitignore 2020-09-22 15:24:37 -07:00
Simon Michael
ae1e89d4c7 tools: add hie.yaml, hls now works with hledger 2020-09-22 12:33:08 -07:00
Simon Michael
9126ae24ae ;fix failing test 2020-09-19 09:11:10 -07:00
Simon Michael
c5513ba722 ;tweak a few parse errors for clarity, consistency (#1329) 2020-09-19 08:10:39 -07:00
Simon Michael
1affcb727c ;update cabal files 2020-09-11 16:59:53 -07:00
Simon Michael
f78dc639a5 fix a slowdown with report rendering in 1.19.1 (#1350)
stripAnsi is called many times during rendering (by strWidth), so
should be fast. It was originally a regex replacement, and more
recently a custom parser. The parser was slower, particularly the one
in 1.19.1. See #1350, and this rough test:

time118ish = timeIt $ print $ length $ concat $ map (fromRight undefined . regexReplace (toRegex' "\ESC\\[([0-9]+;)*([0-9]+)?[ABCDHJKfmsu]") "") testdata
time119    = timeparser (many (takeWhile1P Nothing (/='\ESC') <|> "" <$ ansi))
time1191   = timeparser (many ("" <$ try ansi <|> pure <$> anySingle))
timeparser p = timeIt $ print $ length $ concat $ map (concat . fromJust . parseMaybe p) testdata
testdata = concat $ replicate 10000
    [ "2008-01-01 income               assets🏦checking            $1            $1"
    , "2008-06-01 gift                 assets🏦checking            $1            $2"
    , "2008-06-02 save                 assets🏦saving              $1            $3"
    , "                                assets🏦checking  ..m$-1\ESC[m\ESC[m            $2"
    , "2008-06-03 eat & shop           assets:cash           ..m$-2\ESC[m\ESC[m             0"
    , "2008-12-31 pay off              assets🏦checking  ..m$-1\ESC[m\ESC[m  ..m$-1\ESC[m\ESC[m"
    ]

ghci> time118ish
4560000
CPU time:   0.17s
ghci> time119
4560000
CPU time:   0.91s
ghci> time1191
4560000
CPU time:   2.76s

Possibly a more careful parser could beat regexReplace. Note the
latter does memoisation, which could be faster and/or could also use
more resident memory in some situations.

Ideally we would calculate all widths before adding ANSI colour codes,
so we wouldn't have to wastefully strip them.
2020-09-10 18:07:40 -07:00
Simon Michael
2d068662c1 ;make nix-view-commits 2020-09-10 18:07:40 -07:00
Simon Michael
11a63c0274 ;make quickbench: fix help 2020-09-10 18:07:40 -07:00
legrostdg
1dfc7e1116
web: Put session file in $XDG_DATA_DIR. (#1344)
* web: Put session file in $XDG_DATA_DIR.

* web: Use $XDG_CACHE_HOME instead of $XDG_DATA_HOME.

* web: Force minimum version of directory (needed for xdg utilities).

* web: Cancel changes to hledger-web.cabal

Co-authored-by: Félix Sipma <felix.sipma@no-log.org>
2020-09-10 08:37:33 -07:00
Simon Michael
8e1b5e784b ;doc: journal: redundant budget report link 2020-09-08 07:55:07 -07:00
Simon Michael
389f163427 ;install: update versions 2020-09-08 07:11:12 -07:00
Simon Michael
73de12c264 ;update changelogs 2020-09-07 16:17:58 -07:00
Simon Michael
65d603abd4 ;ci: release: try to fix over-active release creation 2020-09-07 16:13:21 -07:00