2023-02-03 GnuCash IRC logs

01:35:50 *** fell has quit IRC
01:36:26 *** gour has joined #gnucash
01:36:26 *** ChanServ sets mode: +v gour
01:37:09 *** fell has joined #gnucash
01:37:09 *** ChanServ sets mode: +o fell
02:01:01 *** gjanssens has joined #gnucash
02:01:02 *** ChanServ sets mode: +o gjanssens
03:53:03 *** raeburn has quit IRC
03:55:06 *** raeburn has joined #gnucash
03:55:06 *** ChanServ sets mode: +v raeburn
04:08:03 *** gjanssens has quit IRC
04:30:46 *** gjanssens has joined #gnucash
04:30:46 *** ChanServ sets mode: +o gjanssens
04:51:27 *** chris has quit IRC
05:17:47 *** gjanssens has quit IRC
06:19:45 *** gjanssens has joined #gnucash
06:19:45 *** ChanServ sets mode: +o gjanssens
07:55:46 *** gjanssens has quit IRC
08:32:47 *** chris has joined #gnucash
08:32:47 *** ChanServ sets mode: +v chris
08:32:51 *** gncbot sets mode: +o chris
09:06:39 *** NoobAlice has joined #gnucash
09:06:39 *** ChanServ sets mode: +v NoobAlice
09:51:58 *** jervin has quit IRC
09:56:27 *** gjanssens has joined #gnucash
09:56:27 *** ChanServ sets mode: +o gjanssens
11:37:26 *** ArtGravity has joined #gnucash
11:37:26 *** ChanServ sets mode: +v ArtGravity
12:50:55 *** palerider has joined #gnucash
13:12:39 *** palerider has left #gnucash
13:30:32 <gjanssens> jralls: I'm working on fixing single line csv imports for multi-currency transactions (https://bugs.gnucash.org/show_bug.cgi?id=796955)
13:30:53 <gjanssens> I'm pretty close to getting it working, but have hit a few snags which will take me some more time.
13:31:30 <gjanssens> IIRC this weekend is the next beta release. When do you want my changes commited to still get it in the release ?
13:32:11 <jralls> gjanssens, If they pass CI and don't crash, absolutely.
13:32:30 <gjanssens> It doesn't pass ci :( That's one snag
13:33:10 <gjanssens> The import-backend test fails because I have added code that checks account and transaction currencies, but those aren't mocked
13:33:28 <gjanssens> Mocking is new territory for me, so I don't know yet how to do that.
13:34:12 <gjanssens> In particular there are now calls to xaccTransGetCurrency, xaccAccountGetCommodity and gnc_commodity_equiv that the linker doesn't find
13:34:51 <gjanssens> I suppose the latter can be solved by adding gnc-commodity.c to the list of sources for that test, but the other two need mocking.
13:35:32 * jralls is checking the code...
13:43:41 <jralls> gjanssens, take a look at libgnucash/engine/mocks/gmock-Transaction.h and ….cpp. It's pretty straightforward: Add a MOCK_METHOD of the right arity in .h that names a fake implementation func and then wrap it with the real func name in .cpp.
13:44:29 <gjanssens> Ok, looking into that. It should indeed not be too hard.
13:50:34 <jralls> Hmm, it might be harder than I think at first glance, because it depends on whether you need those functions to get an actual commodity. The mocks will just return nullptr.
13:54:10 <jralls> Longer-term (like next week ;-)) you might find https://google.github.io/googletest/gmock_for_dummies.html helpful.
13:55:07 <jralls> Meanwhile, did you know that C99 introduced a bool type like C++'s?
14:05:21 <gjanssens> No, I didn't. Cool
14:06:24 <gjanssens> Mocking xaccAccountGetCommodity fixes one link error, though I'll need to see if the result is important (probably). I'll check that later
14:08:00 <gjanssens> Adding gnc-commodity.c for gnc_commodit_equiv, and then making sure iso-4217-currencies.c is found does fix that immediate linker error, but replaces it with a long list of other linker errors...
14:08:30 <gjanssens> I may be going down a rabbit hole here. Perhaps I should try to just create a mock class for that one as well.
14:08:55 <gjanssens> But that will be for tomorrow. I'm expected to spend the evening in company tonight ;)
14:09:04 <gjanssens> See you later
14:09:11 <jralls> No surprise, gnc-commodity pulls in Qof. The alternative is to fake it.
14:09:25 <jralls> Goodnight! Enjoy your party.
14:37:07 *** jrezende has joined #gnucash
14:38:18 *** jrezende has quit IRC
14:56:29 *** gjanssens has quit IRC
15:05:25 *** gjanssens has joined #gnucash
15:05:25 *** ChanServ sets mode: +o gjanssens
15:19:55 *** jervin has joined #gnucash
15:44:46 *** gjanssens has quit IRC
15:47:47 *** ertyu has joined #gnucash
15:48:50 *** ertyu has left #gnucash
17:45:23 <chris> "Tell me about Gnucash in iambic pentameter"
17:45:34 *** gour has quit IRC
17:46:09 <chris> ChatGPT: https://imgur.com/a/LXuOFRa
17:46:11 <chris> lol
17:53:42 <jralls> Is that from chatGPT?
17:54:34 <jralls> Oh, yeah, you said that. duh. Ask it for a full sonnet then. ;-)
17:59:48 <chris> lol https://pastebin.com/raw/vsBEZQSz
18:01:09 <jralls> We should put that on the website. ;-)
18:03:02 <chris> https://imgur.com/a/4yeKfV2
18:06:10 <jralls> Speaking of the website, it's back up but doesn't look up to date. warlord, can you try an ncat ping?
18:06:46 <jralls> The sonnet is definitely the best!
18:07:18 <chris> and one for CDB-Man: https://pastebin.com/raw/hPYCpYjT
18:07:52 <jralls> Now see if it can figure out https://bugs.gnucash.org/show_bug.cgi?id=798550, 'cuz I sure can't.
18:13:19 <chris> we can always start by gnc_numeric_mul to prevent overflows during unrealized-gains calculating avg-cost
18:14:27 <jralls> Fred's already got that patch in place. It fixes crashing the test file he uploaded but crashes his production file even with only that account selected.
18:15:37 <chris> ah the list-ref -1
18:16:20 <jralls> No, that's with selecting only the trading account. See comment 33.
18:22:32 <chris> odd that exchange-fn returned #f
18:24:16 <jralls> Do you know which exchange-fn is getting called there?
18:25:22 <chris> the default price-source is avg-cost
18:28:15 <chris> i'll review comment 40 later and see what i can find
18:28:56 <jralls> Thanks
21:20:06 *** jervin has quit IRC
23:41:41 *** jervin has joined #gnucash