Skip to content
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

Test failure with Boost 1.77.0 (regress/BF3C1F82-2.test) #2075

Closed
foutrelis opened this issue Dec 17, 2021 · 3 comments · Fixed by #2092
Closed

Test failure with Boost 1.77.0 (regress/BF3C1F82-2.test) #2075

foutrelis opened this issue Dec 17, 2021 · 3 comments · Fixed by #2092

Comments

@foutrelis
Copy link

Doesn't seem too serious, but I'm not sure what's causing it (also fails with Boost 1.78.0, though 1.76.0 was fine):

FAILURE in error output from /build/ledger/src/ledger-3.2.1/test/regress/BF3C1F82-2.test:
--
$ledger -f - reg
--
  @@ -1,2 +1,2 @@

   While parsing file "", line 2:

  -Error: File to include was not found: "./non-existent-ledger-file-BF3C1F82"

  +Error: File to include was not found: "non-existent-ledger-file-BF3C1F82"

E[BF3C1F82-2.test]STDERR:
b''
FAILURE in error output from /build/ledger/src/ledger-3.2.1/test/regress/BF3C1F82-2.test:
--
$ledger -f /dev/stdin reg
--
  @@ -1,2 +1,2 @@

   While parsing file "", line 2:

  -Error: File to include was not found: "./non-existent-ledger-file-BF3C1F82"

  +Error: File to include was not found: "non-existent-ledger-file-BF3C1F82"

E[BF3C1F82-2.test]STDERR:
b''

FAILED (2)
@yangsheng6810
Copy link

Having the same problem. On a ledger file that was reconciled and balanced, I am seeing the following when doing ledger-reconcile:

 File to include was not found

Also have the problem of

Transaction does not balance

@bcc32
Copy link
Contributor

bcc32 commented Jan 19, 2022

Yep, this also breaks things like M-x ledger-add-transaction in ledger-mode, since it also reads in the contents of the current buffer from stdin.

@XieJiSS
Copy link

XieJiSS commented Feb 7, 2022

Same problem here.

Test #360: RegressTest_BF3C1F82-2 ................................***Failed    1.89 sec

@tbm tbm closed this as completed in #2092 Mar 9, 2022
tbm pushed a commit that referenced this issue Mar 9, 2022
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] boostorg/filesystem@16bd89b
[2] #2075
bcc32 added a commit to bcc32/nixpkgs that referenced this issue Dec 24, 2022
marsam added a commit to NixOS/nixpkgs that referenced this issue Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants