| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #2061.
|
|
|
| |
resolves #2077
|
|
|
|
| |
Fixes #2049
|
|
|
|
|
|
|
|
|
|
|
| |
In README we provide instructions for how to build Ledger instead of
how to use Ledger. So the sections for Homebrew and Conda are
currently inconsistent with others.
Therefore, we update the two sections to provide installation
instructions for build dependencies.
[ci skip]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In `compare_items` if `sort_order` is a top level expression, it has
no context and `get_context()` method returns the null pointer. To see
this, run
$ ledger -f test/input/demo.ledger --sort display_amount reg --debug scope.symbols
and there will be many lines like
[DEBUG] Binding scope 0 with ...
In such case making a reference to the context is an undefined
behavior (honestly the dereferencing itself feels quite problematic,
but many compilers just run without any complaints) and could
potentially cause segfaults.
Therefore, we change to use only the grandchild scope (`left` or
`right`) for `find_sort_values` here. Note that it may seem to be more
appropriate to use `report` here for the parent scope. However, in
`find_sort_values` which is called right after, the `report` scope is
always bound to this scope. So we only use grandchild scope to avoid
unnecessary operations.
Fixes #2069.
|
| |
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
| |
Here `comm` could be a null pointer (the new test regress/2057 shows
such a case). So test it before dereferencing to avoid segfault.
Re: #2057
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure the path of file to include in `instance_t::include_directive`
is always an absolute path.
Previously when the journal file is given through stdin, we prepend a
"./" to the filename to include. However, in Boost >= 1.77,
`path::normalize` strips the leading "./" [1]. Our `resolve_path`
function calls `normalize` and thus now it returns "file" for "./file"
instead of the previous "./file".
This change causes a failing test regress/BF3C1F82-2 [2], and also
breaks the `include` directive for stdin input:
$ touch file-to-include
$ echo "include file-to-include" | ledger -f - reg
gives
While parsing file "", line 1:
Error: File to include was not found: "file-to-include"
Therefore, we change to prepend the `context.current_directory` to
make the filename absolute in this case as well. The test
regress/BF3C1F82-2 is also updated to match the new output.
Fixes #2075.
[1] https://github.com/boostorg/filesystem/commit/16bd89b7c0398d0dc5904148a865ef3fc3ece7ec
[2] https://github.com/ledger/ledger/issues/2075
|
| |
|
|
|
|
| |
A better fix for this issue is needed, however.
|
|
|
|
|
|
|
|
|
|
|
| |
it is currently not required but set. Incidentally, calling file_size()
on a bash pipe e.g. /proc/self/fd/11 fails with:
Error: boost::filesystem::file_size: Operation not permitted: "/proc/self/fd/11"
when executing ledger as
ledger -f <(cat journal)
|
|
|
|
| |
This reverts commit 7baa0efd71896711e563feb957926433f529d892.
|
| |
|
|
|
|
| |
closes 1948
|
| |
|
| |
|
| |
|
|
|
|
| |
initial version
|
|
|
|
|
|
| |
totals, not amounts"""
This reverts commit c99a4b03320242d3d5a6d64f73f8581fe5ea2306.
|
|
|
|
|
|
| |
rendering"""
This reverts commit bc45e0205d23f5a8f2e3e389195daa85f4b07ec0.
|
|\ |
|
| |\ |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
This reverts commit 7f78cadea4a2359f1f53ce9c0c66b6d3fafd81c4.
|
| |/
|/|
| |
| |
| |
| | |
amounts""
This reverts commit 1600ee1f64f659b151c1c873d478baa1bdab89f2.
|
| | |
|
| |
| |
| |
| | |
pkgs.stdenv.lib.licenses is no longer available. Use lib.licenses instead.
|
| | |
|
|/
|
|
|
|
|
|
| |
This makes it safe to compare results to -1 to indicate EOF,
regardless of whether char is considered signed or unsigned;
and so eliminates compiler warnings on platforms such as ARM.
Fixes bug #2058.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While the current formula works for positive numbers, negative numbers
are incorrectly represented.
One of the issues comes from the fact that floor(x) < x for every x.
`amount_t precision` will always be a non negative number and the code
that attempts to fix the issue for negative number will never run.
If we truncate the number instead, the current formula works for both
positive and negative numbers without making negative numbers a corner
case. So let's do that.
Signed-off-by: Rafael Ascensão <rafa.almas@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
Make it clear that --depth behaves the same for balance and register
reports now.
Fixes: #1952
|
| |
|
|
|
|
| |
Thanks to Richard Kreuter.
|
| |
|
|
|
|
|
| |
- Builds for linux
- Builds for macos
|
|
|
|
|
|
|
|
| |
Handle files that don't end with a new line. Throw an error when the buffer
size is exceeded.
Fixes #516
Contributes to #1149
|
|
|
|
|
| |
To make the file easier to find, move it into the repository root - this
way it is immediately visible when viewing the repo online.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Unable build ledger from source code at Ubuntu 20.04 Focal
./acprep dependencies
will return
acprep: INFO: Invoking primary phase: dependencies
acprep: INFO: Executing phase: dependencies
acprep: INFO: Installing Ledger's build dependencies ...
acprep: INFO: Looks like you are using APT on Ubuntu focal
acprep: INFO: I do not recognize your version of Ubuntu!
Solution:
Add 'focal' to ubuntu-releases
|
|
|
|
|
|
|
|
| |
We were previously relying on an indirect include within Boost headers. We're
using scoped_ptr which is defined in <boost/smart_ptr/scoped_ptr.hpp>.
Bug: https://bugs.gentoo.org/790176
Closes: https://github.com/ledger/ledger/issues/2030
|
|
|
|
| |
Fixes #2035
|
| |
|
|
|
|
|
|
|
| |
Notes were already being escaped. The filename, the transaction code,
the payee,, postings' account names, and postings' cost expressions
were not. Everything else the lisp report prints appears to be a
number or a constant-valued non-string token for Lisp.
|