2018-08-06 GnuCash IRC logs

00:18:35 *** Mechtilde has joined #gnucash
00:52:00 *** storyjesse has joined #gnucash
00:57:33 *** fell has joined #gnucash
00:59:42 *** gour has joined #gnucash
01:21:24 *** wget has quit IRC
01:24:29 *** wget has joined #gnucash
01:36:52 *** fell has quit IRC
01:45:13 *** fell has joined #gnucash
02:00:31 *** Freenoodle has quit IRC
02:01:02 *** Mechtilde has quit IRC
02:11:32 *** bertbob has quit IRC
02:14:56 *** shoonya has joined #gnucash
02:18:41 *** fell has quit IRC
02:26:14 *** storyjesse has quit IRC
02:38:59 *** fekepp has joined #gnucash
02:50:52 *** jotrago has quit IRC
04:38:16 *** pilotauto has quit IRC
04:50:49 *** webbyz has joined #gnucash
04:58:12 *** gjanssens has joined #gnucash
04:58:12 *** ChanServ sets mode: +o gjanssens
04:58:41 <gjanssens> .
05:08:09 *** gour_ has joined #gnucash
05:10:13 *** gour has quit IRC
05:11:03 *** gour_ is now known as gour
05:11:29 *** ncv has joined #gnucash
05:11:50 *** Unhammer has quit IRC
05:31:42 *** bertbob has joined #gnucash
06:17:59 *** Jimraehl1 has joined #gnucash
06:18:35 *** Jimraehl1 has left #gnucash
07:07:43 *** jotrago has joined #gnucash
07:11:04 *** jotrago has quit IRC
07:11:18 *** jotrago has joined #gnucash
07:43:08 *** jotrago has quit IRC
07:43:28 *** jotrago has joined #gnucash
07:50:41 *** Ryuzaki has joined #gnucash
08:22:04 *** oozer has joined #gnucash
08:47:57 *** storyjesse has joined #gnucash
08:59:48 *** fell has joined #gnucash
09:01:14 *** oozer has quit IRC
09:12:29 *** kael has joined #gnucash
09:48:42 *** Mechtilde has joined #gnucash
10:00:12 *** boldstripe has joined #gnucash
10:02:15 *** mipesom has quit IRC
10:04:02 *** storyjesse has quit IRC
10:08:00 <warlord> .
10:16:11 *** mipesom has joined #gnucash
10:45:21 *** Freenoodle has joined #gnucash
10:48:08 *** oozer has joined #gnucash
10:53:48 *** Mechtilde has quit IRC
10:56:10 *** finster has joined #gnucash
11:04:32 *** ArtGravity has joined #gnucash
11:05:44 *** Dave has joined #gnucash
11:16:23 *** kael has quit IRC
11:21:10 *** gncbot sets mode: +o fell
11:31:28 *** Freenoodle has quit IRC
11:33:52 *** Freenoodle has joined #gnucash
11:50:42 *** boldstripe has quit IRC
11:52:47 *** Mechtilde has joined #gnucash
11:53:07 *** boldstripe has joined #gnucash
11:54:57 *** kael has joined #gnucash
11:58:48 *** Mechtilde has quit IRC
11:59:01 *** Mechtilde has joined #gnucash
12:24:41 *** mmkodali[m] has quit IRC
12:24:41 *** luwum[m] has quit IRC
12:24:42 *** DiogoGomes[m] has quit IRC
12:30:50 *** drakythe has joined #gnucash
12:32:25 *** DiogoGomes[m] has joined #gnucash
12:37:26 *** ncv has quit IRC
12:39:40 *** ncv has joined #gnucash
12:45:40 *** boldstripe has quit IRC
13:00:58 <jralls> gjanssens: Welcome back!
13:02:03 <gjanssens> Hi jralls and thanks
13:02:19 * gjanssens is reviewing jralls' Timespec PR
13:02:23 *** boldstripe has joined #gnucash
13:02:34 <jralls> Ah, I was just about to ask you to do that.
13:03:11 <gjanssens> I'm about halfway...
13:04:30 <jralls> Aside from checking for dumb mistakes, I wonder if removing the API is the right thing to do. I decided to go that way because little of it was exported to the bindings and because I couldn't see a good way to indicate deprecation in the bindings.
13:07:12 <gjanssens> Hmm, good point.
13:07:56 <gjanssens> While I originally liked to keep it simple I think API changes should be done in major releases, not in minor ones.
13:08:16 <gjanssens> So as is, the PR should go into master.
13:09:15 <jralls> OK. The work that depends on it will be going to master anyway so that's not a problem.
13:10:05 <gjanssens> I know we don't formally claim api stability, but there are frequently messages on the list from people trying to scratch their personal itch using the bindings (which is good)
13:10:08 <jralls> But we should still mark all of the timespec API as deprecated, and we need that to go in the bindings in a way that raises a warning.
13:11:04 <jralls> And of course as we move towards having "libgnucash" as a thing we do want to follow the general API/ABI stability rules for libraries.
13:11:23 <jralls> The sooner we get in the habit of considering that the better.
13:11:28 <gjanssens> Just so I can follow: do you intend to push the complete PR to master only, or just the API changes/removals ?
13:11:48 <gjanssens> Indeed
13:12:35 <gjanssens> I didn't review for API changes per se so far
13:13:35 <gjanssens> As for the warnings, adding a P_WARN at the beginning of each timespec based deprecated function should trigger the warning message in the bindings, no ?
13:14:12 <gjanssens> (or for guile-only functions gnc:warn I believe)
13:14:35 <jralls> It would be better to have build-time warnings than run-time ones.
13:14:45 <jralls> But that would be better than nothing.
13:14:48 <gjanssens> Oh, indeed.
13:15:15 <gjanssens> I suppose gcc has a way to do this ? Or C in general ?
13:16:38 <jralls> C11 has a deprecated attribute and one can use cpp macros for earlier versions. IIRC glib has a deprecation macro.
13:16:58 <gjanssens> Ok
13:18:03 <jralls> But I'm completely unconcerned about C API. I don't think anyone uses it outside of GnuCash. It's the bindings, and particularly the Scheme ones that folks have used for custom reports, that worry me.
13:18:03 *** shoonya has quit IRC
13:19:55 <jralls> On the Scheme side, chris and lmat removed all of the timepair/timespec stuff before 3.0 so we're mostly clean there. All of the custom reports that depended on that are already broken.
13:21:15 <gjanssens> True. I was trying to find a path from marking C/++ functions as deprecated right down to guile compilation (which is where we have to detect it)
13:22:09 <gjanssens> I'm not sure we can, especially since we want to reuse function names (with time64 instead of timespec parameters)
13:22:37 <gjanssens> I don't know if swig handles such overloading nor if guile's type system is clever enough to deal with that.
13:28:28 *** Freenoodle has quit IRC
13:28:49 <jralls> Parameter types are handled by typemaps. I don't think that that's too big a deal. Aside from the now-defunct timepair the bindings were already using time64 and the typemaps converted that to Timespec where necessary.
13:29:22 <jralls> With the PR there's no longer any "where necessary".
13:30:48 <jralls> But part of what persuaded me to go ahead with removing the API was that I didn't find "timespec" in any of the typemaps.
13:31:58 <gjanssens> Ok, so we may be overcomplicating it.
13:32:39 <gjanssens> I just figured out guile internally uses the SCM_DEPRECATED macro to mark functions as deprecated
13:32:59 <gjanssens> This is in libguile/__scm.h
13:33:32 <jralls> That's very internally, though? As in not exposed to user code?
13:35:43 <gjanssens> No it's not, but it looks like they're defining it the pretty standard C things:
13:36:02 <gjanssens> # define SCM_DEPRECATED SCM_API __attribute__ ((__deprecated__))
13:36:43 <gjanssens> So it looks like guile is using that attribute to determine whether a deprecated function is used.
13:37:08 <gjanssens> So it may pick this up as well if we set it on our own deprecated functions.
13:37:46 <gjanssens> SCM_API by the way more or less translates into export: # define SCM_API extern __attribute__((__visibility__("default")))
13:37:46 <jralls> That will flag it if it's used in C. What does it do from the Scheme side?
13:38:21 <gjanssens> Ah, right. Let me look a bit further...
13:41:45 <gjanssens> Examples are found in guile's module/ice-9/deprecated.scm
13:41:48 <jralls> Meanwhile I find that there's Timespec-using API in build/bindings/python/gnucash_core.c and build/libgnucash/engine/swig-engine.c, so the absence of it from the typemaps wasn't a good indication.
13:42:23 <gjanssens> So guile moves deprecated scheme functions to a separate file
13:42:57 <gjanssens> It starts most functions with an issue-deprecation-warning statement and then executes the new api (where possible)
13:43:37 <gjanssens> Unfortunately our scheme functions are swig generated so we'll have to figure out something else
13:44:37 <gjanssens> The manual way would be to pre-define all deprecated functions in our *.i files just having them issue a deprecation warning or even error
13:45:04 <gjanssens> And then %ignore them before %including the relevant header files.
13:46:40 <jralls> OK, that's doable. There aren't that many.
13:48:04 <jralls> It does preclude reusing function names with a time64 instead of a Timespec paramater.
13:48:30 *** bertbob has quit IRC
13:49:27 *** boldstripe has quit IRC
13:50:38 <gjanssens> Because C doesn't do function overloading ?
13:51:28 *** Freenoodle has joined #gnucash
13:51:52 <jralls> Because Scheme and Python don't either.
13:52:05 *** bertbob has joined #gnucash
13:53:45 <gjanssens> Ok, complicated...
13:54:05 <gjanssens> Because I do prefer the cleaned up names for the final api
13:55:32 <gjanssens> But how about this: we start warning in the 3.x series that the function signature will change for 4.x for the ones that are now timespec based
13:56:01 *** bertbob has quit IRC
13:56:03 <gjanssens> And in 4.x we rename the functions and declare the _t64 and _time64 variants as deprecated
13:56:17 <gjanssens> We can be nice at that point and just call the proper new function instead
13:56:38 <gjanssens> But warn anyway it will go away in 5.x
13:57:10 <jralls> I was starting down that line, but it occurs to me that Swig is actually written for C++ and so it should be possible to write bindings for different signatures.
13:57:38 <gjanssens> That would certainly be cleaner but needs experimentation
13:58:28 <gjanssens> We should probably start by compiling our generated c wrapper files as c++
13:58:39 <gjanssens> That's something we control
13:59:19 <jralls> Indeed. We could go another step and go ahead and apply the PR to maint so that the C API is what we want and reimplementing the old API in the .i files with deprecation warnings.
13:59:21 <gjanssens> And then indeed we could have function overloading, *if* swig doesn't change the generated function signatures
13:59:50 <gjanssens> Oh, that's even better
14:00:24 <gjanssens> As you said earlier there are no external consumers of the C api that we know of
14:00:53 <fell> Before it gets forgotten: the result of your dicussion is worth a section in https://wiki.gnucash.org/wiki/Development_Process
14:01:38 <jralls> fell: About API stability in general, yes?
14:02:25 <fell> also the depreciation process
14:05:40 <gjanssens> hi fell
14:06:42 <fell> Hi gjanssens! Holyday finished?
14:07:38 <gjanssens> Yes. Catching up now.
14:09:08 <jralls> gjanssens: I'll take a whack at the .i files over the next few days. I'm a bit interrupt-driven today.
14:11:46 <gjanssens> jralls: NP.
14:12:04 <gjanssens> gnucash interrupts or outside of gnucash ?
14:12:52 <jralls> Outside mostly, though I'm trying to help Bob F with https://bugs.gnucash.org/show_bug.cgi?id=796792 as well.
14:14:11 *** frakturfreak has joined #gnucash
14:16:04 <jralls> BTW, had a look at the Ninja build issue that you brought up in https://bugs.gnucash.org/show_bug.cgi?id=796763. That doesn't so much have to do with Ninja, it's that cmake writes a command into build.ninja that starts off with 'cmd.exe'. I suspect that's because it only recognizes the MSYS environment if you tell it -G "MSYS Makefiles".
14:16:40 <jralls> Which of course has nothing to do with ${SHELL} though it does indeed mean that shebangs won't work.
14:20:54 *** luwum[m] has joined #gnucash
14:20:57 *** mmkodali[m] has joined #gnucash
14:24:13 <gjanssens> Yeah, I didn't use so many words but that's more or less how I understood as well
14:24:56 <gjanssens> To get that to work we will have to set our own SHELL or GNC_SHELL variable such that it works on all platforms
14:25:35 <gjanssens> On windows it should become something that causes cmd.exe to start the msys provided bash in the correct context
14:25:54 <gjanssens> On OS X I don't know really, that's your area
14:26:15 <gjanssens> On all other linuxes we should find the bash executable and set it's path
14:26:35 <gjanssens> In all cases we can allow users to override GNC_SHELL if they prefer to on the command line
14:27:22 <gjanssens> Do you require the exact variable name "SHELL" on OS X ? Or can it be GNC_SHELL as well ?
14:35:56 *** Anton has left #gnucash
14:42:08 *** Freenoodle has quit IRC
14:42:26 *** Freenoodle has joined #gnucash
14:48:54 *** bertbob has joined #gnucash
14:52:04 *** bertbob has quit IRC
15:05:20 <jralls> gjanssens: Sorry, an interrupt happened. Now mostly serviced. ;-)
15:05:30 <gjanssens> :)
15:06:50 *** bertbob has joined #gnucash
15:07:47 <jralls> I use $SHELL in jhbuild because it needs to be used for everything that uses the linker, otherwise DYLD_LIBRARY_PATH gets stripped and linking fails. But I can also set up jhbuild on both MacOS and Windows to set an additional GNC_SHELL if that's what we need to do to get guild working.
15:09:28 <gjanssens> Ah, so you define SHELL at the jhbuild level already.
15:09:50 <jralls> Right.
15:10:41 <gjanssens> Then GNC_SHELL in the cmake scripts is probably the way to go for all platforms, with indeed on MacOS and Windows setting this in jhbuild.
15:11:19 <gjanssens> Presuming we only support building gnucash from withing jhbuild environments on those platforms.
15:11:25 <gjanssens> But I think that's currently the case
15:13:16 *** kael has quit IRC
15:13:26 <jralls> Nope, there's also MacPorts on MacOS. But bash-detection logic that works on Unix will obviously work on Macs too, it just needs to be overridden to not use /usr/bin/bash on Macs.
15:15:36 <jralls> There's "default" behavior built into cmake to allow the calling environment to override the detected bash and that's what we want to use. We'll also want to halt cmake if we can't find a suitable shell.
15:16:34 <jralls> It shouldn't need to be bash-compatible, just Bourne compatible.
15:18:48 *** kael has joined #gnucash
15:24:29 *** fell has quit IRC
15:24:42 <gjanssens> Actually I think I have used bash specific features in some of my scripting code.
15:25:20 <gjanssens> But I'm about to leave for the night. We can talk more about that later.
15:25:42 * gjanssens needs to fix the travis failure on arch as well...
15:26:03 <gjanssens> Apparently newer gcc behaves differently from what I have on F27 here
15:26:35 <jralls> OK. No rush on the shell issue...
15:28:29 *** fell has joined #gnucash
15:29:59 *** kael has quit IRC
15:30:00 *** kael has joined #gnucash
15:33:05 *** kael has quit IRC
15:36:09 *** kael has joined #gnucash
15:40:38 *** fell has quit IRC
15:47:14 *** Mechtilde has quit IRC
16:14:40 *** kael has quit IRC
16:23:43 *** Cork has quit IRC
16:24:19 *** O01eg has quit IRC
16:24:49 *** O01eg has joined #gnucash
16:27:38 *** Freenoodle has quit IRC
16:33:02 *** boldstripe has joined #gnucash
16:33:54 *** boldstripe has quit IRC
16:38:34 *** Kaell has joined #gnucash
16:39:02 *** fell has joined #gnucash
16:50:02 *** frakturfreak has quit IRC
16:51:15 *** fell has quit IRC
17:00:31 *** gjanssens has quit IRC
17:21:52 *** Kaell has quit IRC
17:25:07 *** kael has joined #gnucash
17:27:39 *** Kaell has joined #gnucash
17:29:14 *** fell has joined #gnucash
17:29:49 *** gncbot sets mode: +o fell
18:07:58 *** Kaell has quit IRC
18:30:44 *** pilotauto has joined #gnucash
18:33:49 *** fell has quit IRC
19:16:09 *** Kaell has joined #gnucash
19:19:59 *** kael has quit IRC
19:23:27 *** fell has joined #gnucash
19:23:27 *** gncbot sets mode: +o fell
19:43:34 *** fell has quit IRC
19:50:03 *** fell has joined #gnucash
19:50:03 *** gncbot sets mode: +o fell
19:51:23 *** Kaell has quit IRC
19:54:09 *** fell has quit IRC
19:54:44 *** fell has joined #gnucash
19:54:45 *** gncbot sets mode: +o fell
19:55:46 *** Some_Person2 has joined #gnucash
19:58:49 *** fell has quit IRC
20:14:17 *** fell has joined #gnucash
20:14:18 *** gncbot sets mode: +o fell
20:36:06 *** ncv has quit IRC
21:11:24 *** oozer has quit IRC
21:13:32 *** ArtGravity has quit IRC
21:25:47 *** fell has quit IRC
21:29:12 *** fell has joined #gnucash
21:29:13 *** gncbot sets mode: +o fell
21:51:17 *** christophegx has joined #gnucash
22:11:16 *** CDB-Man_ has joined #gnucash
22:12:15 *** CDB-Away has joined #gnucash
22:13:14 *** CDB-Man has quit IRC
22:13:14 *** CDB-Away_ has quit IRC
22:15:00 *** fekepp has quit IRC
22:15:40 *** fekepp has joined #gnucash
22:18:47 *** marusich has joined #gnucash
22:46:45 *** marusich has quit IRC
23:18:49 *** gour has quit IRC
23:23:11 *** marusich has joined #gnucash
23:43:59 *** bertbob has quit IRC
23:46:31 *** bertbob has joined #gnucash