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

addons in bin/ need updating #1072

Closed
simonmichael opened this issue Jul 16, 2019 · 7 comments

Comments

@simonmichael
Copy link
Owner

commented Jul 16, 2019

@agander writes on #809:

@simonmichael, should bin/hledger-check.hs compile? As far as you know.
Or any others in bin/
I am looking a minimal executable with arguments so I can add in multiBalanceReportHtml* functions and gradually build up.
I have cobbled something together but I am stuck with the argument options.

Addons in bin (hledger-check, hledger-smooth, hledger-swap-dates) should run and compile, but currently do not.

@agander

This comment has been minimized.

Copy link
Collaborator

commented Jul 16, 2019

These 2 for bin/hledger-check.hs:

> stack stack exec ghc -- -Wall -Werror bin/hledger-check.hs
[1 of 1] Compiling Main             ( bin/hledger-check.hs, bin/hledger-check.o )

hledger-check.hs:240:14: error:
    Not in scope: ‘H.journalApplyAliases’
    Neither ‘Hledger.Data’, ‘Hledger.Query’,
            ‘Hledger.Read’ nor ‘Hledger.Utils.Parse’ exports ‘journalApplyAliases’.
    |
240 |            $ H.journalApplyAliases (aliases opts) j
    | 

bin/hledger-check.hs:357:53: error:
    Not in scope: ‘H.accountaliasp’
    Neither ‘Hledger.Data’, ‘Hledger.Query’,
            ‘Hledger.Read’ nor ‘Hledger.Utils.Parse’ exports ‘accountaliasp’.
    |
357 |                   <*> (many . fmap snd . popt (lift H.accountaliasp))
    |
  1. Could this have had a name change? As I cant find mention of it.
    Is there a way in git to search something that might now have a different name?
  2. accountaliasp appears in hledger-lib/Hledger/Read/JournalReader.hs, so I added it to the export statement having seen that this module is imported by hledger-lib/Read and recompiled hledger:lib (stack build hledger-lib).
    But I still get the error.
    Dont understand how JournalReader gets used in hledger-lib/Hledger/Read
readers = [
  JournalReader.reader
]
@alerque

This comment has been minimized.

Copy link
Collaborator

commented Jul 16, 2019

You can use git log -S <term> (colloquially known as git pickax) to search for terms in patch sets so you can find what commits introduced (or removed) terms even if they are not in the current code base.

@agander

This comment has been minimized.

Copy link
Collaborator

commented Jul 16, 2019

You can use git log -S <term> (colloquially known as git pickax) to search for terms in patch sets so you can find what commits introduced (or removed) terms even if they are not in the current code base.

Ooh, wow, thanks @alerque

@simonmichael

This comment has been minimized.

Copy link
Owner Author

commented Jul 16, 2019

Good tip! In magit it's l = S journalApplyAliases <RET> l.

  1. I see it was removed last year. I guess all alias processing is done during parsing now, so the call to journalApplyAliases is unnecessary.

  2. Probably JournalReader's exports were tightened up since hledger-check was written. Depending on how you're running or building hledger-check, it may not see the hledger-lib package you just built. stack install hledger-lib might help.

@simonmichael

This comment has been minimized.

Copy link
Owner Author

commented Jul 16, 2019

Tip: for fast compilation feedback: stack exec -- ghcid bin/hledger-check.hs

simonmichael added a commit that referenced this issue Jul 16, 2019

simonmichael added a commit that referenced this issue Jul 16, 2019

simonmichael added a commit that referenced this issue Jul 16, 2019

@simonmichael

This comment has been minimized.

Copy link
Owner Author

commented Jul 16, 2019

@agander I hope I didn't step on your toes. There was some weirdness here and I ended up fixing all to get to the bottom of it. All should run or compile cleanly now.

@agander

This comment has been minimized.

Copy link
Collaborator

commented Jul 17, 2019

@agander I hope I didn't step on your toes.

No worries @simonmichael. I never would have got there anyway

@agander agander removed their assignment Jul 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.