Commit Graph

3389 Commits

Author SHA1 Message Date
Simon Michael
298a9c29b4 ;dev: Query comments 2024-01-21 00:57:30 -10:00
Simon Michael
352b0bc1b5 ;doc: update manuals 2024-01-12 13:52:11 -10:00
Simon Michael
9ccc1d3fa5 fix:add,import,web: really avoid filenames ending with . on Windows [#1056]
On MS Windows, trying to add or import or web add to a file whose name
ends with a dot could cause data loss, so in 2019 I made this raise an
error instead (in Hledger.Read.ensureJournalFileExists).

But, the logic was backward, so it did not do the check on Windows.
Now it does.

Also I have removed mention of this from add's doc; currently it's
not documented anywhere. It's obscure, but maybe this is not ideal.
2024-01-04 17:35:22 -10:00
Simon Michael
a0922a3866 ;cabal: update cabal files 2024-01-04 08:25:13 -10:00
Simon Michael
2a99b3d456 imp: stack: build with ghc 9.8, latest stackage nightly 2024-01-04 08:24:50 -10:00
Simon Michael
1648d2bcb7 fix:check:tags: also ignore builtin modified, _modified tags [#2148]
These tags are generated by --auto.
2024-01-04 05:55:24 -10:00
Simon Michael
6d455e765c ;doc:changelogs: cleanup 2024-01-03 20:43:39 -10:00
Simon Michael
5b1281fc69 ;doc: update changelogs 2024-01-03 20:42:28 -10:00
Simon Michael
ea34562b4b ;doc: changelogs 2024-01-03 20:42:04 -10:00
Simon Michael
0a838bdd6c ;doc:changelogs: cleanup for easier merge 2024-01-03 20:41:36 -10:00
Simon Michael
1128927632 ;doc:changelogs: whitespace 2023-12-30 20:29:49 -10:00
Simon Michael
8b45d4ba8c fix:csv: fix %FIELD interpolation in assignments using \n [#2134]
In field assignment values we now parse %FIELD references, \MATCHGROUP references
and "\n" newline markers more carefully, so all can coexist.
Parsing these values might be slower than before, but hopefully not noticeably so.
2023-12-23 19:25:34 -10:00
Simon Michael
20c299684b dev:csv: clarify renderTemplate [#2134] 2023-12-23 19:25:22 -10:00
Simon Michael
8f6b7b202e fix: traceOrLog and a rare warning from valuation code
Hledger.Utils.Debug.traceOrLog was logging when it should trace and vice versa.

This affected a warning which Hledger.Data.Valuation.pricesShortestPath
should display if encountering a pathologically long (>1000) price chain.
Also note some oddities about that warning.
2023-12-23 19:22:33 -10:00
Simon Michael
42c7383f57 ;dev:Hledger.Utils.Parse: cleanup 2023-12-23 19:22:33 -10:00
Simon Michael
4b7e7f77bd ;dev:Hledger.Utils.Debug: haddockify some comments so they show in hover 2023-12-23 19:22:33 -10:00
Simon Michael
9c56ed1104 imp!:web:tests: respect options when running tests
The hledger-web tests have been cleaned up and now allow more testing
of command line options like (though still not everything).

Note tests now run the app listening on its default host and port,
127.0.0.1 and 5000, instead of "any IPv4 or IPv6 hostname" and 3000.
This would seem to mean hledger-web tests can conflict more with
things running on port 5000, eg a normal hledger-web instance, but I
haven't been able to reproduce it.
2023-12-15 09:57:01 -10:00
Simon Michael
fbd2fdef40 ;cabal: update cabal files 2023-12-14 08:58:02 -10:00
Simon Michael
a3290bfaeb pkg: allow megaparsec 9.6* 2023-12-14 08:57:42 -10:00
Simon Michael
aaf4a38161 fix:timedot: accept numbers beginning with a decimal point again [#2130] 2023-12-08 15:08:35 -10:00
Simon Michael
51224f6e27 fix: bal --budget --layout=tall was hiding commodity symbols
When reports want to render amounts without commmodity symbols,
they must now use AmountDisplayOpts' new displayCommodity flag.
(Previously it was a side effect of setting displayCommodityOrder.)
2023-12-08 05:52:29 -10:00
Simon Michael
0bc86c95e4 lib: Hledger.Data.Amount: noPrice -> noCost 2023-12-07 23:35:50 -10:00
Simon Michael
862b7e5712 dev: clarify AmountDisplayOpts, add a new flag for symbol display 2023-12-07 23:35:50 -10:00
Simon Michael
9bad34c341 ;doc: changelogs 2023-12-07 11:36:39 -10:00
Simon Michael
7ace5ee560 ;doc: changelogs for 1.32.1 2023-12-07 11:32:20 -10:00
Simon Michael
c062b14c5d imp: auto-declare builtin tag names like type: and t: (#2119)
Now using type: in account declarations or generating t: with timedot
letters won't cause the `tags` check to fail.

If a user declares any of these explicitly with a tag directive,
it does not cause an error.
2023-12-07 08:55:05 -10:00
Simon Michael
6ae64c8f3e imp: allow declaring the empty payee name with "" (#2119) 2023-12-07 08:30:55 -10:00
Simon Michael
6a41ed9e64 imp: drop the "a difference of ..." line from balance assertion errors
Rationale:
To satisfy the recentassertions check I'm often filling in a bunch of
placeholder balance assertions, copy/pasting the correct amount from
the balance assertion failure messages. In this situation the
difference just repeats the amount in the line above, with opposite
sign, which makes it harder for me to interpret the message and to
copy-paste the right amount. And more generally I think showing the
difference isn't really necessary.
2023-12-07 07:58:52 -10:00
Simon Michael
c6a580ff3b fix:import: save each file's latest dates, separately (#2125) 2023-12-07 03:41:31 -10:00
Simon Michael
d1635a55f8 lib: move readFileStrictly to Hledger.Utils.IO 2023-12-07 03:41:31 -10:00
Simon Michael
7899b992b7 fix: prevent a Glob/filemanip package conflict in IO.hs 2023-12-05 17:43:04 -10:00
Simon Michael
ab313c49c7 ;cabal: update cabal files 2023-12-02 09:09:07 -10:00
Simon Michael
80d1da2db9 ;pkg: bump version to 1.32.99 2023-12-02 09:09:07 -10:00
Simon Michael
26f56e0a13 ;doc: changelogs: merge edits from release branch 2023-12-02 09:06:53 -10:00
Simon Michael
e90483a75a ;doc: update manuals 2023-12-01 17:25:00 -10:00
Simon Michael
71222d75e5 ;doc: changelogs: edit 2023-12-01 17:23:31 -10:00
Simon Michael
0b4b4ed70c ;doc: draft changelogs from commit messages (Shake changelogs) 2023-12-01 17:23:31 -10:00
Simon Michael
b6a46f637f feat:timedot: tagged time logging with letters 2023-11-25 21:28:23 -10:00
Simon Michael
96f9c1d2b2 ;dev: lotcostp: cleanup 2023-11-23 09:14:54 -10:00
Simon Michael
b4a6212453 imp:ledger-compat: accept lot costs with spaces after {, like Ledger 2023-11-23 08:31:57 -10:00
Simon Michael
4b13af0634 imp:print:beancount: conversion improvements
- omit balance assertions
- replace more currency symbols, and match within symbols like C$
- do more account validation, and error if conversion is too hard
- backslash-escape double quotes and backslashes in payee and note
2023-11-23 01:47:15 -10:00
Simon Michael
0b8e920810 imp:print:beancount: also convert cost amounts 2023-11-22 23:54:10 -10:00
Simon Michael
0bf0c30b8d doc: update manuals 2023-11-22 22:57:55 -10:00
Simon Michael
a8062381dd ;cabal: update cabal files 2023-11-22 22:57:36 -10:00
Simon Michael
e2cc2d7e24 feat:print: add a basic beancount output format
This prints journal output more likely (but not guaranteed) to
be readable by Beancount.

All packages now require text 1.2.4.1 or greater.
2023-11-22 22:57:36 -10:00
Simon Michael
1744021986 fix: non-print-like reports no longer add trailing decimal marks (fix #2115)
That 1.31 change was advertised as being for the print command only,
but it affected all commands. Now it affects only print and other
"print-like" commands (ie all commands that show whole journal entries
that we might want to re-parse).

Also three classes of hledger output, and how they modify the
commodity display styles' digit group marks and decimal marks
to suit different consumers, have been identified and documented
(under REPORTING CONCEPTS).
2023-11-22 14:22:51 -10:00
Simon Michael
2b18715885 fix:csv: fix tag: queries on CSV data (#2114) 2023-11-20 21:55:11 -10:00
Simon Michael
d717732928 ;doc: Hledger.Read: cleanups (#2113) 2023-11-16 23:37:20 -10:00
Simon Michael
037613abab ;doc: Hledger.Read: cleanups (#2113) 2023-11-16 23:28:14 -10:00
Simon Michael
e92ab28cce imp:reading: better timing of strict checks and .latest writing (#2113)
Strict checks now run only once, at end of the high level read operation,
and not for each individual file; this fixes some spurious --strict failures,
like account declarations not affecting a sibling file as they should.

And .latest file writing now happens as the last step, after passing
strict checks. This is mainly for the import command, but it also
means that hledger print --new now does not update .latest files
if strict checks are failing.

The file reading API has been improved and documented in more detail.
2023-11-16 21:48:43 -10:00