Comments (8)
It is fixed indeed! I thank you for your dedication to this project :)
from hledger.
Some follow-up to what I have mentioned above: if I remove the account type: C
tag from Node:Leaf B
, suddenly it starts working correctly:
$ cat a.j
account Node:Leaf A ; type: Cash
$ cat b.j
account Node:Leaf B
$ hledger -s -f a.j accounts --types
Node:Leaf A ; type: C
Node:Leaf B ; type:
Is there a file-scoped limit for account type tags? If so, I was not aware (and did not expect it, since account
directives are global). Still, it seems like a bug is at play: when the type
tag is read from an included file, previous tags are being discarded.
from hledger.
Okay, so things are a little bit weirder than I antecipated.
This behaviour manifests only for type
tags with the same value.
Let's see another similar example:
$ cat a.j
account Node:Leaf A ; type: C
include b.j
include c.j
$ cat b.j
account Node:Leaf B ; type: C
$ cat c.j
account Node:Leaf C ; type: C
In this case, both Node:Leaf A
and Node:Leaf B
tags are ignored, only Node:Leaf C
is kept:
$ hledger -s -f a.j accounts --types
Node:Leaf A ; type:
Node:Leaf B ; type:
Node:Leaf C ; type: C
If we were to change Node:Leaf B
to another type, both Node:Leaf B
and Node:Leaf C
would be correctly typed. Node:Leaf A
's type will still be blank:
$ sed -i b.j -e 's/type: C/type: X/'
$ hledger -s -f a.j accounts --types
Node:Leaf A ; type:
Node:Leaf B ; type: X
Node:Leaf C ; type: C
And finally, if we change Node:Leaf A
's type tag to something else, everything works:
$ sed -i a.j -e 's/type: C/type: R/'
$ hledger -s -f a.j accounts --types
Node:Leaf A ; type: R
Node:Leaf B ; type: X
Node:Leaf C ; type: C
from hledger.
I agree, that is weird. Thanks for the report.
from hledger.
@simonmichael, I believe the commits 531d34a and a18425c should reference issue #2201.
from hledger.
I agree, that is weird. Thanks for the report.
I tried running hledger
with --debug=9
but didn't find anything that might help.
Can I help with anything else? (my Haskell skills are not very good).
from hledger.
@simonmichael, I believe the commits 531d34a and a18425c should reference issue #2201.
Right you are! I edited and force-pushed them.
I tried running hledger with --debug=9 but didn't find anything that might help.
Can I help with anything else? (my Haskell skills are not very good).
I appreciate that. I tried the same, then I started adding dbg0 calls and reloading in ghci (just ghci
). I have seen that Hledger.Read.Common.addDeclaredAccountTags is adding each tag declaration, but on each call it sees that jdeclaredaccounttags j
is empty, which is strange (it should be accumulating results from each call.
from hledger.
I believe this is now fixed in master. Good catch (a bug with the original implementation of type:, not a regression).
from hledger.
Related Issues (20)
- date2-format for date2, CSV import HOT 1
- Project level default configuration should be possible without user intervention HOT 6
- Inconsistent Decimal Mark Handling after CSV Import with Rules HOT 2
- 1.25: balance reports' HTML output stopped showing digit group marks HOT 1
- roi command includes unwanted amounts when given a period and dates on postings. HOT 6
- `stack8.10.yaml`, build failure `NonEmpty` does not export `singleton` HOT 3
- incorrect prices for "daily" roi HOT 8
- Install instruction under Linux with release 1.34 HOT 1
- tldr clients and documentation HOT 4
- `check` command should not stop after the first error HOT 4
- `--historical` uses period-end valuations of prices, while `--cumulative` doesn't HOT 15
- Ledger file formatting tool HOT 3
- Importing CSV: Creating complex `*.csv.rules` needs clarity HOT 6
- Code for Postings HOT 3
- ledger import not assigning default account2 as per manual HOT 3
- aregister -P, -C and -U miscalculate initial balance HOT 5
- UI bug in hledger web - autocomplete not working on the 5th account field and beyond HOT 1
- NBSP parsing seems to be broken (at least in CSV) HOT 1
- "every Nth day" periodic rule violating start date HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hledger.