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

Dependency issue with shake #29

Open
paulnice opened this issue Apr 28, 2024 · 6 comments
Open

Dependency issue with shake #29

paulnice opened this issue Apr 28, 2024 · 6 comments

Comments

@paulnice
Copy link

Thank you very much for a such great doc!

Unfortunately, I'm stuck at page 03, and can't move forward. I'm looking for some advice.
I'm getting

Error when running Shake build system:
  at want, called at /Users/ps/work/accounting/export/export.hs:103:24 in main:Main
* Depends on: 2023-closing.journal
  at need, called at /Users/ps/work/accounting/export/export.hs:138:3 in main:Main
* Depends on: 2023-opening.journal
  at error, called at src/Development/Shake/Internal/Rules/File.hs:179:58 in shake-0.19.7-71rS2B91S0ZE01Iw5KZ0AI:Development.Shake.Internal.Rules.File
* Raised the exception:
Error, file does not exist and no rule available:
  2023-opening.journal

And I don't know how troubleshoot it. It looks like shake doesn't know how to regenerate 2023-opening.journal

The trace output is:

% Read 15 chunks, plus 0 slop
% Found at most 15 distinct entries out of 15
% Missing -> Running, 2023-closing.journal
% Missing -> Running, 2022-closing.journal
% Missing -> Running, 2024-opening.journal
% Missing -> Running, 2023-opening.journal
% Missing -> Running, 2024-cash-flow.txt
% Missing -> Running, 2023-cash-flow.txt
% Loaded -> Running, 2022-cash-flow.txt
% Loaded -> Running, ../import/bofa/journal/2022_checking_pavel.journal
% Loaded -> Running, ../import/bofa/bofa.rules
% Loaded -> Running, ../import/bofa/csv/2022_checking_pavel.csv
% Loaded -> Running, getDirectoryFiles ../import/bofa/in [2022_checking_pavel.*]
% Loaded -> Running, ../import/bofa/csv2journal
% Loaded -> Running, ../2022.journal
% Missing -> Running, 2024-balance-sheet.txt
% Missing -> Running, 2023-balance-sheet.txt
% Loaded -> Running, 2022-balance-sheet.txt
% Missing -> Running, 2024-income-expenses.txt
% Missing -> Running, 2023-income-expenses.txt
% Loaded -> Running, 2022-income-expenses.txt
% Missing -> Running, 2024-all.journal
% Missing -> Running, 2023-all.journal
% Loaded -> Running, 2022-all.journal
# 2023-closing.journal
% Missing -> Running, ../import/bofa/journal/2023_checking_pavel.journal
% Missing -> Running, 2023-opening.journal
% Missing -> Running, ../2023.journal
# 2022-closing.journal
# 2024-opening.journal
# 2023-opening.journal
# 2024-cash-flow.txt
% Missing -> Running, ../import/bofa/journal/2024_checking_pavel.journal
% Missing -> Running, 2024-opening.journal
% Missing -> Running, ../2024.journal
# 2023-cash-flow.txt
% Running -> Ready, ../import/bofa/bofa.rules
    = ((Just File {mod=0x6B86BF00,size=0x15D,digest=NEQ},"")) (didn't run)
% Running -> Ready, getDirectoryFiles ../import/bofa/in [2022_checking_pavel.*]
    = (2022_checking_pavel.csv,"") (didn't run)
% Loaded -> Running, ../import/bofa/in/2022_checking_pavel.csv
% Loaded -> Running, ../import/bofa/in2csv
% Running -> Ready, ../import/bofa/csv2journal
    = ((Just File {mod=0x8D0FFF70,size=0x3B,digest=NEQ},"")) (didn't run)
% Running -> Ready, ../2022.journal
    = ((Just File {mod=0x9F1BC9B0,size=0x150,digest=NEQ},"")) (didn't run)
# 2024-balance-sheet.txt
# 2023-balance-sheet.txt
# 2024-income-expenses.txt
# 2023-income-expenses.txt
# 2024-all.journal
# 2023-all.journal
# ../import/bofa/journal/2023_checking_pavel.journal
% Missing -> Running, ../import/bofa/csv/2023_checking_pavel.csv
# 2023-opening.journal
% Running -> Failed, 2023-opening.journal
% Running -> Failed, 2023-closing.journal
% Running -> Failed, 2024-opening.journal
% Running -> Failed, 2023-cash-flow.txt
% Running -> Failed, 2023-balance-sheet.txt
% Running -> Failed, 2023-income-expenses.txt
% Running -> Failed, 2023-all.journal
Error when running Shake build system:
  at want, called at /Users/ps/work/accounting/export/export.hs:103:24 in main:Main
* Depends on: 2023-closing.journal
  at need, called at /Users/ps/work/accounting/export/export.hs:137:3 in main:Main
* Depends on: 2023-opening.journal
  at error, called at src/Development/Shake/Internal/Rules/File.hs:179:58 in shake-0.19.7-71rS2B91S0ZE01Iw5KZ0AI:Development.Shake.Internal.Rules.File
* Raised the exception:
Error, file does not exist and no rule available:
  2023-opening.journal
@paulnice
Copy link
Author

I've found the issue. My 2023.journal and 2024.journal files contained extra spaces at the end of include strings
Like
include ./export/2023-opening.journal
and
include ./export/2024-opening.journal .
As soon as I removed them, everything started working as usual.

@simonmichael
Copy link

Good catch @paulnice - now fixed in hledger master.

@paulnice
Copy link
Author

paulnice commented May 2, 2024

@simonmichael Thank you for the prompt fix!

@adept
Copy link
Owner

adept commented May 3, 2024

@simonmichael thank you very much for stepping in

@paulnice I will update docker images after the next hledger release (but I have an impression that you are not using them)

@paulnice
Copy link
Author

paulnice commented May 4, 2024

@adept Thank you! Yeah, You're right. I'm not. I have some experience with Haskell and Docker, so I'm building everything on my own.
ghcup works perfectly.

P.S.: Thank you for your wonderful repository! It is very helpful!

@adept
Copy link
Owner

adept commented May 4, 2024 via email

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

No branches or pull requests

3 participants